File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
server/src/main/java/org/opensearch/index/query Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -634,8 +634,6 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws
634
634
QueryShardContext shardContext = queryRewriteContext .convertToShardContext ();
635
635
if (shardContext == null ) {
636
636
return this ;
637
- //throw new IllegalStateException("QueryShardContext is required for rewriting the query.");
638
- //throw new IllegalStateException("QueryShardContext is null. QueryRewriteContext: " + queryRewriteContext.toString());
639
637
}
640
638
// Rewrite the subquery using the shard context
641
639
QueryBuilder rewrittenQuery = termsLookup .query ().rewrite (shardContext );
@@ -667,13 +665,6 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws
667
665
System .err .println ("Source is null for hit: " + hit );
668
666
}
669
667
}
670
-
671
- // // Extract terms from the response
672
- // List<Object> terms = new ArrayList<>();
673
- // for (SearchHit hit : response.getHits().getHits()) {
674
- // terms.addAll(XContentMapValues.extractRawValues(termsLookup.path(), hit.getSourceAsMap()));
675
- // }
676
-
677
668
// Return a new TermsQueryBuilder with the fetched terms
678
669
return new TermsQueryBuilder (fieldName , terms );
679
670
}
You can’t perform that action at this time.
0 commit comments