You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a "withMaxResults" method to NativeSearchQueryBuilder for specifying the maxResults on the built Query. This is common for aggregation queries where search hits are not needed.
Having the builder method for setting maxResults is a minor ergonomic improvement, e.g.
Patrick Strawderman opened DATAES-988 and commented
It would be useful to have a "withMaxResults" method to NativeSearchQueryBuilder for specifying the maxResults on the built Query. This is common for aggregation queries where search hits are not needed.
Having the builder method for setting maxResults is a minor ergonomic improvement, e.g.
NativeSearchQuery searchQuery = NativeSearchQueryBuilder()
.withQuery(matchAllQuery())
.addAggregation(terms("examples").field("example"))
.withMaxResults(0)
.build();
versus what is required now:
NativeSearchQuery searchQuery = NativeSearchQueryBuilder()
.withQuery(matchAllQuery())
.addAggregation(terms("examples").field("example"))
.build();
searchQuery.setMaxResults(0);
Referenced from: pull request #561
The text was updated successfully, but these errors were encountered: