|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.index.context.AbstractIndexingContext org.apache.maven.index.context.MergedIndexingContext
public class MergedIndexingContext
A merged indexing context that offers read only "view" on multiple other indexing contexts merged and presented as one. Usable for searching and publishing, but all write operations are basically noop.
Field Summary |
---|
Fields inherited from interface org.apache.maven.index.context.IndexingContext |
---|
INDEX_CHAIN_ID, INDEX_CHUNK_COUNTER, INDEX_CHUNK_PREFIX, INDEX_FILE_PREFIX, INDEX_ID, INDEX_LEGACY_TIMESTAMP, INDEX_PACKER_PROPERTIES_FILE, INDEX_PROPERTY_PREFIX, INDEX_REMOTE_PROPERTIES_FILE, INDEX_TIME_DAY_FORMAT, INDEX_TIME_FORMAT, INDEX_TIMESTAMP, INDEX_UPDATER_PROPERTIES_FILE |
Constructor Summary | |
---|---|
MergedIndexingContext(String id,
String repositoryId,
File repository,
org.apache.lucene.store.Directory indexDirectory,
boolean searchable,
ContextMemberProvider membersProvider)
|
|
MergedIndexingContext(String id,
String repositoryId,
File repository,
File indexDirectoryFile,
boolean searchable,
ContextMemberProvider membersProvider)
|
Method Summary | |
---|---|
void |
close(boolean deleteFiles)
Shuts down this context. |
void |
commit()
Commits changes to context, eventually refreshing readers/searchers too. |
Set<String> |
getAllGroups()
Gets all group names stored in the current indexing context |
org.apache.lucene.analysis.Analyzer |
getAnalyzer()
Returns the Lucene Analyzer of this context used for by IndexWriter and IndexSearcher. |
GavCalculator |
getGavCalculator()
Returns the GavCalculator for this Context. |
String |
getId()
Returns this indexing context id. |
List<IndexCreator> |
getIndexCreators()
List of IndexCreators used in this context. |
org.apache.lucene.store.Directory |
getIndexDirectory()
|
File |
getIndexDirectoryFile()
|
org.apache.lucene.index.IndexReader |
getIndexReader()
Returns the Lucene IndexReader of this context. |
org.apache.lucene.search.IndexSearcher |
getIndexSearcher()
Returns the Lucene IndexSearcher of this context. |
String |
getIndexUpdateUrl()
Returns url for the index update |
org.apache.lucene.index.IndexWriter |
getIndexWriter()
Returns the Lucene IndexWriter of this context. |
Collection<IndexingContext> |
getMembers()
|
File |
getRepository()
Returns location for the local repository. |
String |
getRepositoryId()
Returns repository id. |
String |
getRepositoryUrl()
Returns public repository url. |
Set<String> |
getRootGroups()
Gets root group names stored in the current indexing context |
int |
getSize()
Returns a number that represents the "size" useful for doing comparisons between contexts (which one has more data indexed?). |
Date |
getTimestamp()
Returns index update time |
boolean |
isSearchable()
Is the context searchable when doing "non-targeted" searches? |
void |
lock()
Performs a shared locking on this context, guaranteeing that no IndexReader/Searcher/Writer close will occur. |
void |
merge(org.apache.lucene.store.Directory directory)
Merges content of given Lucene directory with this context. |
void |
merge(org.apache.lucene.store.Directory directory,
DocumentFilter filter)
Merges content of given Lucene directory with this context, but filters out the unwanted ones. |
void |
optimize()
Optimizes index |
void |
purge()
Purge (cleans) the context, deletes/empties the index and restores the context to new/empty state. |
void |
rebuildGroups()
Rebuilds stored group names from the index |
void |
replace(org.apache.lucene.store.Directory directory)
Replaces the Lucene index with the one from supplied directory. |
void |
rollback()
Rolls back changes to context, eventually refreshing readers/searchers too. |
void |
setAllGroups(Collection<String> groups)
Sets all group names stored in the current indexing context |
void |
setRootGroups(Collection<String> groups)
Sets root group names stored in the current indexing context |
void |
setSearchable(boolean searchable)
Sets is the context searchable when doing "non-targeted" searches. |
void |
unlock()
Releases the shared lock on this context. |
void |
updateTimestamp()
|
void |
updateTimestamp(boolean save)
|
void |
updateTimestamp(boolean save,
Date date)
|
Methods inherited from class org.apache.maven.index.context.AbstractIndexingContext |
---|
isReceivingUpdates |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MergedIndexingContext(String id, String repositoryId, File repository, File indexDirectoryFile, boolean searchable, ContextMemberProvider membersProvider) throws IOException
IOException
public MergedIndexingContext(String id, String repositoryId, File repository, org.apache.lucene.store.Directory indexDirectory, boolean searchable, ContextMemberProvider membersProvider) throws IOException
IOException
Method Detail |
---|
public Collection<IndexingContext> getMembers()
public String getId()
IndexingContext
public String getRepositoryId()
IndexingContext
public File getRepository()
IndexingContext
public String getRepositoryUrl()
IndexingContext
public String getIndexUpdateUrl()
IndexingContext
public boolean isSearchable()
IndexingContext
public void setSearchable(boolean searchable)
IndexingContext
public Date getTimestamp()
IndexingContext
public void updateTimestamp() throws IOException
IOException
public void updateTimestamp(boolean save) throws IOException
IOException
public void updateTimestamp(boolean save, Date date) throws IOException
IOException
public int getSize() throws IOException
IndexingContext
IOException
public org.apache.lucene.index.IndexReader getIndexReader() throws IOException
IndexingContext
IOException
public org.apache.lucene.search.IndexSearcher getIndexSearcher() throws IOException
IndexingContext
IOException
public org.apache.lucene.index.IndexWriter getIndexWriter() throws IOException
IndexingContext
IOException
public List<IndexCreator> getIndexCreators()
IndexingContext
public org.apache.lucene.analysis.Analyzer getAnalyzer()
IndexingContext
public void commit() throws IOException
IndexingContext
IOException
public void rollback() throws IOException
IndexingContext
IOException
public void optimize() throws IOException
IndexingContext
IOException
public void lock()
IndexingContext
public void unlock()
IndexingContext
public void close(boolean deleteFiles) throws IOException
IndexingContext
IOException
public void purge() throws IOException
IndexingContext
IOException
public void merge(org.apache.lucene.store.Directory directory) throws IOException
IndexingContext
directory
- - the directory to merge
IOException
public void merge(org.apache.lucene.store.Directory directory, DocumentFilter filter) throws IOException
IndexingContext
directory
- - the directory to merge
IOException
public void replace(org.apache.lucene.store.Directory directory) throws IOException
IndexingContext
IOException
public org.apache.lucene.store.Directory getIndexDirectory()
public File getIndexDirectoryFile()
public GavCalculator getGavCalculator()
IndexingContext
public void setAllGroups(Collection<String> groups) throws IOException
IndexingContext
IOException
public Set<String> getAllGroups() throws IOException
IndexingContext
IOException
public void setRootGroups(Collection<String> groups) throws IOException
IndexingContext
IOException
public Set<String> getRootGroups() throws IOException
IndexingContext
IOException
public void rebuildGroups() throws IOException
IndexingContext
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |