ercsonusharma commented on code in PR #4277:
URL: https://github.com/apache/solr/pull/4277#discussion_r3084419954
##########
solr/core/src/java/org/apache/solr/handler/component/combine/QueryAndResponseCombiner.java:
##########
@@ -49,12 +62,21 @@ public abstract List<ShardDoc> combine(
Map<String, List<ShardDoc>> queriesDocMap, SolrParams solrParams);
/**
- * Simple combine query result list as a union.
+ * Combine query result list as a union, optionally deduplicating by a
collapse field. When a
+ * collapse filter is provided, only one document per unique field value is
kept (based on the
+ * collapse sort/score selection). This ensures that collapse semantics are
preserved across
+ * combined queries.
*
* @param queryResults the query results to be combined
+ * @param collapseFilter the collapse post filter, or null if no collapse
dedup is needed
+ * @param searcher the searcher to read field values from, required when
collapseFilter is
+ * non-null
* @return the combined query result
*/
- public static QueryResult simpleCombine(List<QueryResult> queryResults) {
+ public static QueryResult simpleCombine(
+ List<QueryResult> queryResults,
+ CollapsingPostFilter collapseFilter,
+ SolrIndexSearcher searcher) {
QueryResult combinedQueryResults = new QueryResult();
DocSet combinedDocSet = null;
Review Comment:
it was added but after latest change, not needed.
--
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]