|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Manages Lucene search indexes.
Method Summary | |
long |
activate(String indexPath,
com.atlassian.johnson.event.Event appEvent)
Activates search indexes. |
void |
deactivate()
Deactivates indexing (as happens from the admin page) and removes index directories. |
void |
deactivate(String filePath)
Deactivate a specific search index and remove its directory. |
void |
deIndex(org.ofbiz.core.entity.GenericValue issue)
Remove an issue from the search index. |
Collection |
getAllIndexPaths()
Returns a Collection of String s, each respesenting a path to the issue index directory, comment
index directory and all existing plugin index directories. |
org.apache.lucene.search.IndexSearcher |
getCommentSearcher()
Get an IndexSearcher that can be used to search the comment index. |
Collection |
getExistingPluginsPaths()
Returns a collection of Strings, each one representing the absolute path to the actual existing directory where a plugin keeps its indexes. |
org.apache.lucene.search.IndexSearcher |
getIssueSearcher()
Get an IndexSearcher that can be used to search the issue index. |
String |
getPluginsRootPath()
Get the root path of the index directory for plugins. |
boolean |
isIndexingEnabled()
Is the indexing system enabled. |
long |
optimize()
Optimize the underlying indexes. |
void |
reIndex(org.ofbiz.core.entity.GenericValue issue)
Reindex an issue (eg. |
void |
reIndex(Issue issue)
Reindex an issue (eg. |
long |
reIndexAll()
Reindex all issues. |
long |
reIndexAll(com.atlassian.johnson.event.Event event)
Reindex all issues. |
long |
reIndexIssueObjects(Collection issueObjects)
Reindex a set of issues. |
long |
reIndexIssues(Collection issues)
Reindex a set of issues (GenericValues). |
long |
reIndexIssues(IssuesIterable issuesIterable,
com.atlassian.johnson.event.Event event)
Reindex a list of issues, passing an optional event that will be set progress |
void |
shutdown()
Shuts down the indexing manager and closes its resources (if any). |
Method Detail |
public boolean isIndexingEnabled()
public long reIndexAll() throws IndexException
IndexException
public long reIndexAll(com.atlassian.johnson.event.Event event) throws IndexException
event
- Reindex Event
that the caller has set (see source in IndexAdminImpl.doActivate()
).
IndexException
public void reIndex(org.ofbiz.core.entity.GenericValue issue) throws IndexException
IndexException
public long reIndexIssues(IssuesIterable issuesIterable, com.atlassian.johnson.event.Event event) throws IndexException
issuesIterable
- event
- Can be null, else progress will be sent to the event
IndexException
public void reIndex(Issue issue) throws IndexException
IndexException
public void deIndex(org.ofbiz.core.entity.GenericValue issue) throws IndexException
IndexException
public long reIndexIssues(Collection issues) throws IndexException
reIndexIssueObjects(Collection)
instead when possible.
issues
- The Issue GenericValue
s to reindex.
IndexException
public long reIndexIssueObjects(Collection issueObjects) throws IndexException
issueObjects
- Set of Issue
s to reindex.
IndexException
public String getPluginsRootPath()
public Collection getExistingPluginsPaths()
getPluginsRootPath()
.
If a plugin index root path does not exist, or is empty (no sub-directopries exist) then an empty collection will be returned.
public Collection getAllIndexPaths()
Collection
of String
s, each respesenting a path to the issue index directory, comment
index directory and all existing plugin index directories.
public org.apache.lucene.search.IndexSearcher getIssueSearcher()
IndexSearcher
that can be used to search the issue index.
Note: This is an unmanaged IndexSearcher. You MUST call IndexSearcher.close()
when you are done with it.
Alternatively you should really call SearchProviderFactory#getSearcher(String))
passing in
SearchProviderFactory.ISSUE_INDEX
as it is a managed searcher and all the closing semantics are handled
for you.
public org.apache.lucene.search.IndexSearcher getCommentSearcher()
IndexSearcher
that can be used to search the comment index.
Note: This is an unmanaged IndexSearcher. You MUST call IndexSearcher.close()
when you are done with it.
Alternatively you should really call SearchProviderFactory#getSearcher(String))
passing in
SearchProviderFactory.COMMENT_INDEX
as it is a managed searcher and all the closing semantics are handled
for you.
public void deactivate() throws Exception
Exception
public long optimize() throws IndexException
IndexException
- if the indexes are seriously in troublepublic long activate(String indexPath, com.atlassian.johnson.event.Event appEvent) throws Exception
indexPath
- Root path to the search index.appEvent
- Optional reindex Event
that the caller has set (see source in IndexAdminImpl.doActivate()
) or null.
Exception
public void deactivate(String filePath) throws Exception
Exception
public void shutdown()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |