@azure/search-documents
Version:
Azure client library to use AI Search for node.js and browser.
31 lines • 2.69 kB
TypeScript
import type { SearchClientOptionalParams } from "./api/index.js";
import type { SearchDocumentsResult, LookupDocument, SuggestDocumentsResult, IndexDocumentsBatch, IndexDocumentsResult, AutocompleteResult } from "../models/azure/search/documents/models.js";
import type { AutocompletePostOptionalParams, AutocompleteGetOptionalParams, IndexOptionalParams, SuggestPostOptionalParams, SuggestGetOptionalParams, GetDocumentOptionalParams, SearchPostOptionalParams, SearchGetOptionalParams, GetDocumentCountOptionalParams } from "./api/options.js";
import type { KeyCredential, TokenCredential } from "@azure/core-auth";
import type { Pipeline } from "@azure/core-rest-pipeline";
export type { SearchClientOptionalParams } from "./api/searchContext.js";
export declare class SearchClient {
private _client;
/** The pipeline used by this client to make requests */
readonly pipeline: Pipeline;
constructor(endpointParam: string, credential: KeyCredential | TokenCredential, indexName: string, options?: SearchClientOptionalParams);
/** Autocompletes incomplete query terms based on input text and matching terms in the index. */
autocompletePost(searchText: string, suggesterName: string, options?: AutocompletePostOptionalParams): Promise<AutocompleteResult>;
/** Autocompletes incomplete query terms based on input text and matching terms in the index. */
autocompleteGet(searchText: string, suggesterName: string, options?: AutocompleteGetOptionalParams): Promise<AutocompleteResult>;
/** Sends a batch of document write actions to the index. */
index(batch: IndexDocumentsBatch, options?: IndexOptionalParams): Promise<IndexDocumentsResult>;
/** Suggests documents in the index that match the given partial query text. */
suggestPost(searchText: string, suggesterName: string, options?: SuggestPostOptionalParams): Promise<SuggestDocumentsResult>;
/** Suggests documents in the index that match the given partial query text. */
suggestGet(searchText: string, suggesterName: string, options?: SuggestGetOptionalParams): Promise<SuggestDocumentsResult>;
/** Retrieves a document from the index. */
getDocument(key: string, options?: GetDocumentOptionalParams): Promise<LookupDocument>;
/** Searches for documents in the index. */
searchPost(options?: SearchPostOptionalParams): Promise<SearchDocumentsResult>;
/** Searches for documents in the index. */
searchGet(options?: SearchGetOptionalParams): Promise<SearchDocumentsResult>;
/** Queries the number of documents in the index. */
getDocumentCount(options?: GetDocumentCountOptionalParams): Promise<number>;
}
//# sourceMappingURL=searchClient.d.ts.map