public class ElasticSearchIndexingImpl extends Object implements ElasticSearchIndexing
Constructor and Description |
---|
ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa) |
ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa,
JsonESDocumentWriter jsonESDocumentWriter) |
Modifier and Type | Method and Description |
---|---|
void |
indexNonRecursive(IndexingCommand cmd)
Process the
IndexingCommand . |
void |
indexNonRecursive(List<IndexingCommand> cmds)
Same as
ElasticSearchIndexing.indexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand) but
process the list command using a bulk request. |
boolean |
isAlreadyScheduled(IndexingCommand cmd)
{true} if a command has already been submitted for indexing.
|
void |
runIndexingWorker(List<IndexingCommand> cmds)
Run a worker to process the
IndexingCommand . |
void |
runReindexingWorker(String repositoryName,
String nxql)
Reindex documents matching the NXQL query, This is asynchronous.
|
public ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa)
public ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa, JsonESDocumentWriter jsonESDocumentWriter)
public void runIndexingWorker(List<IndexingCommand> cmds)
ElasticSearchIndexing
IndexingCommand
.
Asynchronous command schedules an indexing job and return.
Synchronous command execute an indexing job using a new Tx then refresh the index so the document is searchable immediately. if the command is also recursive the children are processed asynchronously.
If there is more than one cmd the elasticsearch request is done in bulk mode.
runIndexingWorker
in interface ElasticSearchIndexing
public void runReindexingWorker(String repositoryName, String nxql)
ElasticSearchIndexing
runReindexingWorker
in interface ElasticSearchIndexing
public void indexNonRecursive(List<IndexingCommand> cmds) throws ClientException
ElasticSearchIndexing
ElasticSearchIndexing.indexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand)
but
process the list command using a bulk request.indexNonRecursive
in interface ElasticSearchIndexing
ClientException
public void indexNonRecursive(IndexingCommand cmd) throws ClientException
ElasticSearchIndexing
IndexingCommand
.
Send indexing command to Elasticsearch, if the command is synchronous the index is refreshed so the document is searchable immediately. Recursive indexing is not taken in account except for deletion. This is not a transactional operation, a rollback will not discard the executed commands.
indexNonRecursive
in interface ElasticSearchIndexing
ClientException
public boolean isAlreadyScheduled(IndexingCommand cmd)
ElasticSearchIndexing
isAlreadyScheduled
in interface ElasticSearchIndexing
Copyright © 2015 Nuxeo SA. All rights reserved.