Applying a filter with a filtered query works very similarly to a Boolean query with 2 MUST clauses. The query and filter iterators are advanced in a leap-frog fashion in order to compute the intersection. So the filter is neither applied before or after the query but rather at the same time.
On Wed, Mar 18, 2015 at 2:59 AM, Manjesh Nilange <manjesh.nila...@airbnb.com.invalid> wrote: > Hi all, > > I have recently started to learn about Lucene and I'm a little confused > about how Filters work. I am going through the "Lucene in Action" book and > did some Internet research, but haven't found an answer yet, hence this > email... > > From basic experimentation, I know that Filters work on the entire document > set (before the inverted index is looked up). Why not run the filters on > the hits after the index lookup? That'd reduce the number of filter > executions...I don't imagine that running the filters first would > effectively reduce the size of the index (making the lookup faster). Any > guidance is much appreciated! > > Thanks in advance, -- Adrien --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org