Indexer instead. Discouraged from further use, as it suffers from multiple synchronization
and other problems. As it tries to serve as "context registry" too, but it does not synchronize the
access to it, but also, introduces some extras (like "targeted" vs "non targeted" search), that makes
it's behavior less intuitive.@Deprecated @Component(role=NexusIndexer.class) public class DefaultNexusIndexer extends org.codehaus.plexus.logging.AbstractLogEnabled implements NexusIndexer
NexusIndexer implementation.ROLE| Constructor and Description |
|---|
DefaultNexusIndexer()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArtifactsToIndex(Collection<ArtifactContext> acs,
IndexingContext context)
Deprecated.
|
void |
addArtifactToIndex(ArtifactContext ac,
IndexingContext context)
Deprecated.
Delegates to the
IndexerEngine to update artifact to the index |
void |
addIndexingContext(IndexingContext context)
Deprecated.
Adds an indexing context to Nexus indexer.
|
IndexingContext |
addIndexingContext(String id,
String repositoryId,
File repository,
org.apache.lucene.store.Directory directory,
String repositoryUrl,
String indexUpdateUrl,
List<? extends IndexCreator> indexers)
Deprecated.
Adds an indexing context to Nexus indexer.
|
IndexingContext |
addIndexingContext(String id,
String repositoryId,
File repository,
File indexDirectory,
String repositoryUrl,
String indexUpdateUrl,
List<? extends IndexCreator> indexers)
Deprecated.
Adds an indexing context to Nexus indexer.
|
IndexingContext |
addIndexingContextForced(String id,
String repositoryId,
File repository,
org.apache.lucene.store.Directory directory,
String repositoryUrl,
String indexUpdateUrl,
List<? extends IndexCreator> indexers)
Deprecated.
Adds an indexing context to Nexus indexer.
|
IndexingContext |
addIndexingContextForced(String id,
String repositoryId,
File repository,
File indexDirectory,
String repositoryUrl,
String indexUpdateUrl,
List<? extends IndexCreator> indexers)
Deprecated.
Adds an indexing context to Nexus indexer.
|
IndexingContext |
addMergedIndexingContext(String id,
String repositoryId,
File repository,
org.apache.lucene.store.Directory indexDirectory,
boolean searchable,
Collection<IndexingContext> contexts)
Deprecated.
|
IndexingContext |
addMergedIndexingContext(String id,
String repositoryId,
File repository,
org.apache.lucene.store.Directory indexDirectory,
boolean searchable,
ContextMemberProvider membersProvider)
Deprecated.
|
IndexingContext |
addMergedIndexingContext(String id,
String repositoryId,
File repository,
File indexDirectory,
boolean searchable,
Collection<IndexingContext> contexts)
Deprecated.
|
IndexingContext |
addMergedIndexingContext(String id,
String repositoryId,
File repository,
File indexDirectory,
boolean searchable,
ContextMemberProvider membersProvider)
Deprecated.
|
void |
artifactDiscovered(ArtifactContext ac,
IndexingContext context)
Deprecated.
Delegates to the
IndexerEngine to add a new artifact to the index |
org.apache.lucene.search.Query |
constructQuery(Field field,
SearchExpression expression)
Deprecated.
Helper method to construct Lucene query for given field without need for knowledge (on caller side) HOW is a
field indexed, and WHAT query is needed to achieve that.
|
org.apache.lucene.search.Query |
constructQuery(Field field,
String query,
SearchType type)
Deprecated.
|
void |
deleteArtifactFromIndex(ArtifactContext ac,
IndexingContext context)
Deprecated.
Delegates to the
IndexerEngine to remove artifact from the index |
void |
deleteArtifactsFromIndex(Collection<ArtifactContext> acs,
IndexingContext context)
Deprecated.
|
Map<String,IndexingContext> |
getIndexingContexts()
Deprecated.
Returns the map of indexing contexts keyed by their ID.
|
Collection<ArtifactInfo> |
identify(Field field,
String query)
Deprecated.
|
Collection<ArtifactInfo> |
identify(File artifact)
Deprecated.
|
Collection<ArtifactInfo> |
identify(File artifact,
Collection<IndexingContext> contexts)
Deprecated.
|
Collection<ArtifactInfo> |
identify(org.apache.lucene.search.Query query)
Deprecated.
|
Collection<ArtifactInfo> |
identify(org.apache.lucene.search.Query query,
Collection<IndexingContext> contexts)
Deprecated.
|
void |
removeIndexingContext(IndexingContext context,
boolean deleteFiles)
Deprecated.
Removes the indexing context from Nexus indexer, closes it and deletes (if specified) the index files.
|
void |
scan(IndexingContext context)
Deprecated.
Performs full scan (reindex) for the local repository belonging to supplied context.
|
void |
scan(IndexingContext context,
ArtifactScanningListener listener)
Deprecated.
Performs full scan (reindex) for the local repository belonging to supplied context.
|
void |
scan(IndexingContext context,
ArtifactScanningListener listener,
boolean update)
Deprecated.
Performs optionally incremental scan (reindex) for the local repository, with listener.
|
void |
scan(IndexingContext context,
boolean update)
Deprecated.
Performs optionally incremental scan (reindex/full reindex) for the local repository belonging to the supplied
context.
|
void |
scan(IndexingContext context,
String fromPath,
ArtifactScanningListener listener,
boolean update)
Deprecated.
Uses
Scanner to scan repository content. |
FlatSearchResponse |
searchFlat(FlatSearchRequest request)
Deprecated.
Searches according the request parameters.
|
GroupedSearchResponse |
searchGrouped(GroupedSearchRequest request)
Deprecated.
Searches according the request parameters.
|
IteratorSearchResponse |
searchIterator(IteratorSearchRequest request)
Deprecated.
Searches according to request parameters.
|
public void addIndexingContext(IndexingContext context)
NexusIndexeraddIndexingContext in interface NexusIndexerpublic IndexingContext addIndexingContext(String id, String repositoryId, File repository, File indexDirectory, String repositoryUrl, String indexUpdateUrl, List<? extends IndexCreator> indexers) throws IOException, UnsupportedExistingLuceneIndexException
NexusIndexeraddIndexingContext in interface NexusIndexerid - the ID of the context.repositoryId - the ID of the repository that this context represents.repository - the location of the repository.indexDirectory - the location of the Lucene indexes.repositoryUrl - the location of the remote repository.indexUpdateUrl - the alternate location of the remote repository indexes (if they are not in default place).indexers - the set of indexers to apply to this context.IOException - in case of some serious IO problem.UnsupportedExistingLuceneIndexException - if a Lucene index already exists where location is specified, but
it has no Nexus descriptor record or it has, but the embedded repoId differs from the repoId
specified from the supplied one.public IndexingContext addIndexingContextForced(String id, String repositoryId, File repository, File indexDirectory, String repositoryUrl, String indexUpdateUrl, List<? extends IndexCreator> indexers) throws IOException
NexusIndexeraddIndexingContextForced in interface NexusIndexerid - the ID of the context.repositoryId - the ID of the repository that this context represents.repository - the location of the repository.indexDirectory - the location of the Lucene indexes.repositoryUrl - the location of the remote repository.indexUpdateUrl - the alternate location of the remote repository indexes (if they are not in default place).indexers - the set of indexers to apply to this context.IOException - in case of some serious IO problem.public IndexingContext addIndexingContext(String id, String repositoryId, File repository, org.apache.lucene.store.Directory directory, String repositoryUrl, String indexUpdateUrl, List<? extends IndexCreator> indexers) throws IOException, UnsupportedExistingLuceneIndexException
NexusIndexeraddIndexingContext in interface NexusIndexerid - the ID of the context.repositoryId - the ID of the repository that this context represents.repository - the location of the repository.directory - the location of the Lucene indexes.repositoryUrl - the location of the remote repository.indexUpdateUrl - the alternate location of the remote repository indexes (if they are not in default place).indexers - the set of indexers to apply to this context.IOException - in case of some serious IO problem.UnsupportedExistingLuceneIndexException - if a Lucene index already exists where location is specified, but
it has no Nexus descriptor record or it has, but the embedded repoId differs from the repoId
specified from the supplied one.public IndexingContext addIndexingContextForced(String id, String repositoryId, File repository, org.apache.lucene.store.Directory directory, String repositoryUrl, String indexUpdateUrl, List<? extends IndexCreator> indexers) throws IOException
NexusIndexeraddIndexingContextForced in interface NexusIndexerid - the ID of the context.repositoryId - the ID of the repository that this context represents.repository - the location of the repository.directory - the location of the Lucene indexes.repositoryUrl - the location of the remote repository.indexUpdateUrl - the alternate location of the remote repository indexes (if they are not in default place).indexers - the set of indexers to apply to this context.IOException - in case of some serious IO problem.public IndexingContext addMergedIndexingContext(String id, String repositoryId, File repository, File indexDirectory, boolean searchable, Collection<IndexingContext> contexts) throws IOException
addMergedIndexingContext in interface NexusIndexerIOExceptionpublic IndexingContext addMergedIndexingContext(String id, String repositoryId, File repository, File indexDirectory, boolean searchable, ContextMemberProvider membersProvider) throws IOException
addMergedIndexingContext in interface NexusIndexerIOExceptionpublic IndexingContext addMergedIndexingContext(String id, String repositoryId, File repository, org.apache.lucene.store.Directory indexDirectory, boolean searchable, Collection<IndexingContext> contexts) throws IOException
addMergedIndexingContext in interface NexusIndexerIOExceptionpublic IndexingContext addMergedIndexingContext(String id, String repositoryId, File repository, org.apache.lucene.store.Directory indexDirectory, boolean searchable, ContextMemberProvider membersProvider) throws IOException
addMergedIndexingContext in interface NexusIndexerIOExceptionpublic void removeIndexingContext(IndexingContext context, boolean deleteFiles) throws IOException
NexusIndexerremoveIndexingContext in interface NexusIndexerIOExceptionpublic Map<String,IndexingContext> getIndexingContexts()
NexusIndexergetIndexingContexts in interface NexusIndexerpublic void scan(IndexingContext context) throws IOException
NexusIndexerscan in interface NexusIndexerIOExceptionpublic void scan(IndexingContext context, boolean update) throws IOException
NexusIndexerscan in interface NexusIndexerupdate - if incremental reindex wanted, set true, otherwise false and full reindex will happenIOExceptionpublic void scan(IndexingContext context, ArtifactScanningListener listener) throws IOException
NexusIndexerscan in interface NexusIndexerIOExceptionpublic void scan(IndexingContext context, ArtifactScanningListener listener, boolean update) throws IOException
NexusIndexerscan in interface NexusIndexerupdate - if incremental reindex wanted, set true, otherwise false and full reindex will happenIOExceptionpublic void scan(IndexingContext context, String fromPath, ArtifactScanningListener listener, boolean update) throws IOException
Scanner to scan repository content. A ArtifactScanningListener is used to process found
artifacts and to add them to the index using
NexusIndexer.artifactDiscovered(ArtifactContext, IndexingContext).scan in interface NexusIndexerfromPath - a path segment if you want "sub-path" reindexing (ie. reindex just a given subfolder of a
repository, ot whole repository from root.update - if incremental reindex wanted, set true, otherwise false and full reindex will happenIOExceptionDefaultScannerListener,
artifactDiscovered(ArtifactContext, IndexingContext)public void artifactDiscovered(ArtifactContext ac, IndexingContext context) throws IOException
IndexerEngine to add a new artifact to the indexartifactDiscovered in interface NexusIndexerIOExceptionpublic void addArtifactToIndex(ArtifactContext ac, IndexingContext context) throws IOException
IndexerEngine to update artifact to the indexaddArtifactToIndex in interface NexusIndexerIOExceptionpublic void addArtifactsToIndex(Collection<ArtifactContext> acs, IndexingContext context) throws IOException
addArtifactsToIndex in interface NexusIndexerIOExceptionpublic void deleteArtifactFromIndex(ArtifactContext ac, IndexingContext context) throws IOException
IndexerEngine to remove artifact from the indexdeleteArtifactFromIndex in interface NexusIndexerIOExceptionpublic void deleteArtifactsFromIndex(Collection<ArtifactContext> acs, IndexingContext context) throws IOException
deleteArtifactsFromIndex in interface NexusIndexerIOExceptionpublic FlatSearchResponse searchFlat(FlatSearchRequest request) throws IOException
NexusIndexersearchFlat in interface NexusIndexerIOExceptionpublic IteratorSearchResponse searchIterator(IteratorSearchRequest request) throws IOException
NexusIndexersearchIterator in interface NexusIndexerIOExceptionpublic GroupedSearchResponse searchGrouped(GroupedSearchRequest request) throws IOException
NexusIndexersearchGrouped in interface NexusIndexerIOException@Deprecated public org.apache.lucene.search.Query constructQuery(Field field, String query, SearchType type) throws IllegalArgumentException
NexusIndexerconstructQuery in interface NexusIndexerIllegalArgumentExceptionpublic org.apache.lucene.search.Query constructQuery(Field field, SearchExpression expression) throws IllegalArgumentException
NexusIndexerconstructQuery in interface NexusIndexerIllegalArgumentExceptionpublic Collection<ArtifactInfo> identify(Field field, String query) throws IllegalArgumentException, IOException
identify in interface NexusIndexerIllegalArgumentExceptionIOExceptionpublic Collection<ArtifactInfo> identify(File artifact) throws IOException
identify in interface NexusIndexerIOExceptionpublic Collection<ArtifactInfo> identify(File artifact, Collection<IndexingContext> contexts) throws IOException
identify in interface NexusIndexerIOExceptionpublic Collection<ArtifactInfo> identify(org.apache.lucene.search.Query query) throws IOException
identify in interface NexusIndexerIOExceptionpublic Collection<ArtifactInfo> identify(org.apache.lucene.search.Query query, Collection<IndexingContext> contexts) throws IOException
identify in interface NexusIndexerIOExceptionCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.