You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/06/01 17:58:15 UTC

[GitHub] [solr] cpoerschke commented on a change in pull request #151: SOLR-15437: ReRanking/LTR does not work in combination with custom sort and SolrCloud

cpoerschke commented on a change in pull request #151:
URL: https://github.com/apache/solr/pull/151#discussion_r643365608



##########
File path: solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
##########
@@ -999,20 +1013,34 @@ protected void mergeIds(ResponseBuilder rb, ShardRequest sreq) {
 
           shardDoc.sortFieldValues = unmarshalledSortFieldValues;
 
-          queue.insertWithOverflow(shardDoc);
+          if(reRankQueue != null && docCounter++ <= reRankDocsSize) {
+              ShardDoc droppedShardDoc = reRankQueue.insertWithOverflow(shardDoc);
+              // FIXME: Only works if the original request does not sort by score

Review comment:
       https://github.com/cpoerschke/solr/commit/bc2e18054c01a253434ee903cac9a9178d391455 on https://github.com/cpoerschke/solr/commits/SOLR-15437 branch explores the "non-overlapping equally-sized queue/reRankQueue combo" idea from above in code form. But it does break the two tests that are annotated with `@Ignore` (and I haven't looked into as to why that might be). What do you think?




-- 
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@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org