Skip to content

Commit

Permalink
Fix the bug
Browse files Browse the repository at this point in the history
Signed-off-by: Simeon Widdis <[email protected]>
  • Loading branch information
Swiddis committed Oct 9, 2024
1 parent e143507 commit 3946e6a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ public OpenSearchResponse searchWithPIT(Function<SearchRequest, SearchResponse>
// Set sort field for search_after
if (this.sourceBuilder.sorts() == null) {
this.sourceBuilder.sort(DOC_FIELD_NAME, ASC);
// Temp workaround to preserve sort location more exactly,
// see https://github.com/opensearch-project/sql/pull/3061
this.sourceBuilder.sort("_id", ASC);
}
SearchRequest searchRequest = new SearchRequest().source(this.sourceBuilder);
this.searchResponse = searchAction.apply(searchRequest);
Expand Down

0 comments on commit 3946e6a

Please sign in to comment.