Class AsyncScopeSearchIndexManager

    • Constructor Detail

    • Method Detail

      • getIndex

        public CompletableFuture<SearchIndex> getIndex​(String name)
        Fetches an index from the server if it exists.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName". This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture the found index once complete.
      • getIndexedDocumentsCount

        public CompletableFuture<Long> getIndexedDocumentsCount​(String name)
        Retrieves the number of documents that have been indexed for an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture with the indexed documents count once complete.
      • getIndexedDocumentsCount

        public CompletableFuture<Long> getIndexedDocumentsCount​(String name,
                                                                GetIndexedSearchIndexOptions options)
        Retrieves the number of documents that have been indexed for an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture with the indexed documents count once complete.
      • dropIndex

        public CompletableFuture<Void> dropIndex​(String name)
        Drops an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • analyzeDocument

        public CompletableFuture<List<JsonObject>> analyzeDocument​(String name,
                                                                   JsonObject document)
        Allows to see how a document is analyzed against a specific index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        document - the document to analyze.
        Returns:
        a CompletableFuture with analyzed document parts once complete.
      • analyzeDocument

        public CompletableFuture<List<JsonObject>> analyzeDocument​(String name,
                                                                   JsonObject document,
                                                                   AnalyzeDocumentOptions options)
        Allows to see how a document is analyzed against a specific index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        document - the document to analyze.
        Returns:
        a CompletableFuture with analyzed document parts once complete.
      • pauseIngest

        public CompletableFuture<Void> pauseIngest​(String name)
        Pauses updates and maintenance for an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • resumeIngest

        public CompletableFuture<Void> resumeIngest​(String name)
        Resumes updates and maintenance for an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • allowQuerying

        public CompletableFuture<Void> allowQuerying​(String name)
        Allows querying against an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • disallowQuerying

        public CompletableFuture<Void> disallowQuerying​(String name)
        Disallows querying against an index.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • freezePlan

        public CompletableFuture<Void> freezePlan​(String name)
        Freeze the assignment of index partitions to nodes.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.
      • unfreezePlan

        public CompletableFuture<Void> unfreezePlan​(String name)
        Unfreeze the assignment of index partitions to nodes.
        Parameters:
        name - the name of the search index. This should just be the index name, rather than "bucket.scope.indexName".
        Returns:
        a CompletableFuture indicating request completion.