Skip to content

Commit

Permalink
Using trace number as sort key
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Dec 7, 2023
1 parent bb9d262 commit 82d62c4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,7 @@ public void getTraces(String interactionId, int from, int maxResults, ActionList

request.source(searchSourceBuilder);
request.source().from(from).size(maxResults);
request
.source()
.sort(ConversationalIndexConstants.INTERACTIONS_CREATE_TIME_FIELD, SortOrder.ASC)
.sort(ConversationalIndexConstants.INTERACTIONS_TRACE_NUMBER_FIELD, SortOrder.ASC);
request.source().sort(ConversationalIndexConstants.INTERACTIONS_TRACE_NUMBER_FIELD, SortOrder.ASC);
try (ThreadContext.StoredContext threadContext = client.threadPool().getThreadContext().stashContext()) {
ActionListener<List<Interaction>> internalListener = ActionListener.runBefore(listener, () -> threadContext.restore());
ActionListener<SearchResponse> al = ActionListener.wrap(response -> {
Expand Down

0 comments on commit 82d62c4

Please sign in to comment.