mirror of https://github.com/apache/archiva.git
[MRM-1834] Add limit to index search query to prevent unnecessary
calculations
This commit is contained in:
parent
6790e2a82f
commit
c52eb2c042
|
@ -265,6 +265,7 @@ public class MavenRepositorySearch
|
||||||
FlatSearchRequest request = new FlatSearchRequest( q );
|
FlatSearchRequest request = new FlatSearchRequest( q );
|
||||||
|
|
||||||
request.setContexts( getIndexingContexts( indexingContextIds ) );
|
request.setContexts( getIndexingContexts( indexingContextIds ) );
|
||||||
|
request.setCount(limits.getPageSize()*(Math.max(1, limits.getSelectedPage())));
|
||||||
|
|
||||||
FlatSearchResponse response = indexer.searchFlat( request );
|
FlatSearchResponse response = indexer.searchFlat( request );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue