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
634634 QueryShardContext shardContext = queryRewriteContext .convertToShardContext ();
635635 if (shardContext == null ) {
636636 return this ;
637- //throw new IllegalStateException("QueryShardContext is required for rewriting the query.");
638- //throw new IllegalStateException("QueryShardContext is null. QueryRewriteContext: " + queryRewriteContext.toString());
639637 }
640638 // Rewrite the subquery using the shard context
641639 QueryBuilder rewrittenQuery = termsLookup .query ().rewrite (shardContext );
@@ -667,13 +665,6 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws
667665 System .err .println ("Source is null for hit: " + hit );
668666 }
669667 }
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-
677668 // Return a new TermsQueryBuilder with the fetched terms
678669 return new TermsQueryBuilder (fieldName , terms );
679670 }
You can’t perform that action at this time.
0 commit comments