summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-indexer
diff options
context:
space:
mode:
authorSascha Vogt <s.vogt@seeburger.de>2014-04-23 15:42:46 +0200
committerOlivier Lamy <olamy@apache.org>2014-04-24 11:52:24 +1000
commitc52eb2c0426bd64cfbff925ea9b4070f395f9aa4 (patch)
tree5884def183313d86484a9d7608bc01a7153f85c2 /archiva-modules/archiva-base/archiva-indexer
parent6790e2a82fbf43eb407acfb8430f323f6a004bcd (diff)
downloadarchiva-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.java1
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 );