lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <>
Subject Re: multiple fields to be indexed
Date Mon, 14 Jun 2004 17:32:46 GMT
jitender ahuja wrote:

>Hi all,
>I am trying to do a search on multiple fields of which some are indexed. Now, a query
can be posed to search in the indexed fields but the Hits class object can have only one query
object and the query class similarly can have only one field on which the query is performed.

Take a look at BooleanQuery. That will allow you to combine multiple 
TermQueries, such that you can create a single query on different 
fields. That should do the trick.

Good luck!

>Now, to have multiple queries I need to obtain multiple Hits class objects that are then
merged  together in one array. But, I do not know how to maintain the scorings obtained by
different Hits class objects. If somebody has tried such a thing or a different mechanism
to feed a query to different query objects, then pl. respond.
>Actually I have not tried the above option of merging the results in a final array but
I feel that it should work.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message