[MRM-1834] Add limit to index search query to prevent unnecessary

calculations
This commit is contained in:
Sascha Vogt 2014-04-23 15:42:46 +02:00 committed by Olivier Lamy
parent 6790e2a82f
commit c52eb2c042
1 changed files with 1 additions and 0 deletions

View File

@ -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 );