To my knowledge the answer is No, lucene performs each query separately and
then performs the joins after it has all the results.  This is actually a
rather serious problem when it comes to searches in large indexes where a
single field is very important but has a very low uniqueness.

For example, if you were searching for a telephone number for a company in a
lucene index of all of the companies in the US and you knew the state, city,
and name, the query would come up being something like:

name:Bob's Discount Furniture AND state:California AND city:San Diego

Now, that query is going to retrieve EVERY Bob's discount furniture, EVERY
company in California, and EVERY city in San Diego and then join them.  That
makes the memory requirements for this query far higher than they really
need to be.

At least, that has been my experience.

-----Original Message-----
From: Jie Yang [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 3:21 PM
To: Lucene Users List
Subject: Query Filters on term A in query "A AND (B OR C OR D)"


Can anyone clarify a bit more ont he issue below? I
don't seems can find out any hints in this list.

Much Thanks..

> > Again, I still feel a bit curious and want to find

> > out does lucene do (or in the future) pre-filter 
> > on "AND join conditions". For example, A AND (B OR

> > C OR D). if A finds 100 docs out of 1 million, can
> > lucene restrict the searchs on B,C,D only within 
> > the 100 docs found? Thus boost performance

> Ah, this was mentioned recently on the list.
> I don't remember what the conclusion was, but 
> Erik did remind us of Lucene's filters which can 
> help in some situations.
> 
> Otis 

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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

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

Reply via email to