On Mar 12, 2006, at 1:27 AM, wu fox wrote:
Hi:
I have tow indices A and B. Field "title" is in index A and field "label " is in B.Now I'd like to search with query "title:XXX AND label:XXX",surely I expect search "title:XXX " in index A and "label:XXX" in index B.Is there
any Lucene API can help me to do this or I have to write some code by
myself?thank you in advance

Are indexes A and B completely different sets of logical documents? Or are the indices parallel such that first document in A represents a piece of the first document in B?

If they are distinct indexes, then title:XXX AND label:XXX won't work because no document would have both title "AND" label. Perhaps logically you'd achieve what you want by using "OR" instead? To search multiple distinct indexes you could use a MultiSearcher.

If they are parallel indexes, using a ParallelReader within an IndexSearcher may be what you're after in which case the "AND" would work as you mentioned.

        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to