diff options
author | Sascha Vogt <s.vogt@seeburger.de> | 2014-04-23 15:42:46 +0200 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-04-24 11:52:24 +1000 |
commit | c52eb2c0426bd64cfbff925ea9b4070f395f9aa4 (patch) | |
tree | 5884def183313d86484a9d7608bc01a7153f85c2 /archiva-modules/archiva-base/archiva-indexer | |
parent | 6790e2a82fbf43eb407acfb8430f323f6a004bcd (diff) | |
download | archiva-c52eb2c0426bd64cfbff925ea9b4070f395f9aa4.tar.gz archiva-c52eb2c0426bd64cfbff925ea9b4070f395f9aa4.zip |
[MRM-1834] Add limit to index search query to prevent unnecessary
calculations
Diffstat (limited to 'archiva-modules/archiva-base/archiva-indexer')
-rw-r--r-- | archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java index 235c8503b..1968cef02 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/MavenRepositorySearch.java @@ -265,6 +265,7 @@ public class MavenRepositorySearch FlatSearchRequest request = new FlatSearchRequest( q ); request.setContexts( getIndexingContexts( indexingContextIds ) ); + request.setCount(limits.getPageSize()*(Math.max(1, limits.getSelectedPage()))); FlatSearchResponse response = indexer.searchFlat( request ); |