punAhuja commented on code in PR #5119:
URL: https://github.com/apache/solr/pull/5119#discussion_r4312943269
##########
solr/core/src/java/org/apache/solr/handler/component/combine/ReciprocalRankFusion.java:
##########
@@ -54,32 +55,77 @@ public int getK() {
return k;
}
+ /**
+ * Reads the RRF weight for a query from {@code
combiner.rrf.weight.<queryKey>}, defaulting to
+ * {@link CombinerParams#DEFAULT_COMBINER_RRF_WEIGHT}. A negative weight is
rejected with a 400.
+ */
+ private float getWeight(SolrParams solrParams, String queryKey) {
+ float weight =
+ solrParams.getFloat(
+ CombinerParams.COMBINER_RRF_WEIGHT + "." + queryKey,
+ CombinerParams.DEFAULT_COMBINER_RRF_WEIGHT);
+ if (weight < 0) {
Review Comment:
Makes sense, will make this change.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]