Skip to content

Commit f7146ff

Browse files
Both id and query is working checkpoint
1 parent 58c4d2b commit f7146ff

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

server/src/main/java/org/opensearch/index/query/TermsQueryBuilder.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)