Skip to content

Commit

Permalink
Fix ElasticSearch scroller bug (#10999)
Browse files Browse the repository at this point in the history
  • Loading branch information
kezhenxu94 authored Jun 26, 2023
1 parent 77da556 commit d13d448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Support `SW_CORE_SYNC_PERIOD_HTTP_URI_RECOGNITION_PATTERN` and `SW_CORE_TRAINING_PERIOD_HTTP_URI_RECOGNITION_PATTERN`
to control the period of training and sync HTTP URI recognition patterns. And shorten the default period to 10s for
sync and 60s for training.
* Fix ElasticSearch scroller bug.

#### UI

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public List<T> scroll() {
for (final var searchHit : response.getHits()) {
results.add(resultConverter.apply(searchHit));
}
if (search.getSize() != null && response.getHits().getTotal() < search.getSize()) {
if (search.getSize() != null && response.getHits().getHits().size() < search.getSize()) {
break;
}
if (queryMaxSize > 0 && results.size() >= queryMaxSize) {
Expand Down

0 comments on commit d13d448

Please sign in to comment.