mkhludnev commented on code in PR #1324: URL: https://github.com/apache/solr/pull/1324#discussion_r1103228216
########## solr/core/src/test/org/apache/solr/search/TestReRankQParserPlugin.java: ########## @@ -126,6 +128,32 @@ public void testReRankQueries() { "//result/doc[5]/str[@name='id'][.='1']", "//result/doc[6]/str[@name='id'][.='5']"); + // test with reRankOperator=multiply by checking score (the order doesn't change) + params = new ModifiableSolrParams(); + params.add( + "rq", + "{!" + + ReRankQParserPlugin.NAME + + " " + + ReRankQParserPlugin.RERANK_QUERY + + "=$rqq " + + ReRankQParserPlugin.RERANK_OPERATOR + + "=multiply " + + ReRankQParserPlugin.RERANK_DOCS + + "=200}"); + params.add("q", "term_s:YYYY^=0.1"); // force score=0.1 + params.add("rqq", "{!edismax bf=$bff}*:*"); + params.add("bff", "field(test_ti)"); // test_ti=5000 for item 3 + params.add("start", "0"); + params.add("rows", "6"); + params.add("df", "text"); + params.add("fl", "id,score"); + assertQ( + req(params), + "*[count(//doc)=6]", + "//result/doc[1]/str[@name='id'][.='3']", + "//result/doc[1]/float[@name='score'][.='1000.2']"); // adding gives 10002.1 instead Review Comment: Why don't have explicit test case&assert for addition? -- 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. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org