-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assign a dummy simScorer in TermsWeight if score is not needed #12383
Conversation
@jpountz Can you check on this? |
@msfroh Can you also check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you have some small formatting issues caught by the precommit checks:
503 actionable tasks: 503 executed
@@ -75,12 +75,13 @@
········if·(scoreMode.needsScores())·{
··········this.simScorer·=·similarity.scorer(boost,·collectionStats,·termStats);
········}·else·{
-··········this.simScorer·=·new·Similarity.SimScorer()·{
-············@Override
-············public·float·score(float·freq,·long·norm)·{
-··············return·0f;
-············}
-··········};
+··········this.simScorer·=
+··············new·Similarity.SimScorer()·{
+················@Override
+················public·float·score(float·freq,·long·norm)·{
+··················return·0f;
+················}
+··············};
········}
······}
····}
IMPORTANT: run the top-level './gradlew tidy' to format code automatically (see help/formatting.txt for more info).
lucene/queries/src/test/org/apache/lucene/queries/function/TestFunctionScoreQuery.java
Outdated
Show resolved
Hide resolved
lucene/queries/src/test/org/apache/lucene/queries/function/TestFunctionScoreQuery.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left minor suggestions but it looks good to me. Can you add a CHANGES entry under 9.8?
lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
Outdated
Show resolved
Hide resolved
lucene/core/src/test/org/apache/lucene/search/TestTermQuery.java
Outdated
Show resolved
Hide resolved
@jpountz Sure. I have added a CHANGE entry. |
ExplainableScriptIT tests the output of an explainable score script. The script declares that it does not need the score, in fact it returns the score as the value of a field from each document. The explain output though includes the explanation of the sub query, whose score is completely replaced by function score. The test assertson the sub query explanation which is thought inaccurate as the script declares that it needs no score. This test issue was made more evident by apache/lucene#12383 as the sub query score became 0 . The solution is to not include the sub query explanation in the script explain output and remove the assertions that depend on that part of the output.
ExplainableScriptIT tests the output of an explainable score script. The script declares that it does not need the score, in fact it returns the score as the value of a field from each document. The explain output though includes the explanation of the sub query, whose score is completely replaced by function score. The test assertson the sub query explanation which is thought inaccurate as the script declares that it needs no score. This test issue was made more evident by apache/lucene#12383 as the sub query score became 0 . The solution is to not include the sub query explanation in the script explain output and remove the assertions that depend on that part of the output.
ExplainableScriptIT tests the output of an explainable score script. The script declares that it does not need the score, in fact it returns the score as the value of a field from each document. The explain output though includes the explanation of the sub query, whose score is completely replaced by function score. The test assertson the sub query explanation which is thought inaccurate as the script declares that it needs no score. This test issue was made more evident by apache/lucene#12383 as the sub query score became 0 . The solution is to not include the sub query explanation in the script explain output and remove the assertions that depend on that part of the output.
ExplainableScriptIT tests the output of an explainable score script. The script declares that it does not need the score, in fact it returns the score as the value of a field from each document. The explain output though includes the explanation of the sub query, whose score is completely replaced by function score. The test assertson the sub query explanation which is thought inaccurate as the script declares that it needs no score. This test issue was made more evident by apache/lucene#12383 as the sub query score became 0 . The solution is to not include the sub query explanation in the script explain output and remove the assertions that depend on that part of the output.
ExplainableScriptIT tests the output of an explainable score script. The script declares that it does not need the score, in fact it returns the score as the value of a field from each document. The explain output though includes the explanation of the sub query, whose score is completely replaced by function score. The test assertson the sub query explanation which is thought inaccurate as the script declares that it needs no score. This test issue was made more evident by apache/lucene#12383 as the sub query score became 0 . The solution is to not include the sub query explanation in the script explain output and remove the assertions that depend on that part of the output.
Description
Related Issue - #12297