Skip to content

Commit

Permalink
fix npe
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Jun 11, 2024
1 parent 3cb0843 commit 9317bcb
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,15 +469,16 @@ void executeRequest(
});

final SearchSourceBuilder source = searchRequest.source();
final RetrieverBuilder retriever = source.retrieverBuilder();
if (retriever == null) {
if (source != null && source.retrieverBuilder() == null) {
Rewriteable.rewriteAndFetch(
searchRequest,
searchService.getRewriteContext(timeProvider::absoluteStartMillis, resolvedIndices),
rewriteSearchRequestListener
searchRequest,
searchService.getRewriteContext(timeProvider::absoluteStartMillis, resolvedIndices),
rewriteSearchRequestListener
);
return;
} else if (retriever != null && retriever.isCompound() && source.pointInTimeBuilder() == null) {
}
final RetrieverBuilder retriever = source.retrieverBuilder();
if (retriever != null && retriever.isCompound() && source.pointInTimeBuilder() == null) {
OpenPointInTimeRequest pitReq = new OpenPointInTimeRequest(searchRequest.indices()).indicesOptions(
searchRequest.indicesOptions()
).preference(searchRequest.preference()).routing(searchRequest.routing()).keepAlive(TimeValue.ONE_MINUTE);
Expand Down

0 comments on commit 9317bcb

Please sign in to comment.