Search indexes
- class acouchbase.management.search.ScopeSearchIndexManager(impl: AsyncSearchIndexMgmtInterface)
Performs management operations on the search indexes of a scope.
- async allow_querying(index_name: str, options: AllowQueryingSearchIndexOptions | None = None, **kwargs: Unpack[AllowQueryingSearchIndexOptionsKwargs]) None
Allows querying against an index.
- Parameters:
index_name (str) – The name of the search index.
options (
AllowQueryingSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async analyze_document(index_name: str, document: Any, options: AnalyzeDocumentSearchIndexOptions | None = None, **kwargs: Unpack[AnalyzeDocumentSearchIndexOptionsKwargs]) dict[str, Any]
Allows to see how a document is analyzed against a specific index.
- Parameters:
index_name (str) – The name of the search index.
document (Any) – The document to analyze.
options (
AnalyzeDocumentSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The analyzed sections for the document.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async disallow_querying(index_name: str, options: DisallowQueryingSearchIndexOptions | None = None, **kwargs: Unpack[DisallowQueryingSearchIndexOptionsKwargs]) None
Disallows querying against an index.
- Parameters:
index_name (str) – The name of the search index.
options (
DisallowQueryingSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async drop_index(index_name: str, options: DropSearchIndexOptions | None = None, **kwargs: Unpack[DropSearchIndexOptionsKwargs]) None
Drops an index.
- Parameters:
index_name (str) – The name of the index.
options (
DropSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async freeze_plan(index_name: str, options: FreezePlanSearchIndexOptions | None = None, **kwargs: Unpack[FreezePlanSearchIndexOptionsKwargs]) None
Freezes the assignment of index partitions to nodes for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
FreezePlanSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_all_index_stats(options: GetAllSearchIndexStatsOptions | None = None, **kwargs: Unpack[GetAllSearchIndexStatsOptionsKwargs]) dict[str, Any]
Retrieves statistics on the search service.
The statistics cover documents, partition indexes, mutations, compactions, queries, and more.
Note
UNCOMMITTED: This is an uncommitted API call that is unlikely to change, but may still change as final consensus on its behavior has not yet been reached.
- Parameters:
options (
GetAllSearchIndexStatsOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The stats report.
- Return type:
- async get_all_indexes(options: GetAllSearchIndexesOptions | None = None, **kwargs: Unpack[GetAllSearchIndexesOptionsKwargs]) Iterable[SearchIndex]
Fetches all indexes from the server.
- Parameters:
options (
GetAllSearchIndexesOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
A list of all indexes.
- Return type:
Iterable[
SearchIndex]
- async get_index(index_name: str, options: GetSearchIndexOptions | None = None, **kwargs: Unpack[GetSearchIndexOptionsKwargs]) SearchIndex
Fetches an index from the server if it exists.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The index definition if it exists.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_index_stats(index_name: str, options: GetSearchIndexStatsOptions | None = None, **kwargs: Unpack[GetSearchIndexStatsOptionsKwargs]) dict[str, Any]
Retrieves metrics, timings and counters for a given index.
Note
UNCOMMITTED: This is an uncommitted API call that is unlikely to change, but may still change as final consensus on its behavior has not yet been reached.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexStatsOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The stats for the index.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_indexed_documents_count(index_name: str, options: GetSearchIndexedDocumentsCountOptions | None = None, **kwargs: Unpack[GetSearchIndexedDocumentsCountOptionsKwargs]) int
Retrieves the number of documents that have been indexed for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexedDocumentsCountOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The number of documents indexed for the specified index.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async pause_ingest(index_name: str, options: PauseIngestSearchIndexOptions | None = None, **kwargs: Unpack[PauseIngestSearchIndexOptionsKwargs]) None
Pauses updates and maintenance for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
PauseIngestSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async resume_ingest(index_name: str, options: ResumeIngestSearchIndexOptions | None = None, **kwargs: Unpack[ResumeIngestSearchIndexOptionsKwargs]) None
Resumes updates and maintenance for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
ResumeIngestSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async unfreeze_plan(index_name: str, options: UnfreezePlanSearchIndexOptions | None = None, **kwargs: Unpack[UnfreezePlanSearchIndexOptionsKwargs]) None
Unfreezes the assignment of index partitions to nodes for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
UnfreezePlanSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async upsert_index(index: SearchIndex, options: UpsertSearchIndexOptions | None = None, **kwargs: Unpack[UpsertSearchIndexOptionsKwargs]) None
Creates or updates an index.
- Parameters:
index (
SearchIndex) – The index definition.options (
UpsertSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
InvalidArgumentException – If the index definition is invalid.
- class acouchbase.management.search.SearchIndexManager(impl: AsyncSearchIndexMgmtInterface)
Performs management operations on search indexes.
For managing the search indexes of a scope,
ScopeSearchIndexManagershould be used.- async allow_querying(index_name: str, options: AllowQueryingSearchIndexOptions | None = None, **kwargs: Unpack[AllowQueryingSearchIndexOptionsKwargs]) None
Allows querying against an index.
- Parameters:
index_name (str) – The name of the search index.
options (
AllowQueryingSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async analyze_document(index_name: str, document: Any, options: AnalyzeDocumentSearchIndexOptions | None = None, **kwargs: Unpack[AnalyzeDocumentSearchIndexOptionsKwargs]) dict[str, Any]
Allows to see how a document is analyzed against a specific index.
- Parameters:
index_name (str) – The name of the search index.
document (Any) – The document to analyze.
options (
AnalyzeDocumentSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The analyzed sections for the document.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async disallow_querying(index_name: str, options: DisallowQueryingSearchIndexOptions | None = None, **kwargs: Unpack[DisallowQueryingSearchIndexOptionsKwargs]) None
Disallows querying against an index.
- Parameters:
index_name (str) – The name of the search index.
options (
DisallowQueryingSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async drop_index(index_name: str, options: DropSearchIndexOptions | None = None, **kwargs: Unpack[DropSearchIndexOptionsKwargs]) None
Drops an index.
- Parameters:
index_name (str) – The name of the index.
options (
DropSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async freeze_plan(index_name: str, options: FreezePlanSearchIndexOptions | None = None, **kwargs: Unpack[FreezePlanSearchIndexOptionsKwargs]) None
Freezes the assignment of index partitions to nodes for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
FreezePlanSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_all_index_stats(options: GetAllSearchIndexStatsOptions | None = None, **kwargs: Unpack[GetAllSearchIndexStatsOptionsKwargs]) dict[str, Any]
Retrieves statistics on the search service.
The statistics cover documents, partition indexes, mutations, compactions, queries, and more.
UNCOMMITTED This is an uncommitted API call that is unlikely to change, but may still change as final consensus on its behavior has not yet been reached.
- Parameters:
options (
GetAllSearchIndexStatsOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The stats report.
- Return type:
- async get_all_indexes(options: GetAllSearchIndexesOptions | None = None, **kwargs: Unpack[GetAllSearchIndexesOptionsKwargs]) Iterable[SearchIndex]
Fetches all indexes from the server.
- Parameters:
options (
GetAllSearchIndexesOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
A list of all indexes.
- Return type:
Iterable[
SearchIndex]
- async get_index(index_name: str, options: GetSearchIndexOptions | None = None, **kwargs: Unpack[GetSearchIndexOptionsKwargs]) SearchIndex
Fetches an index from the server if it exists.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The index definition if it exists.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_index_stats(index_name: str, options: GetSearchIndexStatsOptions | None = None, **kwargs: Unpack[GetSearchIndexStatsOptionsKwargs]) dict[str, Any]
Retrieves metrics, timings and counters for a given index.
UNCOMMITTED This is an uncommitted API call that is unlikely to change, but may still change as final consensus on its behavior has not yet been reached.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexStatsOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The stats for the index.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async get_indexed_documents_count(index_name: str, options: GetSearchIndexedDocumentsCountOptions | None = None, **kwargs: Unpack[GetSearchIndexedDocumentsCountOptionsKwargs]) int
Retrieves the number of documents that have been indexed for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
GetSearchIndexedDocumentsCountOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Returns:
The number of documents indexed for the specified index.
- Return type:
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async pause_ingest(index_name: str, options: PauseIngestSearchIndexOptions | None = None, **kwargs: Unpack[PauseIngestSearchIndexOptionsKwargs]) None
Pauses updates and maintenance for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
PauseIngestSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async resume_ingest(index_name: str, options: ResumeIngestSearchIndexOptions | None = None, **kwargs: Unpack[ResumeIngestSearchIndexOptionsKwargs]) None
Resumes updates and maintenance for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
ResumeIngestSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async unfreeze_plan(index_name: str, options: UnfreezePlanSearchIndexOptions | None = None, **kwargs: Unpack[UnfreezePlanSearchIndexOptionsKwargs]) None
Unfreezes the assignment of index partitions to nodes for an index.
- Parameters:
index_name (str) – The name of the search index.
options (
UnfreezePlanSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
SearchIndexNotFoundException – If the index does not exist.
- async upsert_index(index: SearchIndex, options: UpsertSearchIndexOptions | None = None, **kwargs: Unpack[UpsertSearchIndexOptionsKwargs]) None
Creates or updates an index.
- Parameters:
index (
SearchIndex) – The index definition.options (
UpsertSearchIndexOptions) – Optional parameters for this operation.**kwargs – keyword arguments that can be used as optional parameters for this operation.
- Raises:
InvalidArgumentException – If the index definition is invalid.
This module also publishes these, described where they are first documented: