UNPKG

@azure/search-documents

Version:

Azure client library to use Cognitive Search for node.js and browser.

976 lines (889 loc) 288 kB
/// <reference lib="esnext.asynciterable" /> import { AzureKeyCredential } from '@azure/core-auth'; import { ExtendedCommonClientOptions } from '@azure/core-http-compat'; import { KeyCredential } from '@azure/core-auth'; import { OperationOptions } from '@azure/core-client'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { RestError } from '@azure/core-rest-pipeline'; import { TokenCredential } from '@azure/core-auth'; /** Information about a token returned by an analyzer. */ export declare interface AnalyzedTokenInfo { /** * The token returned by the analyzer. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly token: string; /** * The index of the first character of the token in the input text. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly startOffset: number; /** * The index of the last character of the token in the input text. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly endOffset: number; /** * The position of the token in the input text relative to other tokens. The first token in the input text has position 0, the next has position 1, and so on. Depending on the analyzer used, some tokens might have the same position, for example if they are synonyms of each other. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly position: number; } /** * Specifies some text and analysis components used to break that text into tokens. */ export declare interface AnalyzeRequest { /** * The text to break into tokens. */ text: string; /** * The name of the analyzer to use to break the given text. If this parameter is not specified, * you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually * exclusive. {@link KnownAnalyzerNames} is an enum containing built-in analyzer names. * NOTE: Either analyzerName or tokenizerName is required in an AnalyzeRequest. */ analyzerName?: LexicalAnalyzerName; /** * The name of the tokenizer to use to break the given text. If this parameter is not specified, * you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually * exclusive. {@link KnownTokenizerNames} is an enum containing built-in tokenizer names. * NOTE: Either analyzerName or tokenizerName is required in an AnalyzeRequest. */ tokenizerName?: LexicalTokenizerName; /** * An optional list of token filters to use when breaking the given text. This parameter can only * be set when using the tokenizer parameter. */ tokenFilters?: TokenFilterName[]; /** * An optional list of character filters to use when breaking the given text. This parameter can * only be set when using the tokenizer parameter. */ charFilters?: CharFilterName[]; } /** The result of testing an analyzer on text. */ export declare interface AnalyzeResult { /** The list of tokens returned by the analyzer specified in the request. */ tokens: AnalyzedTokenInfo[]; } /** * Options for analyze text operation. */ export declare type AnalyzeTextOptions = OperationOptions & AnalyzeRequest; /** Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. This token filter is implemented using Apache Lucene. */ export declare interface AsciiFoldingTokenFilter extends BaseTokenFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.AsciiFoldingTokenFilter"; /** A value indicating whether the original token will be kept. Default is false. */ preserveOriginal?: boolean; } /** The result of Autocomplete requests. */ export declare interface AutocompleteItem { /** * The completed term. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly text: string; /** * The query along with the completed term. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly queryPlusText: string; } /** Defines values for AutocompleteMode. */ export declare type AutocompleteMode = "oneTerm" | "twoTerms" | "oneTermWithContext"; /** * Options for retrieving completion text for a partial searchText. */ export declare type AutocompleteOptions<TModel extends object> = OperationOptions & AutocompleteRequest<TModel>; /** * Parameters for fuzzy matching, and other autocomplete query behaviors. */ export declare interface AutocompleteRequest<TModel extends object> { /** * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles * and 'oneTermWithContext' to use the current context while producing auto-completed terms. * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext' */ autocompleteMode?: AutocompleteMode; /** * An OData expression that filters the documents used to produce completed terms for the * Autocomplete result. */ filter?: string; /** * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. * When set to true, the query will autocomplete terms even if there's a substituted or missing * character in the search text. While this provides a better experience in some scenarios, it * comes at a performance cost as fuzzy autocomplete queries are slower and consume more * resources. */ useFuzzyMatching?: boolean; /** * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, * hit highlighting is disabled. */ highlightPostTag?: string; /** * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If * omitted, hit highlighting is disabled. */ highlightPreTag?: string; /** * A number between 0 and 100 indicating the percentage of the index that must be covered by an * autocomplete query in order for the query to be reported as a success. This parameter can be * useful for ensuring search availability even for services with only one replica. The default * is 80. */ minimumCoverage?: number; /** * The comma-separated list of field names to consider when querying for auto-completed terms. * Target fields must be included in the specified suggester. */ searchFields?: SearchFieldArray<TModel>; /** * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The * default is 5. */ top?: number; } /** The result of Autocomplete query. */ export declare interface AutocompleteResult { /** * A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly coverage?: number; /** * The list of returned Autocompleted items. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly results: AutocompleteItem[]; } /** Credentials of a registered application created for your search service, used for authenticated access to the encryption keys stored in Azure Key Vault. */ export declare interface AzureActiveDirectoryApplicationCredentials { /** An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application. */ applicationId: string; /** The authentication key of the specified AAD application. */ applicationSecret?: string; } export { AzureKeyCredential } /** Allows you to generate a vector embedding for a given text input using the Azure OpenAI resource. */ export declare interface AzureOpenAIEmbeddingSkill extends BaseSearchIndexerSkill, AzureOpenAIParameters { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"; /** The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. */ dimensions?: number; } /** * Defines values for AzureOpenAIModelName. \ * {@link KnownAzureOpenAIModelName} can be used interchangeably with AzureOpenAIModelName, * this enum contains the known values that the service supports. * ### Known values supported by the service * **text-embedding-ada-002** \ * **text-embedding-3-large** \ * **text-embedding-3-small** */ export declare type AzureOpenAIModelName = string; /** Contains the parameters specific to using an Azure Open AI service for vectorization at query time. */ export declare interface AzureOpenAIParameters { /** The resource uri for your Azure Open AI resource. */ resourceUrl?: string; /** ID of your Azure Open AI model deployment on the designated resource. */ deploymentId?: string; /** API key for the designated Azure Open AI resource. */ apiKey?: string; /** The user-assigned managed identity used for outbound connections. */ authIdentity?: SearchIndexerDataIdentity; /** The name of the embedding model that is deployed at the provided deploymentId path. */ modelName?: AzureOpenAIModelName; } /** Contains the parameters specific to using an Azure Open AI service for vectorization at query time. */ export declare interface AzureOpenAIVectorizer extends BaseVectorSearchVectorizer { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "azureOpenAI"; /** Contains the parameters specific to Azure Open AI embedding vectorization. */ parameters?: AzureOpenAIParameters; } /** Base type for character filters. */ export declare interface BaseCharFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.MappingCharFilter" | "#Microsoft.Azure.Search.PatternReplaceCharFilter"; /** The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */ name: string; } /** Base type for describing any Azure AI service resource attached to a skillset. */ export declare interface BaseCognitiveServicesAccount { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices" | "#Microsoft.Azure.Search.CognitiveServicesByKey"; /** Description of the Azure AI service resource attached to a skillset. */ description?: string; } /** Base type for data change detection policies. */ export declare interface BaseDataChangeDetectionPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy" | "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy"; } /** Base type for data deletion detection policies. */ export declare interface BaseDataDeletionDetectionPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy"; } /** Base type for analyzers. */ export declare interface BaseLexicalAnalyzer { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.CustomAnalyzer" | "#Microsoft.Azure.Search.PatternAnalyzer" | "#Microsoft.Azure.Search.StandardAnalyzer" | "#Microsoft.Azure.Search.StopAnalyzer"; /** The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */ name: string; } /** Base type for tokenizers. */ export declare interface BaseLexicalTokenizer { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.ClassicTokenizer" | "#Microsoft.Azure.Search.EdgeNGramTokenizer" | "#Microsoft.Azure.Search.KeywordTokenizer" | "#Microsoft.Azure.Search.KeywordTokenizerV2" | "#Microsoft.Azure.Search.MicrosoftLanguageTokenizer" | "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer" | "#Microsoft.Azure.Search.NGramTokenizer" | "#Microsoft.Azure.Search.PathHierarchyTokenizerV2" | "#Microsoft.Azure.Search.PatternTokenizer" | "#Microsoft.Azure.Search.StandardTokenizer" | "#Microsoft.Azure.Search.StandardTokenizerV2" | "#Microsoft.Azure.Search.UaxUrlEmailTokenizer"; /** The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */ name: string; } /** Base type for functions that can modify document scores during ranking. */ export declare interface BaseScoringFunction { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "distance" | "freshness" | "magnitude" | "tag"; /** The name of the field used as input to the scoring function. */ fieldName: string; /** A multiplier for the raw score. Must be a positive number not equal to 1.0. */ boost: number; /** A value indicating how boosting will be interpolated across document scores; defaults to "Linear". */ interpolation?: ScoringFunctionInterpolation; } /** Abstract base type for data identities. */ export declare interface BaseSearchIndexerDataIdentity { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.DataNoneIdentity" | "#Microsoft.Azure.Search.DataUserAssignedIdentity"; } /** Base type for skills. */ export declare interface BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Util.ConditionalSkill" | "#Microsoft.Skills.Text.KeyPhraseExtractionSkill" | "#Microsoft.Skills.Vision.OcrSkill" | "#Microsoft.Skills.Vision.ImageAnalysisSkill" | "#Microsoft.Skills.Text.LanguageDetectionSkill" | "#Microsoft.Skills.Util.ShaperSkill" | "#Microsoft.Skills.Text.MergeSkill" | "#Microsoft.Skills.Text.EntityRecognitionSkill" | "#Microsoft.Skills.Text.SentimentSkill" | "#Microsoft.Skills.Text.V3.SentimentSkill" | "#Microsoft.Skills.Text.V3.EntityLinkingSkill" | "#Microsoft.Skills.Text.V3.EntityRecognitionSkill" | "#Microsoft.Skills.Text.PIIDetectionSkill" | "#Microsoft.Skills.Text.SplitSkill" | "#Microsoft.Skills.Text.CustomEntityLookupSkill" | "#Microsoft.Skills.Text.TranslationSkill" | "#Microsoft.Skills.Util.DocumentExtractionSkill" | "#Microsoft.Skills.Custom.WebApiSkill" | "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"; /** The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. */ name?: string; /** The description of the skill which describes the inputs, outputs, and usage of the skill. */ description?: string; /** Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. */ context?: string; /** Inputs of the skills could be a column in the source data set, or the output of an upstream skill. */ inputs: InputFieldMappingEntry[]; /** The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. */ outputs: OutputFieldMappingEntry[]; } /** * Parameters for filtering, sorting, faceting, paging, and other search query behaviors. */ export declare interface BaseSearchRequestOptions<TModel extends object, TFields extends SelectFields<TModel> = SelectFields<TModel>> { /** * A value that specifies whether to fetch the total count of results. Default is false. Setting * this value to true may have a performance impact. Note that the count returned is an * approximation. */ includeTotalCount?: boolean; /** * The list of facet expressions to apply to the search query. Each facet expression contains a * field name, optionally followed by a comma-separated list of name:value pairs. */ facets?: string[]; /** * The OData $filter expression to apply to the search query. */ filter?: string; /** * The comma-separated list of field names to use for hit highlights. Only searchable fields can * be used for hit highlighting. */ highlightFields?: string; /** * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is * &lt;/em&gt;. */ highlightPostTag?: string; /** * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default * is &lt;em&gt;. */ highlightPreTag?: string; /** * A number between 0 and 100 indicating the percentage of the index that must be covered by a * search query in order for the query to be reported as a success. This parameter can be useful * for ensuring search availability even for services with only one replica. The default is 100. */ minimumCoverage?: number; /** * The list of OData $orderby expressions by which to sort the results. Each * expression can be either a field name or a call to either the geo.distance() or the * search.score() functions. Each expression can be followed by asc to indicate ascending, or * desc to indicate descending. The default is ascending order. Ties will be broken by the match * scores of documents. If no $orderby is specified, the default sort order is descending by * document match score. There can be at most 32 $orderby clauses. */ orderBy?: string[]; /** * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if * your query uses the Lucene query syntax. Possible values include: 'simple', 'full', 'semantic' */ queryType?: QueryType; /** * The list of parameter values to be used in scoring functions (for example, * referencePointParameter) using the format name-values. For example, if the scoring profile * defines a function with a parameter called 'mylocation' the parameter string would be * "mylocation--122.2,44.8" (without the quotes). */ scoringParameters?: string[]; /** * The name of a scoring profile to evaluate match scores for matching documents in order to sort * the results. */ scoringProfile?: string; /** * The comma-separated list of field names to which to scope the full-text search. When using * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each * fielded search expression take precedence over any field names listed in this parameter. */ searchFields?: SearchFieldArray<TModel>; /** * A value that specifies whether any or all of the search terms must be matched in order to * count the document as a match. Possible values include: 'any', 'all' */ searchMode?: SearchMode; /** * A value that specifies whether we want to calculate scoring statistics (such as document * frequency) globally for more consistent scoring, or locally, for lower latency. Possible * values include: 'Local', 'Global' */ scoringStatistics?: ScoringStatistics; /** * A value to be used to create a sticky session, which can help to get more consistent results. * As long as the same sessionId is used, a best-effort attempt will be made to target the same * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the * load balancing of the requests across replicas and adversely affect the performance of the * search service. The value used as sessionId cannot start with a '_' character. */ sessionId?: string; /** * The list of fields to retrieve. If unspecified, all fields marked as * retrievable in the schema are included. */ select?: SelectArray<TFields>; /** * The number of search results to skip. This value cannot be greater than 100,000. If you need * to scan documents in sequence, but cannot use skip due to this limitation, consider using * orderby on a totally-ordered key and filter with a range query instead. */ skip?: number; /** * The number of search results to retrieve. This can be used in conjunction with $skip to * implement client-side paging of search results. If results are truncated due to server-side * paging, the response will include a continuation token that can be used to issue another * Search request for the next page of results. */ top?: number; /** * Defines options for vector search queries */ vectorSearchOptions?: VectorSearchOptions<TModel>; } /** Base type for token filters. */ export declare interface BaseTokenFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.AsciiFoldingTokenFilter" | "#Microsoft.Azure.Search.CjkBigramTokenFilter" | "#Microsoft.Azure.Search.CommonGramTokenFilter" | "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter" | "#Microsoft.Azure.Search.EdgeNGramTokenFilter" | "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2" | "#Microsoft.Azure.Search.ElisionTokenFilter" | "#Microsoft.Azure.Search.KeepTokenFilter" | "#Microsoft.Azure.Search.KeywordMarkerTokenFilter" | "#Microsoft.Azure.Search.LengthTokenFilter" | "#Microsoft.Azure.Search.LimitTokenFilter" | "#Microsoft.Azure.Search.NGramTokenFilter" | "#Microsoft.Azure.Search.NGramTokenFilterV2" | "#Microsoft.Azure.Search.PatternCaptureTokenFilter" | "#Microsoft.Azure.Search.PatternReplaceTokenFilter" | "#Microsoft.Azure.Search.PhoneticTokenFilter" | "#Microsoft.Azure.Search.ShingleTokenFilter" | "#Microsoft.Azure.Search.SnowballTokenFilter" | "#Microsoft.Azure.Search.StemmerTokenFilter" | "#Microsoft.Azure.Search.StemmerOverrideTokenFilter" | "#Microsoft.Azure.Search.StopwordsTokenFilter" | "#Microsoft.Azure.Search.SynonymTokenFilter" | "#Microsoft.Azure.Search.TruncateTokenFilter" | "#Microsoft.Azure.Search.UniqueTokenFilter" | "#Microsoft.Azure.Search.WordDelimiterTokenFilter"; /** The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */ name: string; } /** The query parameters for vector and hybrid search queries. */ export declare interface BaseVectorQuery<TModel extends object> { /** * ### Known values supported by the service * **vector**: Vector query where a raw vector value is provided. * **text**: Vector query where a text value that needs to be vectorized is provided. */ kind: VectorQueryKind; /** Number of nearest neighbors to return as top hits. */ kNearestNeighborsCount?: number; /** Vector Fields of type Collection(Edm.Single) to be included in the vector searched. */ fields?: SearchFieldArray<TModel>; /** * When true, triggers an exhaustive k-nearest neighbor search across all vectors within the * vector index. Useful for scenarios where exact matches are critical, such as determining ground * truth values. */ exhaustive?: boolean; /** * Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter * configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is * true. This parameter is only permitted when a compression method is used on the underlying * vector field. */ oversampling?: number; /** Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. */ weight?: number; } /** Contains configuration options specific to the algorithm used during indexing and/or querying. */ export declare interface BaseVectorSearchAlgorithmConfiguration { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: VectorSearchAlgorithmKind; /** The name to associate with this particular configuration. */ name: string; } /** Contains configuration options specific to the compression method used during indexing or querying. */ export declare interface BaseVectorSearchCompression { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "scalarQuantization" | "binaryQuantization"; /** The name to associate with this particular configuration. */ compressionName: string; /** If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. */ rerankWithOriginalVectors?: boolean; /** Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency. */ defaultOversampling?: number; } /** Contains specific details for a vectorization method to be used during query time. */ export declare interface BaseVectorSearchVectorizer { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: VectorSearchVectorizerKind; /** The name to associate with this particular vectorization method. */ vectorizerName: string; } /** Contains configuration options specific to the binary quantization compression method used during indexing and querying. */ export declare interface BinaryQuantizationCompression extends BaseVectorSearchCompression { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "binaryQuantization"; } export declare type BlobIndexerDataToExtract = `${KnownBlobIndexerDataToExtract}`; export declare type BlobIndexerImageAction = `${KnownBlobIndexerImageAction}`; export declare type BlobIndexerParsingMode = `${KnownBlobIndexerParsingMode}`; export declare type BlobIndexerPDFTextRotationAlgorithm = `${KnownBlobIndexerPDFTextRotationAlgorithm}`; /** Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a TF-IDF-like algorithm that includes length normalization (controlled by the 'b' parameter) as well as term frequency saturation (controlled by the 'k1' parameter). */ export declare interface BM25Similarity extends Similarity { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.BM25Similarity"; /** This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency. */ k1?: number; /** This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document. */ b?: number; } /** * Contains the possible cases for CharFilter. */ export declare type CharFilter = MappingCharFilter | PatternReplaceCharFilter; /** * Defines values for CharFilterName. \ * {@link KnownCharFilterName} can be used interchangeably with CharFilterName, * this enum contains the known values that the service supports. * ### Known values supported by the service * **html_strip**: A character filter that attempts to strip out HTML constructs. See https:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/charfilter\/HTMLStripCharFilter.html */ export declare type CharFilterName = string; /** Forms bigrams of CJK terms that are generated from the standard tokenizer. This token filter is implemented using Apache Lucene. */ export declare interface CjkBigramTokenFilter extends BaseTokenFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.CjkBigramTokenFilter"; /** The scripts to ignore. */ ignoreScripts?: CjkBigramTokenFilterScripts[]; /** A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false. */ outputUnigrams?: boolean; } /** Defines values for CjkBigramTokenFilterScripts. */ export declare type CjkBigramTokenFilterScripts = "han" | "hiragana" | "katakana" | "hangul"; /** Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF. This variation of TF-IDF introduces static document length normalization as well as coordinating factors that penalize documents that only partially match the searched queries. */ export declare interface ClassicSimilarity extends Similarity { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.ClassicSimilarity"; } /** Grammar-based tokenizer that is suitable for processing most European-language documents. This tokenizer is implemented using Apache Lucene. */ export declare interface ClassicTokenizer extends BaseLexicalTokenizer { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.ClassicTokenizer"; /** The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. */ maxTokenLength?: number; } /** * Contains the possible cases for CognitiveServicesAccount. */ export declare type CognitiveServicesAccount = DefaultCognitiveServicesAccount | CognitiveServicesAccountKey; /** The multi-region account key of an Azure AI service resource that's attached to a skillset. */ export declare interface CognitiveServicesAccountKey extends BaseCognitiveServicesAccount { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.CognitiveServicesByKey"; /** The key used to provision the Azure AI service resource attached to a skillset. */ key: string; } /** Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. This token filter is implemented using Apache Lucene. */ export declare interface CommonGramTokenFilter extends BaseTokenFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.CommonGramTokenFilter"; /** The set of common words. */ commonWords: string[]; /** A value indicating whether common words matching will be case insensitive. Default is false. */ ignoreCase?: boolean; /** A value that indicates whether the token filter is in query mode. When in query mode, the token filter generates bigrams and then removes common words and single terms followed by a common word. Default is false. */ useQueryMode?: boolean; } /** * Defines values for ComplexDataType. * Possible values include: 'Edm.ComplexType', 'Collection(Edm.ComplexType)' * @readonly */ export declare type ComplexDataType = "Edm.ComplexType" | "Collection(Edm.ComplexType)"; /** * Represents a field in an index definition, which describes the name, data type, and search * behavior of a field. */ export declare interface ComplexField { /** * The name of the field, which must be unique within the fields collection of the index or * parent field. */ name: string; /** * The data type of the field. * Possible values include: 'Edm.ComplexType','Collection(Edm.ComplexType)' */ type: ComplexDataType; /** * A list of sub-fields. */ fields?: SearchField[]; } /** A skill that enables scenarios that require a Boolean operation to determine the data to assign to an output. */ export declare interface ConditionalSkill extends BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Util.ConditionalSkill"; } /** Defines options to control Cross-Origin Resource Sharing (CORS) for an index. */ export declare interface CorsOptions { /** The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). */ allowedOrigins: string[]; /** The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. */ maxAgeInSeconds?: number; } /** * Options for performing the count operation on the index. */ export declare type CountDocumentsOptions = OperationOptions; /** * Options for create datasource operation. */ export declare type CreateDataSourceConnectionOptions = OperationOptions; /** * Options for create indexer operation. */ export declare type CreateIndexerOptions = OperationOptions; /** * Options for create index operation. */ export declare type CreateIndexOptions = OperationOptions; /** * Options for create/update datasource operation. */ export declare interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions { /** * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for create/update indexer operation. */ export declare interface CreateorUpdateIndexerOptions extends OperationOptions { /** * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for create/update index operation. */ export declare interface CreateOrUpdateIndexOptions extends OperationOptions { /** * Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by * taking the index offline for at least a few seconds. This temporarily causes indexing and * query requests to fail. Performance and write availability of the index can be impaired for * several minutes after the index is updated, or longer for very large indexes. */ allowIndexDowntime?: boolean; /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for create/update skillset operation. */ export declare interface CreateOrUpdateSkillsetOptions extends OperationOptions { /** * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for create/update synonymmap operation. */ export declare interface CreateOrUpdateSynonymMapOptions extends OperationOptions { /** * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for create skillset operation. */ export declare type CreateSkillsetOptions = OperationOptions; /** * Helper method to create a SynonymMap object. This is a NodeJS only method. * * @param name - Name of the SynonymMap. * @param filePath - Path of the file that contains the Synonyms (seperated by new lines) * @returns SynonymMap object */ export declare function createSynonymMapFromFile(name: string, filePath: string): Promise<SynonymMap>; /** * Options for create synonymmap operation. */ export declare type CreateSynonymMapOptions = OperationOptions; /** * Allows you to take control over the process of converting text into indexable/searchable tokens. * It's a user-defined configuration consisting of a single predefined tokenizer and one or more * filters. The tokenizer is responsible for breaking text into tokens, and the filters for * modifying tokens emitted by the tokenizer. */ export declare interface CustomAnalyzer { /** * Polymorphic Discriminator */ odatatype: "#Microsoft.Azure.Search.CustomAnalyzer"; /** * The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, * can only start and end with alphanumeric characters, and is limited to 128 characters. */ name: string; /** * The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as * breaking a sentence into words. {@link KnownTokenizerNames} is an enum containing built-in tokenizer names. */ tokenizerName: LexicalTokenizerName; /** * A list of token filters used to filter out or modify the tokens generated by a tokenizer. For * example, you can specify a lowercase filter that converts all characters to lowercase. The * filters are run in the order in which they are listed. */ tokenFilters?: TokenFilterName[]; /** * A list of character filters used to prepare input text before it is processed by the * tokenizer. For instance, they can replace certain characters or symbols. The filters are run * in the order in which they are listed. */ charFilters?: CharFilterName[]; } /** An object that contains information about the matches that were found, and related metadata. */ export declare interface CustomEntity { /** The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. */ name: string; /** This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. */ description?: string; /** This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. */ type?: string; /** This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. */ subtype?: string; /** This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. */ id?: string; /** Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT. */ caseSensitive?: boolean; /** Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent. */ accentSensitive?: boolean; /** Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do. */ fuzzyEditDistance?: number; /** Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values. */ defaultCaseSensitive?: boolean; /** Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values. */ defaultAccentSensitive?: boolean; /** Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values. */ defaultFuzzyEditDistance?: number; /** An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name. */ aliases?: CustomEntityAlias[]; } /** A complex object that can be used to specify alternative spellings or synonyms to the root entity name. */ export declare interface CustomEntityAlias { /** The text of the alias. */ text: string; /** Determine if the alias is case sensitive. */ caseSensitive?: boolean; /** Determine if the alias is accent sensitive. */ accentSensitive?: boolean; /** Determine the fuzzy edit distance of the alias. */ fuzzyEditDistance?: number; } /** A skill looks for text from a custom, user-defined list of words and phrases. */ export declare interface CustomEntityLookupSkill extends BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Text.CustomEntityLookupSkill"; /** A value indicating which language code to use. Default is en. */ defaultLanguageCode?: CustomEntityLookupSkillLanguage; /** Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS. */ entitiesDefinitionUri?: string; /** The inline CustomEntity definition. */ inlineEntitiesDefinition?: CustomEntity[]; /** A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value. */ globalDefaultCaseSensitive?: boolean; /** A global flag for AccentSensitive. If AccentSensitive is not set in CustomEntity, this value will be the default value. */ globalDefaultAccentSensitive?: boolean; /** A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value. */ globalDefaultFuzzyEditDistance?: number; } export declare type CustomEntityLookupSkillLanguage = `${KnownCustomEntityLookupSkillLanguage}`; /** * Contains the possible cases for DataChangeDetectionPolicy. */ export declare type DataChangeDetectionPolicy = HighWaterMarkChangeDetectionPolicy | SqlIntegratedChangeTrackingPolicy; /** * Contains the possible cases for DataDeletionDetectionPolicy. */ export declare type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolicy; /** * Default Batch Size */ export declare const DEFAULT_BATCH_SIZE: number; /** * Default window flush interval */ export declare const DEFAULT_FLUSH_WINDOW: number; /** * Default number of times to retry. */ export declare const DEFAULT_RETRY_COUNT: number; /** An empty object that represents the default Azure AI service resource for a skillset. */ export declare interface DefaultCognitiveServicesAccount extends BaseCognitiveServicesAccount { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices"; } /** * Options for delete datasource operation. */ export declare interface DeleteDataSourceConnectionOptions extends OperationOptions { /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for the delete documents operation. */ export declare type DeleteDocumentsOptions = IndexDocumentsOptions; /** * Options for delete indexer operation. */ export declare interface DeleteIndexerOptions extends OperationOptions { /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for delete index operation. */ export declare interface DeleteIndexOptions extends OperationOptions { /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for delete skillset operaion. */ export declare interface DeleteSkillsetOptions extends OperationOptions { /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** * Options for delete synonymmap operation. */ export declare interface DeleteSynonymMapOptions extends OperationOptions { /** * If set to true, Resource will be deleted only if the etag matches. */ onlyIfUnchanged?: boolean; } /** Decomposes compound words found in many Germanic languages. This token filter is implemented using Apache Lucene. */ export declare interface DictionaryDecompounderTokenFilter extends BaseTokenFilter { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter"; /** The list of words to match against. */ wordList: string[]; /** The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300. */ minWordSize?: number; /** The minimum subword size. Only subwords longer than this are outputted. Default is 2. Maximum is 300. */ minSubwordSize?: number; /** The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is 300. */ maxSubwordSize?: number; /** A value indicating whether to add only the longest matching subword to the output. Default is false. */ onlyLongestMatch?: boolean; } /** Defines a function that boosts scores based on distance from a geographic location. */ export declare interface DistanceScoringFunction extends BaseScoringFunction { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "distance"; /** Parameter values for the distance scoring function. */ parameters: DistanceScoringParameters; } /** Provides parameter values to a distance scoring function. */ export declare interface DistanceScoringParameters { /** The name of the parameter passed in search queries to specify the reference location. */ referencePointParameter: string; /** The distance in kilometers from the reference location where the boosting range ends. */ boostingDistance: number; } /** A skill that extracts content from a file within the enrichment pipeline. */ export declare interface DocumentExtractionSkill extends BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Util.DocumentExtractionSkill"; /** The parsingMode for the skill. Will be set to 'default' if not defined. */ parsingMode?: string; /** The type of data to be extracted for the skill. Will be set to 'contentAndMetadata' if not defined. */ dataToExtract?: string; /** A dictionary of configurations for the skill. */ configuration?: { [propertyName: string]: any; }; } /** * Generates n-grams of the given size(s) starting from the front or the back of an input token. * This token filter is implemented using Apache Lucene. */ export declare interface EdgeNGramTokenFilter { /** * Polymorphic Discriminator */ odatatype: "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2" | "#Microsoft.Azure.Search.EdgeNGramTokenFilter"; /** * The name of the token filter. It must only contain letters, digits, spaces, dashes or * underscores, can only start and end with alphanumeric characters, and is limited to 128 * characters. */ name: string; /** * The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of * maxGram. Default value: 1. */ minGram?: number; /** * The maximum n-gram length. Default is 2. Maximum is 300. Default value: 2. */ maxGram?: number; /** * Specifies which side of the input the n-gram should be generated from. Default is "front". * Possible values include: 'Front', 'Back' */ side?: EdgeNGramTokenFilterSide; } /** Defines values for EdgeNGramTokenFilterSide. */ export declare type EdgeNGramTokenFilterSide = "front" | "back"; /** Tokenizes the input from an edge into n-grams of the given size(s). This tokenizer is implemented using Apache Lucene. */ export declare interface EdgeNGramTokenizer extends BaseLexicalTokenizer { /** Polymorphic discriminator, which specifies the different types thi