You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/06/16 09:36:47 UTC
[jira] [Created] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
CustomScoreQuery calls weight() where it should call createWeight()
-------------------------------------------------------------------
Key: LUCENE-3207
URL: https://issues.apache.org/jira/browse/LUCENE-3207
Project: Lucene - Java
Issue Type: Bug
Reporter: Robert Muir
Attachments: LUCENE-3207.patch
Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050263#comment-13050263 ]
Robert Muir commented on LUCENE-3207:
-------------------------------------
as an explanation, this causes this query to call sumOfSquaredWeights + queryNorm + normalize() twice.
the reason it doesnt cause any tests to fail in trunk is this:
in trunk sumOfSquaredWeights is not really a getter, its also a setter:
{noformat}
@Override
public float sumOfSquaredWeights() {
queryWeight = idf * getBoost(); // compute query weight
return queryWeight * queryWeight; // square it
}
{noformat}
in my patch on LUCENE-3174, my sumOfSquaredWeights returns queryWeight * queryWeight, but doesn't reset any state.
so you end out normalizing twice and thats why the test failed on the branch.
> CustomScoreQuery calls weight() where it should call createWeight()
> -------------------------------------------------------------------
>
> Key: LUCENE-3207
> URL: https://issues.apache.org/jira/browse/LUCENE-3207
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-3207.patch
>
>
> Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-3207.
-----------------------------------
Resolution: Fixed
Fix Version/s: 4.0
3.3
Fixed through LUCENE-3208.
> CustomScoreQuery calls weight() where it should call createWeight()
> -------------------------------------------------------------------
>
> Key: LUCENE-3207
> URL: https://issues.apache.org/jira/browse/LUCENE-3207
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3207.patch
>
>
> Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3207:
--------------------------------
Attachment: LUCENE-3207.patch
> CustomScoreQuery calls weight() where it should call createWeight()
> -------------------------------------------------------------------
>
> Key: LUCENE-3207
> URL: https://issues.apache.org/jira/browse/LUCENE-3207
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-3207.patch
>
>
> Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050264#comment-13050264 ]
Uwe Schindler commented on LUCENE-3207:
---------------------------------------
This bug is stupid: I had a similar issue during the rewrite of ConstantScoreQuery to directly wrap queries, where I copied some code from CustomScoreQuery (just removed the custom scoring). I fixed it in Constant*, not sure why I left CustomScoreQuery unchanged. Maybe because tests passed.
> CustomScoreQuery calls weight() where it should call createWeight()
> -------------------------------------------------------------------
>
> Key: LUCENE-3207
> URL: https://issues.apache.org/jira/browse/LUCENE-3207
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-3207.patch
>
>
> Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (LUCENE-3207) CustomScoreQuery calls weight()
where it should call createWeight()
Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler reassigned LUCENE-3207:
-------------------------------------
Assignee: Uwe Schindler
> CustomScoreQuery calls weight() where it should call createWeight()
> -------------------------------------------------------------------
>
> Key: LUCENE-3207
> URL: https://issues.apache.org/jira/browse/LUCENE-3207
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Robert Muir
> Assignee: Uwe Schindler
> Fix For: 3.3, 4.0
>
> Attachments: LUCENE-3207.patch
>
>
> Thanks to Uwe for helping me track down this bug after I pulled my hair out for hours on LUCENE-3174.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org