public class ElasticSearchIndexingImpl extends Object implements ElasticSearchIndexing
| Modifier and Type | Field and Description |
|---|---|
protected static com.fasterxml.jackson.core.JsonFactory |
JSON_FACTORY |
| Constructor and Description |
|---|
ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa) |
ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa,
JsonESDocumentWriter jsonESDocumentWriter) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getWriteIndexForRepository(String repository) |
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. |
void |
reindexRepository(String repositoryName)
Recreate an index and run an async reindexing worker.
|
void |
runIndexingWorker(List<IndexingCommand> cmds)
Run a worker to process the
IndexingCommand. |
void |
runReindexingWorker(String repositoryName,
String nxql,
boolean syncAlias)
Reindex documents matching the NXQL query, This is done in an asynchronous job.
|
org.elasticsearch.common.bytes.BytesReference |
source(DocumentModel doc)
Returns the JSON Elasticsearch source representation of a document.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunReindexingWorkerprotected static final com.fasterxml.jackson.core.JsonFactory JSON_FACTORY
public ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa)
public ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa, JsonESDocumentWriter jsonESDocumentWriter)
public void runIndexingWorker(List<IndexingCommand> cmds)
ElasticSearchIndexingIndexingCommand.
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 ElasticSearchIndexingpublic void runReindexingWorker(String repositoryName, String nxql, boolean syncAlias)
ElasticSearchIndexingrunReindexingWorker in interface ElasticSearchIndexingpublic void reindexRepository(String repositoryName)
ElasticSearchIndexingreindexRepository in interface ElasticSearchIndexingpublic void indexNonRecursive(List<IndexingCommand> cmds)
ElasticSearchIndexingElasticSearchIndexing.indexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand) but
process the list command using a bulk request.
indexNonRecursive in interface ElasticSearchIndexingpublic void indexNonRecursive(IndexingCommand cmd)
ElasticSearchIndexingIndexingCommand.
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 ElasticSearchIndexingprotected String getWriteIndexForRepository(String repository)
public org.elasticsearch.common.bytes.BytesReference source(DocumentModel doc) throws IOException
ElasticSearchIndexingsource in interface ElasticSearchIndexingIOExceptionCopyright © 2019 Nuxeo. All rights reserved.