lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Le Maout (JIRA)" <>
Subject [jira] Created: (LUCENE-533) SpanQuery scoring: SpanWeight lacks a recursive traversal of the query tree
Date Wed, 29 Mar 2006 09:05:18 GMT
SpanQuery scoring: SpanWeight lacks a recursive traversal of the query tree

         Key: LUCENE-533
     Project: Lucene - Java
        Type: Bug
  Components: Search  
    Versions: 1.9    
    Reporter: Vincent Le Maout

I found the computing of weights to be somewhat different according to the query type (BooleanQuery
versus SpanQuery) : :

public BooleanWeight(Searcher searcher)
     throws IOException {
     this.similarity = getSimilarity(searcher);
     for (int i = 0 ; i < clauses.size(); i++) {
       BooleanClause c = (BooleanClause)clauses.elementAt(i);

which looks like a recursive descent through the tree, taking into account the weights of
all the nodes, whereas : :

public SpanWeight(SpanQuery query, Searcher searcher)
   throws IOException {
   this.similarity = query.getSimilarity(searcher);
   this.query = query;
   this.terms = query.getTerms();

   idf = this.query.getSimilarity(searcher).idf(terms, searcher);

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


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message