You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2026/06/04 03:54:50 UTC
Re: [PR] SOLR-18271: QueryElevation support for Combined Query feature [solr]
dsmiley commented on code in PR #4476:
URL: https://github.com/apache/solr/pull/4476#discussion_r3353316277
##########
solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java:
##########
@@ -488,6 +489,45 @@ public void prepare(ResponseBuilder rb) throws IOException {
return;
}
+ if (rb instanceof CombinedQueryResponseBuilder crb) {
+ prepareCombined(crb);
+ } else {
+ prepareElevationComponent(rb);
+ }
+ }
+
+ /**
+ * Elevates each subquery and mirrors the resulting SortSpec/filters onto the parent crb so {@link
+ * CombinedQueryComponent#mergeIds} can read {@code _elevate_} from each shard's {@code
+ * sort_values_i} during distributed merge.
+ */
+ private void prepareCombined(CombinedQueryResponseBuilder crb) throws IOException {
+ if (crb.responseBuilders.isEmpty()) {
+ return;
+ }
+ for (ResponseBuilder thisRb : crb.responseBuilders) {
+ prepareElevationComponent(thisRb);
+ }
+ // Subqueries get identical elevation treatment, so any one is representative.
+ ResponseBuilder representative = crb.responseBuilders.getFirst();
+ crb.setSortSpec(representative.getSortSpec());
+ crb.setFilters(representative.getFilters());
+
+ if (crb.isDebug() && crb.isDebugQuery()) {
Review Comment:
okay but does that belong _here_? This isn't the DebugComponent
--
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-unsubscribe@solr.apache.org
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