diff options
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/NexusRepositorySearch.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java index 09efd05d9..965aa49f4 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/main/java/org/apache/archiva/indexer/search/NexusRepositorySearch.java @@ -34,6 +34,9 @@ import org.apache.lucene.search.BooleanQuery; import org.apache.maven.index.ArtifactInfo; import org.apache.maven.index.FlatSearchRequest; import org.apache.maven.index.FlatSearchResponse; +import org.apache.maven.index.GroupedSearchRequest; +import org.apache.maven.index.Grouping; +import org.apache.maven.index.IteratorSearchRequest; import org.apache.maven.index.MAVEN; import org.apache.maven.index.NexusIndexer; import org.apache.maven.index.OSGI; @@ -235,8 +238,10 @@ public class NexusRepositorySearch { FlatSearchRequest request = new FlatSearchRequest( q ); request.setContexts( getIndexingContexts( indexingContextIds ) ); + FlatSearchResponse response = indexer.searchFlat( request ); + if ( response == null || response.getTotalHits() == 0 ) { SearchResults results = new SearchResults(); @@ -590,7 +595,7 @@ public class NexusRepositorySearch return true; } - private SearchResults paginate( SearchResults results ) + protected SearchResults paginate( SearchResults results ) { SearchResultLimits limits = results.getLimits(); SearchResults paginated = new SearchResults(); |