Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.9
-
None
-
None
Description
I found the computing of weights to be somewhat different according to the query type (BooleanQuery versus SpanQuery) :
org.apache.lucene.search.BooleanQuery.BooleanWeight :
public BooleanWeight(Searcher searcher)
throws IOException {
this.similarity = getSimilarity(searcher);
for (int i = 0 ; i < clauses.size(); i++)
}
which looks like a recursive descent through the tree, taking into account the weights of all the nodes, whereas :
org.apache.lucene.search.spans.SpanWeight :
public SpanWeight(SpanQuery query, Searcher searcher)
throws IOException
lacks any traversal and according to what I have understood so far from the rest
of the code, only takes into account the boost of the tree root in SumOfSquareWeights(),
which is consistent with the resulting scores not considering the boost of the tree
leaves.
vintz
Attachments
Issue Links
- relates to
-
LUCENE-2880 SpanQuery scoring inconsistencies
- Closed