Package org.nuxeo.elasticsearch.api
Interface ElasticSearchIndexing
-
- All Known Implementing Classes:
ElasticSearchComponent
,ElasticSearchIndexingImpl
public interface ElasticSearchIndexing
Interface to process indexing of documents- Since:
- 5.9.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
indexNonRecursive(List<IndexingCommand> cmds)
Same asindexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand)
but process the list command using a bulk request.void
indexNonRecursive(IndexingCommand cmd)
Process theIndexingCommand
.void
reindexRepository(String repositoryName)
Recreate an index and run an async reindexing worker.void
runIndexingWorker(List<IndexingCommand> cmds)
Run a worker to process theIndexingCommand
.default void
runReindexingWorker(String repositoryName, String nxql)
Reindex documents matching the NXQL query, This is done in an asynchronous job.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.
-
-
-
Method Detail
-
runIndexingWorker
void runIndexingWorker(List<IndexingCommand> cmds)
Run a worker to process theIndexingCommand
.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.
- Since:
- 7.1
-
runReindexingWorker
default void runReindexingWorker(String repositoryName, String nxql)
Reindex documents matching the NXQL query, This is done in an asynchronous job.- Since:
- 7.1
-
runReindexingWorker
void runReindexingWorker(String repositoryName, String nxql, boolean syncAlias)
Reindex documents matching the NXQL query, This is done in an asynchronous job. When syncAlias is true a call is made to sync the search alias with write alias once indexing is done.- Since:
- 9.3
-
reindexRepository
void reindexRepository(String repositoryName)
Recreate an index and run an async reindexing worker.- Since:
- 9.3
-
indexNonRecursive
void indexNonRecursive(IndexingCommand cmd)
Process theIndexingCommand
.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.
- Since:
- 7.1
-
indexNonRecursive
void indexNonRecursive(List<IndexingCommand> cmds)
Same asindexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand)
but process the list command using a bulk request.- Since:
- 7.1
-
source
org.elasticsearch.common.bytes.BytesReference source(DocumentModel doc) throws IOException
Returns the JSON Elasticsearch source representation of a document.- Throws:
IOException
- Since:
- 10.3
-
-