Detailed description of query processing functionality

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Detailed description of query processing functionality

Joel Mackenzie
Hi all,

I'm trying to understand how Lucene deals with particular query types.
My main case is a query where there is a mixture of Should and Must
clauses, potentially with some MinimumShouldMatch criteria.

Firstly, I understand that Lucene operates as a documented-ordered
index, and hence processes queries in a Document-at-a-Time manner. My
question is how does Lucene manage these types of query under the hood?
For example, do we first intersect the Must lists and build a bit-vector
which is then used to jump to the matching documents, which can then be
scored and returned? Or do we simply do this on-the-fly as a single pass
traversal? Perhaps a combination of both?

Any information would be greatly appreciated, and of course, any
examples or relevant code/snippets are a bonus.