lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Harwood (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-862) Contrib query org.apache.lucene.search.BoostingQuery sets boost on constructor Query, not cloned copy
Date Tue, 17 Apr 2007 07:16:15 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Harwood resolved LUCENE-862.
---------------------------------

    Resolution: Fixed

Thanks for pointing this bug out Antony. Please ignore my earlier suggestion that setting
the boost to zero might  be undesirable. I tested the code and it is correct with this fix.

> 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