public interface IndexerService
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture |
addDocument(IndexerContext indexerContext,
org.apache.lucene.document.Document document)
Submit add document request
|
com.google.common.util.concurrent.ListenableFuture |
addDocuments(IndexerContext indexerContext,
Iterable<org.apache.lucene.document.Document> documents)
Submit add documents request
|
com.google.common.util.concurrent.ListenableFuture |
batchUpdate(IndexerContext indexerContext,
IndexerTask task)
Submit batch update request
|
IndexerContext |
createNewIndexerContext(com.atlassian.bonnie.ILuceneConnection connection)
Create new default indexer context.
|
com.google.common.util.concurrent.ListenableFuture |
deleteDocuments(IndexerContext indexerContext,
org.apache.lucene.index.Term term)
Submit delete documents request
|
void |
flushAndUnlockIndexerQueue(IndexerContext indexerContext)
Unlock indexer and submit for execution all operations that were queued while index was locked
|
<T> List<T> |
getMatchingDocuments(IndexerContext indexerContext,
IndexSearcherTask<T> task)
Submit a custom search task for execution
|
List<org.apache.lucene.document.Document> |
getMatchingDocuments(IndexerContext indexerContext,
org.apache.lucene.search.Query query)
Submit a document search query
|
IndexerContext |
lockIndexerQueue(com.atlassian.bonnie.ILuceneConnection connection)
Lock indexer and return a context that will allow executing operations while indexer is locked.
|
com.google.common.util.concurrent.ListenableFuture |
recreateIndexDirectory(IndexerContext indexerContext)
Submit recreate index directory request
|
com.google.common.util.concurrent.ListenableFuture |
updateDocument(IndexerContext indexerContext,
org.apache.lucene.index.Term term,
org.apache.lucene.document.Document document)
Submit update document request
|
@NotNull IndexerContext createNewIndexerContext(@NotNull com.atlassian.bonnie.ILuceneConnection connection)
connection
- Lucene connection@NotNull IndexerContext lockIndexerQueue(@NotNull com.atlassian.bonnie.ILuceneConnection connection)
connection
- Lucene connectionvoid flushAndUnlockIndexerQueue(@NotNull IndexerContext indexerContext)
indexerContext
- indexer context@NotNull List<org.apache.lucene.document.Document> getMatchingDocuments(@NotNull IndexerContext indexerContext, @NotNull org.apache.lucene.search.Query query)
indexerContext
- indexer contextquery
- query that will be executed on Lucene connection@NotNull <T> List<T> getMatchingDocuments(@NotNull IndexerContext indexerContext, @NotNull IndexSearcherTask<T> task)
indexerContext
- indexer contexttask
- search task to get executed@NotNull com.google.common.util.concurrent.ListenableFuture addDocument(@NotNull IndexerContext indexerContext, @NotNull org.apache.lucene.document.Document document)
indexerContext
- indexer contextdocument
- document to be added to index@NotNull com.google.common.util.concurrent.ListenableFuture addDocuments(@NotNull IndexerContext indexerContext, @NotNull Iterable<org.apache.lucene.document.Document> documents)
indexerContext
- indexer contextdocuments
- documents to be added to index@NotNull com.google.common.util.concurrent.ListenableFuture updateDocument(@NotNull IndexerContext indexerContext, @NotNull org.apache.lucene.index.Term term, @NotNull org.apache.lucene.document.Document document)
indexerContext
- indexer contextterm
- term that identifies document that is about to be updateddocument
- new document that will be added to index@NotNull com.google.common.util.concurrent.ListenableFuture deleteDocuments(@NotNull IndexerContext indexerContext, @NotNull org.apache.lucene.index.Term term)
indexerContext
- indexer contextterm
- term that identifies documents to be deleted@NotNull com.google.common.util.concurrent.ListenableFuture batchUpdate(@NotNull IndexerContext indexerContext, @NotNull IndexerTask task)
indexerContext
- indexer contexttask
- task to be executed within ILuceneConnection.withBatchUpdate(com.atlassian.bonnie.ILuceneConnection.BatchUpdateAction)
@NotNull com.google.common.util.concurrent.ListenableFuture recreateIndexDirectory(@NotNull IndexerContext indexerContext)
indexerContext
- indexer contextCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.