Skip to content

Commit

Permalink
HSEARCH-2843 Clear the cached results when changing the limit/offset …
Browse files Browse the repository at this point in the history
…of a query
  • Loading branch information
yrodiere committed Aug 17, 2017
1 parent c286a04 commit 28c85ff
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -197,6 +197,7 @@ public HSQuery projection(String... fields) {

@Override
public HSQuery firstResult(int firstResult) {
clearCachedResults();
if ( firstResult < 0 ) {
throw new IllegalArgumentException( "'first' pagination parameter less than 0" );
}
Expand All @@ -206,6 +207,7 @@ public HSQuery firstResult(int firstResult) {

@Override
public HSQuery maxResults(int maxResults) {
clearCachedResults();
if ( maxResults < 0 ) {
throw new IllegalArgumentException( "'max' pagination parameter less than 0" );
}
Expand Down

0 comments on commit 28c85ff

Please sign in to comment.