lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Bowesman (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENE-862) Contrib query org.apache.lucene.search.BoostingQuery sets boost on constructor Query, not cloned copy
Date Thu, 12 Apr 2007 09:29:32 GMT
Contrib query org.apache.lucene.search.BoostingQuery sets boost on constructor Query, not cloned
copy
-----------------------------------------------------------------------------------------------------

                 Key: LUCENE-862
                 URL: https://issues.apache.org/jira/browse/LUCENE-862
             Project: Lucene - Java
          Issue Type: Bug
          Components: Search
    Affects Versions: 2.1
         Environment: All
            Reporter: Antony Bowesman
            Priority: Minor


BoostingQuery sets the boost value on the passed context Query

    public BoostingQuery(Query match, Query context, float boost) {
      this.match = match;
      this.context = (Query)context.clone();        // clone before boost
      this.boost = boost;

      context.setBoost(0.0f);                      // ignore context-only matches
    }

This should be 
      this.context.setBoost(0.0f);                      // ignore context-only matches

Also, boost value of 0.0 may have wrong effect - see discussion at

http://www.mail-archive.com/java-user@lucene.apache.org/msg12243.html 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message