You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/04 23:08:06 UTC

[GitHub] [lucene-solr] tflobbe opened a new pull request #1553: LUCENE-9393: FunctionScoreQuery turns TOP_DOCS to COMPLETE in inner weights

tflobbe opened a new pull request #1553:
URL: https://github.com/apache/lucene-solr/pull/1553


   FunctionScoreQuery can't really use WAND algorithm even if TOP_DOCS score mode is requested. This commit makes the inner weight created use COMPLETE in this case.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] tflobbe commented on a change in pull request #1553: LUCENE-9393: FunctionScoreQuery turns TOP_DOCS to COMPLETE in inner weights

Posted by GitBox <gi...@apache.org>.
tflobbe commented on a change in pull request #1553:
URL: https://github.com/apache/lucene-solr/pull/1553#discussion_r436062720



##########
File path: lucene/queries/src/test/org/apache/lucene/queries/function/TestFunctionScoreQuery.java
##########
@@ -244,4 +247,33 @@ public void testAccessToValueSource() throws Exception {
 
   }
 
+  public void testScoreMode() throws Exception {
+    // Value Source doesn't need scores
+    assertInnerScoreMode(ScoreMode.COMPLETE_NO_SCORES, ScoreMode.COMPLETE, DoubleValuesSource.fromDoubleField("foo"));

Review comment:
       Ah, right. ValueSources like `MultiplicativeBoostValuesSource` will need scores because it uses the `DoubleValues scores` argument.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] tflobbe commented on a change in pull request #1553: LUCENE-9393: FunctionScoreQuery turns TOP_DOCS to COMPLETE in inner weights

Posted by GitBox <gi...@apache.org>.
tflobbe commented on a change in pull request #1553:
URL: https://github.com/apache/lucene-solr/pull/1553#discussion_r435604487



##########
File path: lucene/queries/src/test/org/apache/lucene/queries/function/TestFunctionScoreQuery.java
##########
@@ -244,4 +247,33 @@ public void testAccessToValueSource() throws Exception {
 
   }
 
+  public void testScoreMode() throws Exception {
+    // Value Source doesn't need scores
+    assertInnerScoreMode(ScoreMode.COMPLETE_NO_SCORES, ScoreMode.COMPLETE, DoubleValuesSource.fromDoubleField("foo"));

Review comment:
       While this test makes the current code pass, I'm trying to understand why it is correct. Why do we pass a COMPLETE_NO_SCORES to the underlying weight when the function's ValueSource doesn't need scores?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] tflobbe merged pull request #1553: LUCENE-9393: FunctionScoreQuery turns TOP_DOCS to COMPLETE in inner weights

Posted by GitBox <gi...@apache.org>.
tflobbe merged pull request #1553:
URL: https://github.com/apache/lucene-solr/pull/1553


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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