lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jian chen <>
Subject Re: About searching in multiple fields with one query
Date Sun, 13 Nov 2005 23:29:53 GMT
Hi, Karl,

Looking at the Lucene 1.2 source code, looks to me that the
MultiFieldQueryParser generates a BooleanQuery. Each sub-query with the
BooleanQuery is for one field. The actually calculation of the scoring is
with, where the scores from each sub-query is

So, without going into more details of the, it seems to
me that the Lucene 1.2 creates a score from each field that is involved, and
then, calculate a combined score (simple summation of the scores from each

I like the simplicity with Lucene 1.2, and am considering porting the
compound file format back to Lucene 1.2 so it will be more robust.



On 11/13/05, Karl Koch <> wrote:
> Hello all,
> I have a question about searching within multiple fields. I have the
> following code for doing that (searchFields provides two fields in which I
> want to search):
> IndexSearcher searcher = new IndexSearcher(indexDirectory);
> // search over multiple index fields
> Query query = MultiFieldQueryParser.parse(queryString, searchFields,
> analyser);
> hits =;
> I am wondering how this is done internally (I am using Lucene 1.2). Does
> Lucene 1.2 merge the terms of the two fields and create a single score
> from
> this? Or does Lucene 1.2 create a score from each field that is involved
> and
> then calculate a combined score from all those?
> Karl
> --
> Telefonieren Sie schon oder sparen Sie noch?
> NEU: GMX Phone_Flat
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message