Package org.apache.maven.index
Class DefaultSearchEngine
java.lang.Object
org.apache.maven.index.DefaultSearchEngine
- All Implemented Interfaces:
- SearchEngine
A default search engine implementation
- Author:
- Eugene Kuleshov, Tamas Cservenak
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected org.apache.lucene.search.TopScoreDocCollectordoSearchWithCeiling(AbstractSearchRequest request, org.apache.lucene.search.IndexSearcher indexSearcher, org.apache.lucene.search.Query query) forceSearchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search in all contexts, no matter if the context is searchable or notforceSearchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search in all contexts, no matter if the context is searchable or notforceSearchIteratorPaged(IteratorSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search in all contexts, no matter if the context is searchable or notprotected org.slf4j.Loggerprotected NexusIndexMultiReadergetMergedIndexReader(Collection<IndexingContext> indexingContexts, boolean ignoreContext) Locks down participating contexts, and returns a "merged" reader of them.protected List<IndexingContext> getParticipatingContexts(Collection<IndexingContext> indexingContexts, boolean ignoreContext) Returns the list of participating contexts.protected intgetTopDocsCollectorHitNum(AbstractSearchRequest request, int ceiling) searchFlat(Comparator<ArtifactInfo> artifactInfoComparator, Collection<IndexingContext> indexingContexts, org.apache.lucene.search.Query query) Deprecated.searchFlat(Comparator<ArtifactInfo> artifactInfoComparator, IndexingContext indexingContext, org.apache.lucene.search.Query query) Deprecated.protected intsearchFlat(FlatSearchRequest req, Collection<ArtifactInfo> result, List<IndexingContext> participatingContexts, org.apache.lucene.search.Query query) searchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search only on searchable contextsprotected FlatSearchResponsesearchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts, boolean ignoreContext) searchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search only on searchable contextsprotected GroupedSearchResponsesearchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts, boolean ignoreContext) protected intsearchGrouped(GroupedSearchRequest req, Map<String, ArtifactInfoGroup> result, Grouping grouping, List<IndexingContext> participatingContexts, org.apache.lucene.search.Query query) searchIteratorPaged(IteratorSearchRequest request, Collection<IndexingContext> indexingContexts) Do the search only on searchable contexts
- 
Constructor Details- 
DefaultSearchEnginepublic DefaultSearchEngine()
 
- 
- 
Method Details- 
getLoggerprotected org.slf4j.Logger getLogger()
- 
searchFlat@Deprecated public Set<ArtifactInfo> searchFlat(Comparator<ArtifactInfo> artifactInfoComparator, IndexingContext indexingContext, org.apache.lucene.search.Query query) throws IOException Deprecated.- Specified by:
- searchFlatin interface- SearchEngine
- Throws:
- IOException
 
- 
searchFlat@Deprecated public Set<ArtifactInfo> searchFlat(Comparator<ArtifactInfo> artifactInfoComparator, Collection<IndexingContext> indexingContexts, org.apache.lucene.search.Query query) throws IOException Deprecated.- Specified by:
- searchFlatin interface- SearchEngine
- Throws:
- IOException
 
- 
searchFlatPagedpublic FlatSearchResponse searchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search only on searchable contexts- Specified by:
- searchFlatPagedin interface- SearchEngine
- Throws:
- IOException
 
- 
forceSearchFlatPagedpublic FlatSearchResponse forceSearchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search in all contexts, no matter if the context is searchable or not- Specified by:
- forceSearchFlatPagedin interface- SearchEngine
- Throws:
- IOException
 
- 
searchFlatPagedprotected FlatSearchResponse searchFlatPaged(FlatSearchRequest request, Collection<IndexingContext> indexingContexts, boolean ignoreContext) throws IOException - Throws:
- IOException
 
- 
searchGroupedpublic GroupedSearchResponse searchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search only on searchable contexts- Specified by:
- searchGroupedin interface- SearchEngine
- Throws:
- IOException
 
- 
forceSearchGroupedpublic GroupedSearchResponse forceSearchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search in all contexts, no matter if the context is searchable or not- Specified by:
- forceSearchGroupedin interface- SearchEngine
- Throws:
- IOException
 
- 
searchGroupedprotected GroupedSearchResponse searchGrouped(GroupedSearchRequest request, Collection<IndexingContext> indexingContexts, boolean ignoreContext) throws IOException - Throws:
- IOException
 
- 
searchFlatprotected int searchFlat(FlatSearchRequest req, Collection<ArtifactInfo> result, List<IndexingContext> participatingContexts, org.apache.lucene.search.Query query) throws IOException - Throws:
- IOException
 
- 
searchGroupedprotected int searchGrouped(GroupedSearchRequest req, Map<String, ArtifactInfoGroup> result, Grouping grouping, List<IndexingContext> participatingContexts, org.apache.lucene.search.Query query) throws IOException- Throws:
- IOException
 
- 
searchIteratorPagedpublic IteratorSearchResponse searchIteratorPaged(IteratorSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search only on searchable contexts- Specified by:
- searchIteratorPagedin interface- SearchEngine
- Throws:
- IOException
 
- 
forceSearchIteratorPagedpublic IteratorSearchResponse forceSearchIteratorPaged(IteratorSearchRequest request, Collection<IndexingContext> indexingContexts) throws IOException Description copied from interface:SearchEngineDo the search in all contexts, no matter if the context is searchable or not- Specified by:
- forceSearchIteratorPagedin interface- SearchEngine
- Throws:
- IOException
 
- 
doSearchWithCeilingprotected org.apache.lucene.search.TopScoreDocCollector doSearchWithCeiling(AbstractSearchRequest request, org.apache.lucene.search.IndexSearcher indexSearcher, org.apache.lucene.search.Query query) throws IOException - Throws:
- IOException
 
- 
getParticipatingContextsprotected List<IndexingContext> getParticipatingContexts(Collection<IndexingContext> indexingContexts, boolean ignoreContext) Returns the list of participating contexts. Does not locks them, just builds a list of them.
- 
getMergedIndexReaderprotected NexusIndexMultiReader getMergedIndexReader(Collection<IndexingContext> indexingContexts, boolean ignoreContext) throws IOException Locks down participating contexts, and returns a "merged" reader of them. In case of error, unlocks as part of cleanup and re-throws exception. Without error, it is the duty of caller to unlock contexts!- Parameters:
- indexingContexts-
- ignoreContext-
- Returns:
- Throws:
- IOException
 
- 
getTopDocsCollectorHitNum
 
-