Skip to content

Commit

Permalink
Merge pull request #3238 from atlanhq/plt-1651-search-after
Browse files Browse the repository at this point in the history
Plt 1651, beta, search_after
  • Loading branch information
hitk6 authored Jun 12, 2024
2 parents 388edb9 + 3b2a6f1 commit 9620b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ public void addSort(String guid, ArrayList sort) {
if(MapUtils.isEmpty(this.searchMetadata)) {
this.searchMetadata = new LinkedHashMap<>();
}
ElasticsearchMetadata v = this.searchMetadata.getOrDefault(guid, new ElasticsearchMetadata());
v.addSort(sort);
ElasticsearchMetadata sortMetadata = this.searchMetadata.getOrDefault(guid, new ElasticsearchMetadata());
sortMetadata.addSort(sort);
if (this.searchMetadata.containsKey(guid)) {
this.searchMetadata.replace(guid, v);
this.searchMetadata.replace(guid, sortMetadata);
} else {
this.searchMetadata.put(guid, v);
this.searchMetadata.put(guid, sortMetadata);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ public void addHighlights(Map<String, List<String>> highlights) {
public Object getSort() { return sort; }

public void addSort(ArrayList<Object> sort) {

if(!sort.isEmpty()) {
if (MapUtils.isEmpty(this.highlights)) {
this.sort = new ArrayList<>();
}
this.sort = sort;
}
this.sort = sort;
}

@Override
Expand Down

0 comments on commit 9620b35

Please sign in to comment.