Package org.nuxeo.elasticsearch.core
Class ElasticSearchIndexingImpl
java.lang.Object
org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl
- All Implemented Interfaces:
ElasticSearchIndexing
- Since:
- 6.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.core.JsonFactory -
Constructor Summary
ConstructorsConstructorDescriptionElasticSearchIndexingImpl(ElasticSearchAdminImpl esa, JsonESDocumentWriter jsonESDocumentWriter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearScrollContext(org.opensearch.action.search.SearchResponse response) protected StringgetPathOfDocFromEs(String repository, String indexName, String docId) Returns the ecm:path of an ES document or null if not found.protected StringgetSecondaryWriteIndexForRepository(String repository) protected StringgetWriteIndexForRepository(String repository) voidindexNonRecursive(List<IndexingCommand> cmds) Same asElasticSearchIndexing.indexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand)but process the list command using a bulk request.voidProcess theIndexingCommand.protected voidprocessIndexRequest(String documentId, org.opensearch.action.index.IndexRequest request) voidreindexRepository(String repositoryName) Recreate an index and run an async reindexing worker.voidrunIndexingWorker(List<IndexingCommand> cmds) Run a worker to process theIndexingCommand.voidrunReindexingWorker(String repositoryName, String nxql, boolean syncAlias) Reindex documents matching the NXQL query, This is done in an asynchronous job.org.opensearch.common.bytes.BytesReferencesource(DocumentModel doc) Returns the JSON Elasticsearch source representation of a document.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.elasticsearch.api.ElasticSearchIndexing
runReindexingWorker
-
Field Details
-
JSON_FACTORY
protected static final com.fasterxml.jackson.core.JsonFactory JSON_FACTORY
-
-
Constructor Details
-
ElasticSearchIndexingImpl
-
ElasticSearchIndexingImpl
public ElasticSearchIndexingImpl(ElasticSearchAdminImpl esa, JsonESDocumentWriter jsonESDocumentWriter) - Since:
- 7.2
-
-
Method Details
-
runIndexingWorker
Description copied from interface:ElasticSearchIndexingRun 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.
- Specified by:
runIndexingWorkerin interfaceElasticSearchIndexing
-
runReindexingWorker
Description copied from interface:ElasticSearchIndexingReindex 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.- Specified by:
runReindexingWorkerin interfaceElasticSearchIndexing
-
reindexRepository
Description copied from interface:ElasticSearchIndexingRecreate an index and run an async reindexing worker.- Specified by:
reindexRepositoryin interfaceElasticSearchIndexing
-
indexNonRecursive
Description copied from interface:ElasticSearchIndexingSame asElasticSearchIndexing.indexNonRecursive(org.nuxeo.elasticsearch.commands.IndexingCommand)but process the list command using a bulk request.- Specified by:
indexNonRecursivein interfaceElasticSearchIndexing
-
indexNonRecursive
Description copied from interface:ElasticSearchIndexingProcess 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.
- Specified by:
indexNonRecursivein interfaceElasticSearchIndexing
-
processIndexRequest
protected void processIndexRequest(String documentId, org.opensearch.action.index.IndexRequest request) -
clearScrollContext
protected void clearScrollContext(org.opensearch.action.search.SearchResponse response) -
getPathOfDocFromEs
Returns the ecm:path of an ES document or null if not found.- Since:
- 2021.12
-
getWriteIndexForRepository
-
getSecondaryWriteIndexForRepository
-
source
Description copied from interface:ElasticSearchIndexingReturns the JSON Elasticsearch source representation of a document.- Specified by:
sourcein interfaceElasticSearchIndexing- Throws:
IOException
-