-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(snomed.datastore): Adjust page size dynamically for streaming queries #1187
Conversation
...requested items is larger than the currently configured maximum result window.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## 8.x #1187 +/- ##
=========================================
Coverage 64.01% 64.01%
- Complexity 12805 12810 +5
=========================================
Files 1764 1765 +1
Lines 59773 59836 +63
Branches 5528 5529 +1
=========================================
+ Hits 38264 38307 +43
- Misses 19132 19151 +19
- Partials 2377 2378 +1
☔ View full report in Codecov by Sentry. |
...first batch did not produce any results (eg. due to an impossible "searchAfter" value). In these cases remainingCount is equal to totalHitCount, but the "while" loop exits immediately as there is no "next searchAfter" value to extract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
...exceeds the result window limit
These are limited by both the maximum amount of allowed terms in a TermsQuery as well as the maximum result set size in "result_window".
...SnomedConceptUpdateRequest
final Query<Data> query = Query.select(Data.class) | ||
.where(Expressions.matchAll()) | ||
.limit(1000) | ||
.limit(pageSize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the purpose here was to actually page through the results with the page size of 1000
, now we are going to fetch it in one go, right?
@@ -194,7 +194,7 @@ public <T> Hits<T> search(Query<T> query) throws IOException { | |||
final boolean isLiveStreaming = !Strings.isNullOrEmpty(query.getSearchAfter()); | |||
if (isLocalStreaming) { | |||
checkArgument(!isLiveStreaming, "Cannot use searchAfter when requesting more items (%s) than the configured result window (%s).", limit, resultWindow); | |||
} else if (isLiveStreaming) { | |||
} if (isLiveStreaming) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block looks a bit weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥓
The limit should never exceed the value of
result_window
configured for Elasticsearch.