1 | import { Cluster } from './cluster';
|
2 | import { NodeCallback } from './utilities';
|
3 | import { GetSearchIndexOptions, GetAllSearchIndexesOptions, UpsertSearchIndexOptions, GetSearchIndexedDocumentsCountOptions, DropSearchIndexOptions, PauseSearchIngestOptions, ResumeSearchIngestOptions, AllowSearchQueryingOptions, DisallowSearchQueryingOptions, FreezeSearchPlanOptions, UnfreezeSearchPlanOptions, AnalyzeSearchDocumentOptions, ISearchIndex, SearchIndex } from './searchindexmanager';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare class ScopeSearchIndexManager {
|
11 | private _cluster;
|
12 | private _bucketName;
|
13 | private _scopeName;
|
14 | |
15 |
|
16 |
|
17 | constructor(cluster: Cluster, bucketName: string, scopeName: string);
|
18 | /**
|
19 | * Returns an index by it's name.
|
20 | *
|
21 | * @param indexName The index to retrieve.
|
22 | * @param options Optional parameters for this operation.
|
23 | * @param callback A node-style callback to be invoked after execution.
|
24 | */
|
25 | getIndex(indexName: string, options?: GetSearchIndexOptions, callback?: NodeCallback<SearchIndex>): Promise<SearchIndex>;
|
26 | /**
|
27 | * Returns a list of all existing indexes.
|
28 | *
|
29 | * @param options Optional parameters for this operation.
|
30 | * @param callback A node-style callback to be invoked after execution.
|
31 | */
|
32 | getAllIndexes(options?: GetAllSearchIndexesOptions, callback?: NodeCallback<SearchIndex[]>): Promise<SearchIndex[]>;
|
33 | /**
|
34 | * Creates or updates an existing index.
|
35 | *
|
36 | * @param indexDefinition The index to update.
|
37 | * @param options Optional parameters for this operation.
|
38 | * @param callback A node-style callback to be invoked after execution.
|
39 | */
|
40 | upsertIndex(indexDefinition: ISearchIndex, options?: UpsertSearchIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
41 | /**
|
42 | * Drops an index.
|
43 | *
|
44 | * @param indexName The name of the index to drop.
|
45 | * @param options Optional parameters for this operation.
|
46 | * @param callback A node-style callback to be invoked after execution.
|
47 | */
|
48 | dropIndex(indexName: string, options?: DropSearchIndexOptions, callback?: NodeCallback<void>): Promise<void>;
|
49 | /**
|
50 | * Returns the number of documents that have been indexed.
|
51 | *
|
52 | * @param indexName The name of the index to return the count for.
|
53 | * @param options Optional parameters for this operation.
|
54 | * @param callback A node-style callback to be invoked after execution.
|
55 | */
|
56 | getIndexedDocumentsCount(indexName: string, options?: GetSearchIndexedDocumentsCountOptions, callback?: NodeCallback<number>): Promise<number>;
|
57 | /**
|
58 | * Pauses the ingestion of documents into an index.
|
59 | *
|
60 | * @param indexName The name of the index to pause.
|
61 | * @param options Optional parameters for this operation.
|
62 | * @param callback A node-style callback to be invoked after execution.
|
63 | */
|
64 | pauseIngest(indexName: string, options?: PauseSearchIngestOptions, callback?: NodeCallback<void>): Promise<void>;
|
65 | /**
|
66 | * Resumes the ingestion of documents into an index.
|
67 | *
|
68 | * @param indexName The name of the index to resume.
|
69 | * @param options Optional parameters for this operation.
|
70 | * @param callback A node-style callback to be invoked after execution.
|
71 | */
|
72 | resumeIngest(indexName: string, options?: ResumeSearchIngestOptions, callback?: NodeCallback<void>): Promise<void>;
|
73 | /**
|
74 | * Enables querying of an index.
|
75 | *
|
76 | * @param indexName The name of the index to enable querying for.
|
77 | * @param options Optional parameters for this operation.
|
78 | * @param callback A node-style callback to be invoked after execution.
|
79 | */
|
80 | allowQuerying(indexName: string, options?: AllowSearchQueryingOptions, callback?: NodeCallback<void>): Promise<void>;
|
81 | /**
|
82 | * Disables querying of an index.
|
83 | *
|
84 | * @param indexName The name of the index to disable querying for.
|
85 | * @param options Optional parameters for this operation.
|
86 | * @param callback A node-style callback to be invoked after execution.
|
87 | */
|
88 | disallowQuerying(indexName: string, options?: DisallowSearchQueryingOptions, callback?: NodeCallback<void>): Promise<void>;
|
89 | /**
|
90 | * Freezes the indexing plan for execution of queries.
|
91 | *
|
92 | * @param indexName The name of the index to freeze the plan of.
|
93 | * @param options Optional parameters for this operation.
|
94 | * @param callback A node-style callback to be invoked after execution.
|
95 | */
|
96 | freezePlan(indexName: string, options?: FreezeSearchPlanOptions, callback?: NodeCallback<void>): Promise<void>;
|
97 | /**
|
98 | * Unfreezes the indexing plan for execution of queries.
|
99 | *
|
100 | * @param indexName The name of the index to freeze the plan of.
|
101 | * @param options Optional parameters for this operation.
|
102 | * @param callback A node-style callback to be invoked after execution.
|
103 | */
|
104 | unfreezePlan(indexName: string, options?: UnfreezeSearchPlanOptions, callback?: NodeCallback<void>): Promise<void>;
|
105 | /**
|
106 | * Performs analysis of a specific document by an index.
|
107 | *
|
108 | * @param indexName The name of the index to use for the analysis.
|
109 | * @param document The document to analyze.
|
110 | * @param options Optional parameters for this operation.
|
111 | * @param callback A node-style callback to be invoked after execution.
|
112 | */
|
113 | analyzeDocument(indexName: string, document: any, options?: AnalyzeSearchDocumentOptions, callback?: NodeCallback<any>): Promise<any>;
|
114 | }
|