lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arjun Dhar <>
Subject Query, Searcher, Weight, Similarity = ?
Date Fri, 29 Jun 2012 13:02:17 GMT
I'm new and that is my disclaimer to the stupid question I am about to ask.

Am trying to form a conceptual picture of the relation between Query <-->
Weight <--> IndexReader, Scorer, Searcher <--> Similarity

*From what I gather : (and someone please validate or correct me) *
1. We want *Queries* to be RE-USABLE instances hence *Weight* is a specific
Queries state !?
2. *Searcher* is STATEFUL, and though it processes a *Query*, the state for
that *Searcher* is delegated to the WEIGHT !?
3. *IndexReader* Reads an Index, and the *Searcher* uses the Reader to
4.  From the JavaDocs of Weight class ----> "IndexReader dependent state
should reside in the Scorer. " -- Means, when *weights* are calculated, the
final result of the Calculation goes into a STATEFUL object represented by
the *Scorer* which is also Iterable !?
5. *Searcher* can be assigned a *Similarity* algorithm. ... hence using that
algorithm, it calculates *Weight*, which eventually leads to the
construction of an Iterable *Scorer* !?

6. While Indexing, its simple there is a direct relation between
IndexWriterConfig <--> Similarity

+Q) Apart from the validation of my understanding, is there a Sequence
Diagram explaining the process of calculation, during a Query?

+Q) There are different implementations of Queries. Do they differ in how
they mash up all the other stuff?
Looks like if i mess each of the other entities, I can pretty much produce
whatever Query?!


View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

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

View raw message