Interface ElasticSearchAdmin

    • Method Detail

      • getClient

        ESClient getClient()
        Retrieves the Client that can be used to access Elasticsearch API
        Since:
        5.9.3
      • initIndexes

        void initIndexes​(boolean dropIfExists)
        Initialize Elasticsearch indexes. Setup the index settings and mapping for each index that has been registered.
        Parameters:
        dropIfExists - if {true} remove an existing index
        Since:
        5.9.3
      • dropAndInitIndex

        void dropAndInitIndex​(String indexName)
        Reinitialize an index. This will drop the existing index, recreate it with its settings and mapping, the index will be empty.
        Since:
        7.3
      • dropAndInitRepositoryIndex

        default void dropAndInitRepositoryIndex​(String repositoryName)
        Reinitialize the index of a repository. This will drop the existing index, recreate it with its settings and mapping, the index will be empty.
        Since:
        7.1
      • dropAndInitRepositoryIndex

        void dropAndInitRepositoryIndex​(String repositoryName,
                                        boolean syncAlias)
        Reinitialize the index of a repository. This will drop the existing index, recreate it with its settings and mapping, the index will be empty. When syncAlias is false then search alias is not updated with the new index, you need to explicitly call syncSearchAndWriteAlias(String)
        Since:
        9.3
      • syncSearchAndWriteAlias

        void syncSearchAndWriteAlias​(String searchIndexName)
        Make sure that the search alias point to the same index as the write alias.
        Since:
        9.3
      • isIndexingInProgress

        boolean isIndexingInProgress()
        Returns true if there are indexing activities scheduled or running.
        Since:
        5.9.5
      • prepareWaitForIndexing

        com.google.common.util.concurrent.ListenableFuture<BooleanprepareWaitForIndexing()
        A Future that accepts callback on completion when all the indexing worker are done.
        Since:
        7.2
      • refresh

        void refresh()
        Refresh all document indexes, immediately after the operation occurs, so that the updated document appears in search results immediately. There is no fsync thus doesn't guarantee durability.
        Since:
        5.9.3
      • refreshRepositoryIndex

        void refreshRepositoryIndex​(String repositoryName)
        Refresh document index for the specific repository, immediately after the operation occurs, so that the updated document appears in search results immediately. There is no fsync thus doesn't guarantee durability.
        Since:
        5.9.4
      • flush

        void flush()
        Elasticsearch flush on all document indexes, triggers a lucene commit, empties the transaction log. Data is flushed to disk.
        Since:
        5.9.3
      • flushRepositoryIndex

        void flushRepositoryIndex​(String repositoryName)
        Elasticsearch flush on document index for a specific repository, triggers a lucene commit, empties the transaction log. Data is flushed to disk.
        Since:
        5.9.4
      • optimizeRepositoryIndex

        void optimizeRepositoryIndex​(String repositoryName)
        Elasticsearch optimize operation allows to reduce the number of segments to one, Note that this can potentially be a very heavy operation.
        Since:
        7.2
      • optimizeIndex

        void optimizeIndex​(String indexName)
        Elasticsearch optimize operation allows to reduce the number of segments to one, Note that this can potentially be a very heavy operation.
        Since:
        7.3
      • getPendingWorkerCount

        long getPendingWorkerCount()
        Returns the number of indexing worker scheduled waiting to be executed.
        Since:
        7.1
      • getRunningWorkerCount

        long getRunningWorkerCount()
        Returns the number of indexing worker that are currently running.
        Since:
        7.1
      • getTotalCommandProcessed

        int getTotalCommandProcessed()
        Returns the total number of command processed by Elasticsearch for this Nuxeo instance. Useful for test assertion.
        Since:
        5.9.4
      • isEmbedded

        boolean isEmbedded()
        Returns true if the Elasticsearch is embedded with Nuxeo, sharing the same JVM.
        Since:
        7.2
      • useExternalVersion

        boolean useExternalVersion()
        When true use an external version for Elasticsearch document, this enable an optimistic concurrency control ensuring that an older version of a document never overwrites a newer version.
        Since:
        8.3