diff --git a/sdk/search/search-documents/CHANGELOG.md b/sdk/search/search-documents/CHANGELOG.md index 89da8343159c..5951dc33db84 100644 --- a/sdk/search/search-documents/CHANGELOG.md +++ b/sdk/search/search-documents/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 12.2.0 (Unreleased) + +### Features Added + +- Added support for `2025-09-01` service version. + - Support for running `VectorQuery`s against sub-fields of complex fields. + - Support for reranker boosted scores in search results and the ability to sort results on either reranker or reranker + boosted scores in `SemanticConfiguration.rankingOrder`. + - Support for `VectorSearchCompression.RescoringOptions` to configure how vector compression handles the original + vector when indexing and how vectors are used during rescoring. + - Added `SearchIndex.description` to provide a textual description of the index. + - Support for `LexicalNormalizer` when defining `SearchIndex`, `SimpleField`, and `SearchableField` and the ability to + use it when analyzing text with `SearchIndexClient.analyzeText` and `SearchIndexAsyncClient.analyzeText`. + - Support `DocumentIntelligenceLayoutSkill` skillset skill and `OneLake` `SearchIndexerDataSourceConnection` data source. + ## 12.2.0-beta.2 (2024-11-25) ### Features Added diff --git a/sdk/search/search-documents/eslint.config.mjs b/sdk/search/search-documents/eslint.config.mjs index 197f0c237a9d..53ff06d561e4 100644 --- a/sdk/search/search-documents/eslint.config.mjs +++ b/sdk/search/search-documents/eslint.config.mjs @@ -2,6 +2,9 @@ import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; export default azsdkEslint.config([ { + rules: { + "@azure/azure-sdk/ts-naming-options": "warn", + }, files: ["**/*.ts", "**/*.cts", "**/*.mts"], languageOptions: { parserOptions: { diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index d6c7a85f3794..04e1df66d211 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -1,6 +1,6 @@ { "name": "@azure/search-documents", - "version": "12.2.0-beta.2", + "version": "12.2.0", "description": "Azure client library to use Cognitive Search for node.js and browser.", "sdk-type": "client", "main": "./dist/commonjs/index.js", @@ -22,7 +22,7 @@ "test": "npm run test:node && npm run test:browser", "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", "test:node": "dev-tool run test:vitest --test-proxy-debug", - "update-snippets": "dev-tool run update-snippets" + "update-snippets": "echo Skipped." }, "files": [ "dist/", diff --git a/sdk/search/search-documents/review/search-documents-browser.api.diff.md b/sdk/search/search-documents/review/search-documents-browser.api.diff.md index 0a763bc4d14b..9ca6f922773b 100644 --- a/sdk/search/search-documents/review/search-documents-browser.api.diff.md +++ b/sdk/search/search-documents/review/search-documents-browser.api.diff.md @@ -7,7 +7,7 @@ For the complete API surface, see the corresponding -node.api.md file. =================================================================== --- NodeJS +++ browser -@@ -450,9 +450,9 @@ +@@ -357,9 +357,9 @@ // @public export type CreateSkillsetOptions = OperationOptions; diff --git a/sdk/search/search-documents/review/search-documents-node.api.md b/sdk/search/search-documents/review/search-documents-node.api.md index c456fddf5c83..d00c1bb07bca 100644 --- a/sdk/search/search-documents/review/search-documents-node.api.md +++ b/sdk/search/search-documents/review/search-documents-node.api.md @@ -5,47 +5,12 @@ ```ts import { AzureKeyCredential } from '@azure/core-auth'; -import type { ExtendedCommonClientOptions } from '@azure/core-http-compat'; -import type { KeyCredential } from '@azure/core-auth'; -import type { OperationOptions } from '@azure/core-client'; -import type { PagedAsyncIterableIterator } from '@azure/core-paging'; -import type { Pipeline } from '@azure/core-rest-pipeline'; -import type { RestError } from '@azure/core-rest-pipeline'; -import type { TokenCredential } from '@azure/core-auth'; - -// @public -export interface AIServicesAccountIdentity extends BaseCognitiveServicesAccount { - identity?: SearchIndexerDataIdentity; - odatatype: "#Microsoft.Azure.Search.AIServicesByIdentity"; - subdomainUrl: string; -} - -// @public -export interface AIServicesAccountKey extends BaseCognitiveServicesAccount { - key: string; - odatatype: "#Microsoft.Azure.Search.AIServicesByKey"; - subdomainUrl: string; -} - -// @public -export interface AIServicesVisionParameters { - apiKey?: string; - authIdentity?: SearchIndexerDataIdentity; - modelVersion?: string; - resourceUri: string; -} - -// @public -export interface AIServicesVisionVectorizer extends BaseVectorSearchVectorizer { - kind: "aiServicesVision"; - parameters?: AIServicesVisionParameters; -} - -// @public -export type AIStudioModelCatalogName = string; - -// @public -export type AliasIterator = PagedAsyncIterableIterator; +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'; // @public export interface AnalyzedTokenInfo { @@ -59,7 +24,6 @@ export interface AnalyzedTokenInfo { export interface AnalyzeRequest { analyzerName?: LexicalAnalyzerName; charFilters?: CharFilterName[]; - normalizerName?: LexicalNormalizerName; text: string; tokenFilters?: TokenFilterName[]; tokenizerName?: LexicalTokenizerName; @@ -117,26 +81,6 @@ export interface AzureActiveDirectoryApplicationCredentials { export { AzureKeyCredential } -// @public -export interface AzureMachineLearningSkill extends BaseSearchIndexerSkill { - authenticationKey?: string; - degreeOfParallelism?: number; - odatatype: "#Microsoft.Skills.Custom.AmlSkill"; - region?: string; - resourceId?: string; - scoringUri?: string; - timeout?: string; -} - -// @public -export interface AzureMachineLearningVectorizer extends BaseVectorSearchVectorizer { - amlParameters?: AzureMachineLearningVectorizerParameters; - kind: "aml"; -} - -// @public -export type AzureMachineLearningVectorizerParameters = NoAuthAzureMachineLearningVectorizerParameters | KeyAuthAzureMachineLearningVectorizerParameters | TokenAuthAzureMachineLearningVectorizerParameters; - // @public export interface AzureOpenAIEmbeddingSkill extends BaseSearchIndexerSkill, AzureOpenAIParameters { dimensions?: number; @@ -155,24 +99,12 @@ export interface AzureOpenAIParameters { resourceUrl?: string; } -// @public (undocumented) -export interface AzureOpenAITokenizerParameters { - allowedSpecialTokens?: string[]; - encoderModelName?: SplitSkillEncoderModelName; -} - // @public export interface AzureOpenAIVectorizer extends BaseVectorSearchVectorizer { kind: "azureOpenAI"; parameters?: AzureOpenAIParameters; } -// @public -export interface BaseAzureMachineLearningVectorizerParameters { - modelName?: AIStudioModelCatalogName; - timeout?: string; -} - // @public export interface BaseCharFilter { name: string; @@ -182,7 +114,7 @@ export interface BaseCharFilter { // @public export interface BaseCognitiveServicesAccount { description?: string; - odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices" | "#Microsoft.Azure.Search.CognitiveServicesByKey" | "#Microsoft.Azure.Search.AIServicesByKey" | "#Microsoft.Azure.Search.AIServicesByIdentity"; + odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices" | "#Microsoft.Azure.Search.CognitiveServicesByKey"; } // @public @@ -192,7 +124,7 @@ export interface BaseDataChangeDetectionPolicy { // @public export interface BaseDataDeletionDetectionPolicy { - odatatype: "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy" | "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; + odatatype: "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy"; } // @public @@ -232,7 +164,7 @@ export interface BaseSearchIndexerSkill { description?: string; inputs: InputFieldMappingEntry[]; name?: string; - 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.Util.DocumentIntelligenceLayoutSkill" | "#Microsoft.Skills.Custom.WebApiSkill" | "#Microsoft.Skills.Custom.AmlSkill" | "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill" | "#Microsoft.Skills.Vision.VectorizeSkill"; + 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.Util.DocumentIntelligenceLayoutSkill" | "#Microsoft.Skills.Custom.WebApiSkill" | "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"; outputs: OutputFieldMappingEntry[]; } @@ -243,11 +175,9 @@ export interface BaseSearchRequestOptions; sessionId?: string; skip?: number; - speller?: QuerySpeller; top?: number; vectorSearchOptions?: VectorSearchOptions; } @@ -272,11 +201,9 @@ export interface BaseTokenFilter { export interface BaseVectorQuery { exhaustive?: boolean; fields?: SearchFieldArray; - filterOverride?: string; kind: VectorQueryKind; kNearestNeighborsCount?: number; oversampling?: number; - threshold?: VectorThreshold; weight?: number; } @@ -289,9 +216,7 @@ export interface BaseVectorSearchAlgorithmConfiguration { // @public export interface BaseVectorSearchCompression { compressionName: string; - defaultOversampling?: number; kind: "scalarQuantization" | "binaryQuantization"; - rerankWithOriginalVectors?: boolean; rescoringOptions?: RescoringOptions; truncationDimension?: number; } @@ -302,11 +227,6 @@ export interface BaseVectorSearchVectorizer { vectorizerName: string; } -// @public -export interface BaseVectorThreshold { - kind: "vectorSimilarity" | "searchScore"; -} - // @public export interface BinaryQuantizationCompression extends BaseVectorSearchCompression { kind: "binaryQuantization"; @@ -359,7 +279,7 @@ export interface ClassicTokenizer extends BaseLexicalTokenizer { } // @public -export type CognitiveServicesAccount = DefaultCognitiveServicesAccount | CognitiveServicesAccountKey | AIServicesAccountKey | AIServicesAccountIdentity; +export type CognitiveServicesAccount = DefaultCognitiveServicesAccount | CognitiveServicesAccountKey; // @public export interface CognitiveServicesAccountKey extends BaseCognitiveServicesAccount { @@ -399,9 +319,6 @@ export interface CorsOptions { // @public export type CountDocumentsOptions = OperationOptions; -// @public -export type CreateAliasOptions = OperationOptions; - // @public export type CreateDataSourceConnectionOptions = OperationOptions; @@ -411,22 +328,14 @@ export type CreateIndexerOptions = OperationOptions; // @public export type CreateIndexOptions = OperationOptions; -// @public -export interface CreateOrUpdateAliasOptions extends OperationOptions { - onlyIfUnchanged?: boolean; -} - // @public export interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions { onlyIfUnchanged?: boolean; - skipIndexerResetRequirementForCache?: boolean; } // @public export interface CreateorUpdateIndexerOptions extends OperationOptions { - disableCacheReprocessingChangeDetection?: boolean; onlyIfUnchanged?: boolean; - skipIndexerResetRequirementForCache?: boolean; } // @public @@ -437,9 +346,7 @@ export interface CreateOrUpdateIndexOptions extends OperationOptions { // @public export interface CreateOrUpdateSkillsetOptions extends OperationOptions { - disableCacheReprocessingChangeDetection?: boolean; onlyIfUnchanged?: boolean; - skipIndexerResetRequirementForCache?: boolean; } // @public @@ -514,12 +421,7 @@ export interface CustomNormalizer extends BaseLexicalNormalizer { export type DataChangeDetectionPolicy = HighWaterMarkChangeDetectionPolicy | SqlIntegratedChangeTrackingPolicy; // @public -export type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolicy | NativeBlobSoftDeleteDeletionDetectionPolicy; - -// @public -export interface DebugInfo { - readonly queryRewrites?: QueryRewritesDebugInfo; -} +export type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolicy; // @public export const DEFAULT_BATCH_SIZE: number; @@ -535,11 +437,6 @@ export interface DefaultCognitiveServicesAccount extends BaseCognitiveServicesAc odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices"; } -// @public -export interface DeleteAliasOptions extends OperationOptions { - onlyIfUnchanged?: boolean; -} - // @public export interface DeleteDataSourceConnectionOptions extends OperationOptions { onlyIfUnchanged?: boolean; @@ -590,12 +487,6 @@ export interface DistanceScoringParameters { referencePointParameter: string; } -// @public -export interface DocumentDebugInfo { - readonly semantic?: SemanticDebugInfo; - readonly vectors?: VectorsDebugInfo; -} - // @public export interface DocumentExtractionSkill extends BaseSearchIndexerSkill { configuration?: { @@ -606,19 +497,6 @@ export interface DocumentExtractionSkill extends BaseSearchIndexerSkill { parsingMode?: string; } -// @public -export interface DocumentIntelligenceLayoutSkill extends BaseSearchIndexerSkill { - markdownHeaderDepth?: DocumentIntelligenceLayoutSkillMarkdownHeaderDepth; - odatatype: "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; - outputMode?: DocumentIntelligenceLayoutSkillOutputMode; -} - -// @public -export type DocumentIntelligenceLayoutSkillMarkdownHeaderDepth = string; - -// @public -export type DocumentIntelligenceLayoutSkillOutputMode = string; - // @public export interface EdgeNGramTokenFilter { maxGram?: number; @@ -701,7 +579,6 @@ export interface ExtractiveQueryAnswer { // (undocumented) answerType: "extractive"; count?: number; - maxAnswerLength?: number; threshold?: number; } @@ -711,16 +588,12 @@ export interface ExtractiveQueryCaption { captionType: "extractive"; // (undocumented) highlight?: boolean; - maxCaptionLength?: number; } // @public export interface FacetResult { [property: string]: any; readonly count?: number; - readonly facets?: { - [propertyName: string]: FacetResult[]; - }; } // @public @@ -749,12 +622,6 @@ export interface FreshnessScoringParameters { boostingDuration: string; } -// @public -export interface GenerativeQueryRewrites { - count?: number; - rewritesType: "generative"; -} - // @public export class GeographyPoint { constructor(geographyPoint: { @@ -766,9 +633,6 @@ export class GeographyPoint { toJSON(): Record; } -// @public -export type GetAliasOptions = OperationOptions; - // @public export type GetDataSourceConnectionOptions = OperationOptions; @@ -818,15 +682,6 @@ export interface HnswParameters { metric?: VectorSearchAlgorithmMetric; } -// @public -export type HybridCountAndFacetMode = string; - -// @public -export interface HybridSearchOptions { - countAndFacetMode?: HybridCountAndFacetMode; - maxTextRecallSize?: number; -} - // @public export interface ImageAnalysisSkill extends BaseSearchIndexerSkill { defaultLanguageCode?: ImageAnalysisSkillLanguage; @@ -888,7 +743,6 @@ export type IndexerExecutionEnvironment = `${KnownIndexerExecutionEnvironment}`; // @public export interface IndexerExecutionResult { - readonly currentState?: IndexerState; readonly endTime?: Date; readonly errorMessage?: string; readonly errors: SearchIndexerError[]; @@ -898,33 +752,15 @@ export interface IndexerExecutionResult { readonly itemCount: number; readonly startTime?: Date; readonly status: IndexerExecutionStatus; - readonly statusDetail?: IndexerExecutionStatusDetail; readonly warnings: SearchIndexerWarning[]; } // @public export type IndexerExecutionStatus = "transientFailure" | "success" | "inProgress" | "reset"; -// @public -export type IndexerExecutionStatusDetail = string; - -// @public -export interface IndexerState { - readonly allDocumentsFinalChangeTrackingState?: string; - readonly allDocumentsInitialChangeTrackingState?: string; - readonly mode?: IndexingMode; - readonly resetDatasourceDocumentIds?: string[]; - readonly resetDocumentKeys?: string[]; - readonly resetDocumentsFinalChangeTrackingState?: string; - readonly resetDocumentsInitialChangeTrackingState?: string; -} - // @public export type IndexerStatus = "unknown" | "error" | "running"; -// @public -export type IndexingMode = string; - // @public export interface IndexingParameters { batchSize?: number; @@ -949,8 +785,6 @@ export interface IndexingParametersConfiguration { imageAction?: BlobIndexerImageAction; indexedFileNameExtensions?: string; indexStorageMetadataOnlyForOversizedDocuments?: boolean; - markdownHeaderDepth?: MarkdownHeaderDepth; - markdownParsingSubmode?: MarkdownParsingSubmode; parsingMode?: BlobIndexerParsingMode; pdfTextRotationAlgorithm?: BlobIndexerPDFTextRotationAlgorithm; queryTimeout?: string; @@ -994,13 +828,6 @@ export interface KeepTokenFilter extends BaseTokenFilter { odatatype: "#Microsoft.Azure.Search.KeepTokenFilter"; } -// @public -export interface KeyAuthAzureMachineLearningVectorizerParameters extends BaseAzureMachineLearningVectorizerParameters { - authenticationKey: string; - authKind: "key"; - scoringUri: string; -} - // @public export interface KeyPhraseExtractionSkill extends BaseSearchIndexerSkill { defaultLanguageCode?: KeyPhraseExtractionSkillLanguage; @@ -1026,16 +853,6 @@ export interface KeywordTokenizer { odatatype: "#Microsoft.Azure.Search.KeywordTokenizerV2" | "#Microsoft.Azure.Search.KeywordTokenizer"; } -// @public -export enum KnownAIStudioModelCatalogName { - CohereEmbedV3English = "Cohere-embed-v3-english", - CohereEmbedV3Multilingual = "Cohere-embed-v3-multilingual", - FacebookDinoV2ImageEmbeddingsViTBase = "Facebook-DinoV2-Image-Embeddings-ViT-Base", - FacebookDinoV2ImageEmbeddingsViTGiant = "Facebook-DinoV2-Image-Embeddings-ViT-Giant", - OpenAIClipImageTextEmbeddingsVitBasePatch32 = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32", - OpenAIClipImageTextEmbeddingsViTLargePatch14336 = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336" -} - // @public export enum KnownAnalyzerNames { ArLucene = "ar.lucene", @@ -1161,7 +978,6 @@ export enum KnownBlobIndexerParsingMode { Json = "json", JsonArray = "jsonArray", JsonLines = "jsonLines", - Markdown = "markdown", Text = "text" } @@ -1189,21 +1005,6 @@ export enum KnownCustomEntityLookupSkillLanguage { Pt = "pt" } -// @public -export enum KnownDocumentIntelligenceLayoutSkillMarkdownHeaderDepth { - H1 = "h1", - H2 = "h2", - H3 = "h3", - H4 = "h4", - H5 = "h5", - H6 = "h6" -} - -// @public -export enum KnownDocumentIntelligenceLayoutSkillOutputMode { - OneToMany = "oneToMany" -} - // @public export enum KnownEntityCategory { Datetime = "datetime", @@ -1242,12 +1043,6 @@ export enum KnownEntityRecognitionSkillLanguage { ZhHant = "zh-Hant" } -// @public -export enum KnownHybridCountAndFacetMode { - CountAllResults = "countAllResults", - CountRetrievableResults = "countRetrievableResults" -} - // @public export enum KnownImageAnalysisSkillLanguage { Ar = "ar", @@ -1316,17 +1111,6 @@ export enum KnownIndexerExecutionEnvironment { Standard = "standard" } -// @public -export enum KnownIndexerExecutionStatusDetail { - ResetDocs = "resetDocs" -} - -// @public -export enum KnownIndexingMode { - IndexingAllDocs = "indexingAllDocs", - IndexingResetDocs = "indexingResetDocs" -} - // @public export enum KnownIndexProjectionMode { IncludeIndexingParentDocuments = "includeIndexingParentDocuments", @@ -1354,128 +1138,13 @@ export enum KnownKeyPhraseExtractionSkillLanguage { } // @public -export enum KnownLexicalAnalyzerName { - ArLucene = "ar.lucene", - ArMicrosoft = "ar.microsoft", - BgLucene = "bg.lucene", - BgMicrosoft = "bg.microsoft", - BnMicrosoft = "bn.microsoft", - CaLucene = "ca.lucene", - CaMicrosoft = "ca.microsoft", - CsLucene = "cs.lucene", - CsMicrosoft = "cs.microsoft", - DaLucene = "da.lucene", - DaMicrosoft = "da.microsoft", - DeLucene = "de.lucene", - DeMicrosoft = "de.microsoft", - ElLucene = "el.lucene", - ElMicrosoft = "el.microsoft", - EnLucene = "en.lucene", - EnMicrosoft = "en.microsoft", - EsLucene = "es.lucene", - EsMicrosoft = "es.microsoft", - EtMicrosoft = "et.microsoft", - EuLucene = "eu.lucene", - FaLucene = "fa.lucene", - FiLucene = "fi.lucene", - FiMicrosoft = "fi.microsoft", - FrLucene = "fr.lucene", - FrMicrosoft = "fr.microsoft", - GaLucene = "ga.lucene", - GlLucene = "gl.lucene", - GuMicrosoft = "gu.microsoft", - HeMicrosoft = "he.microsoft", - HiLucene = "hi.lucene", - HiMicrosoft = "hi.microsoft", - HrMicrosoft = "hr.microsoft", - HuLucene = "hu.lucene", - HuMicrosoft = "hu.microsoft", - HyLucene = "hy.lucene", - IdLucene = "id.lucene", - IdMicrosoft = "id.microsoft", - IsMicrosoft = "is.microsoft", - ItLucene = "it.lucene", - ItMicrosoft = "it.microsoft", - JaLucene = "ja.lucene", - JaMicrosoft = "ja.microsoft", - Keyword = "keyword", - KnMicrosoft = "kn.microsoft", - KoLucene = "ko.lucene", - KoMicrosoft = "ko.microsoft", - LtMicrosoft = "lt.microsoft", - LvLucene = "lv.lucene", - LvMicrosoft = "lv.microsoft", - MlMicrosoft = "ml.microsoft", - MrMicrosoft = "mr.microsoft", - MsMicrosoft = "ms.microsoft", - NbMicrosoft = "nb.microsoft", - NlLucene = "nl.lucene", - NlMicrosoft = "nl.microsoft", - NoLucene = "no.lucene", - PaMicrosoft = "pa.microsoft", - Pattern = "pattern", - PlLucene = "pl.lucene", - PlMicrosoft = "pl.microsoft", - PtBrLucene = "pt-BR.lucene", - PtBrMicrosoft = "pt-BR.microsoft", - PtPtLucene = "pt-PT.lucene", - PtPtMicrosoft = "pt-PT.microsoft", - RoLucene = "ro.lucene", - RoMicrosoft = "ro.microsoft", - RuLucene = "ru.lucene", - RuMicrosoft = "ru.microsoft", - Simple = "simple", - SkMicrosoft = "sk.microsoft", - SlMicrosoft = "sl.microsoft", - SrCyrillicMicrosoft = "sr-cyrillic.microsoft", - SrLatinMicrosoft = "sr-latin.microsoft", - StandardAsciiFoldingLucene = "standardasciifolding.lucene", - StandardLucene = "standard.lucene", - Stop = "stop", - SvLucene = "sv.lucene", - SvMicrosoft = "sv.microsoft", - TaMicrosoft = "ta.microsoft", - TeMicrosoft = "te.microsoft", - ThLucene = "th.lucene", - ThMicrosoft = "th.microsoft", - TrLucene = "tr.lucene", - TrMicrosoft = "tr.microsoft", - UkMicrosoft = "uk.microsoft", - UrMicrosoft = "ur.microsoft", - ViMicrosoft = "vi.microsoft", - Whitespace = "whitespace", - ZhHansLucene = "zh-Hans.lucene", - ZhHansMicrosoft = "zh-Hans.microsoft", - ZhHantLucene = "zh-Hant.lucene", - ZhHantMicrosoft = "zh-Hant.microsoft" -} - -// @public -enum KnownLexicalNormalizerName { +export enum KnownLexicalNormalizerNames { AsciiFolding = "asciifolding", Elision = "elision", Lowercase = "lowercase", Standard = "standard", Uppercase = "uppercase" } -export { KnownLexicalNormalizerName } -export { KnownLexicalNormalizerName as KnownNormalizerNames } - -// @public -export enum KnownMarkdownHeaderDepth { - H1 = "h1", - H2 = "h2", - H3 = "h3", - H4 = "h4", - H5 = "h5", - H6 = "h6" -} - -// @public -export enum KnownMarkdownParsingSubmode { - OneToMany = "oneToMany", - OneToOne = "oneToOne" -} // @public export enum KnownOcrLineEnding { @@ -1666,94 +1335,9 @@ export enum KnownPIIDetectionSkillMaskingMode { } // @public -export enum KnownQueryDebugMode { - All = "all", - Disabled = "disabled", - QueryRewrites = "queryRewrites", - Semantic = "semantic", - Vector = "vector" -} - -// @public -export enum KnownQueryLanguage { - ArEg = "ar-eg", - ArJo = "ar-jo", - ArKw = "ar-kw", - ArMa = "ar-ma", - ArSa = "ar-sa", - BgBg = "bg-bg", - BnIn = "bn-in", - CaEs = "ca-es", - CsCz = "cs-cz", - DaDk = "da-dk", - DeDe = "de-de", - ElGr = "el-gr", - EnAu = "en-au", - EnCa = "en-ca", - EnGb = "en-gb", - EnIn = "en-in", - EnUs = "en-us", - EsEs = "es-es", - EsMx = "es-mx", - EtEe = "et-ee", - EuEs = "eu-es", - FaAe = "fa-ae", - FiFi = "fi-fi", - FrCa = "fr-ca", - FrFr = "fr-fr", - GaIe = "ga-ie", - GlEs = "gl-es", - GuIn = "gu-in", - HeIl = "he-il", - HiIn = "hi-in", - HrBa = "hr-ba", - HrHr = "hr-hr", - HuHu = "hu-hu", - HyAm = "hy-am", - IdId = "id-id", - IsIs = "is-is", - ItIt = "it-it", - JaJp = "ja-jp", - KnIn = "kn-in", - KoKr = "ko-kr", - LtLt = "lt-lt", - LvLv = "lv-lv", - MlIn = "ml-in", - MrIn = "mr-in", - MsBn = "ms-bn", - MsMy = "ms-my", - NbNo = "nb-no", - NlBe = "nl-be", - NlNl = "nl-nl", - None = "none", - NoNo = "no-no", - PaIn = "pa-in", - PlPl = "pl-pl", - PtBr = "pt-br", - PtPt = "pt-pt", - RoRo = "ro-ro", - RuRu = "ru-ru", - SkSk = "sk-sk", - SlSl = "sl-sl", - SrBa = "sr-ba", - SrMe = "sr-me", - SrRs = "sr-rs", - SvSe = "sv-se", - TaIn = "ta-in", - TeIn = "te-in", - ThTh = "th-th", - TrTr = "tr-tr", - UkUa = "uk-ua", - UrPk = "ur-pk", - ViVn = "vi-vn", - ZhCn = "zh-cn", - ZhTw = "zh-tw" -} - -// @public -export enum KnownQuerySpeller { - Lexicon = "lexicon", - None = "none" +export enum KnownRankingOrder { + BoostedRerankerScore = "BoostedRerankerScore", + ReRankerScore = "RerankerScore" } // @public @@ -1816,18 +1400,6 @@ export enum KnownSemanticErrorReason { Transient = "transient" } -// @public -export enum KnownSemanticFieldState { - Partial = "partial", - Unused = "unused", - Used = "used" -} - -// @public -export enum KnownSemanticQueryRewritesResultType { - OriginalQueryOnly = "originalQueryOnly" -} - // @public export enum KnownSemanticSearchResultsType { BaseResults = "baseResults", @@ -1853,14 +1425,6 @@ export enum KnownSentimentSkillLanguage { Tr = "tr" } -// @public -export enum KnownSplitSkillEncoderModelName { - CL100KBase = "cl100k_base", - P50KBase = "p50k_base", - P50KEdit = "p50k_edit", - R50KBase = "r50k_base" -} - // @public export enum KnownSplitSkillLanguage { Am = "am", @@ -1898,12 +1462,6 @@ export enum KnownSplitSkillLanguage { Zh = "zh" } -// @public -export enum KnownSplitSkillUnit { - AzureOpenAITokens = "azureOpenAITokens", - Characters = "characters" -} - // @public export enum KnownTextSplitMode { Pages = "pages", @@ -2054,8 +1612,6 @@ export enum KnownVectorFilterMode { // @public export enum KnownVectorQueryKind { - ImageBinary = "imageBinary", - ImageUrl = "imageUrl", Text = "text", Vector = "vector" } @@ -2093,18 +1649,10 @@ export enum KnownVectorSearchCompressionTarget { // @public export enum KnownVectorSearchVectorizerKind { - AIServicesVision = "aiServicesVision", - AML = "aml", AzureOpenAI = "azureOpenAI", CustomWebApi = "customWebApi" } -// @public -export enum KnownVectorThresholdKind { - SearchScore = "searchScore", - VectorSimilarity = "vectorSimilarity" -} - // @public export enum KnownVisualFeature { Adult = "adult", @@ -2137,7 +1685,7 @@ export type LexicalAnalyzer = CustomAnalyzer | PatternAnalyzer | LuceneStandardA export type LexicalAnalyzerName = string; // @public -export type LexicalNormalizer = CustomNormalizer; +export type LexicalNormalizer = CustomNormalizer | BaseLexicalNormalizer; // @public export type LexicalNormalizerName = string; @@ -2155,9 +1703,6 @@ export interface LimitTokenFilter extends BaseTokenFilter { odatatype: "#Microsoft.Azure.Search.LimitTokenFilter"; } -// @public -export type ListAliasesOptions = OperationOptions; - // @public export type ListDataSourceConnectionsOptions = OperationOptions; @@ -2211,12 +1756,6 @@ export interface MappingCharFilter extends BaseCharFilter { odatatype: "#Microsoft.Azure.Search.MappingCharFilter"; } -// @public -export type MarkdownHeaderDepth = string; - -// @public -export type MarkdownParsingSubmode = string; - // @public export type MergeDocumentsOptions = IndexDocumentsOptions; @@ -2255,11 +1794,6 @@ export type MicrosoftTokenizerLanguage = "bangla" | "bulgarian" | "catalan" | "c // @public export type NarrowedModel = SelectFields> = (() => T extends TModel ? true : false) extends () => T extends never ? true : false ? TModel : (() => T extends TModel ? true : false) extends () => T extends object ? true : false ? TModel : (() => T extends TModel ? true : false) extends () => T extends any ? true : false ? TModel : (() => T extends TModel ? true : false) extends () => T extends unknown ? true : false ? TModel : (() => T extends TFields ? true : false) extends () => T extends never ? true : false ? never : (() => T extends TFields ? true : false) extends () => T extends SelectFields ? true : false ? TModel : SearchPick; -// @public -export interface NativeBlobSoftDeleteDeletionDetectionPolicy extends BaseDataDeletionDetectionPolicy { - odatatype: "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; -} - // @public export interface NGramTokenFilter { maxGram?: number; @@ -2276,19 +1810,12 @@ export interface NGramTokenizer extends BaseLexicalTokenizer { tokenChars?: TokenCharacterKind[]; } -// @public -export interface NoAuthAzureMachineLearningVectorizerParameters extends BaseAzureMachineLearningVectorizerParameters { - authKind: "none"; - scoringUri: string; -} - // @public export type OcrLineEnding = string; // @public export interface OcrSkill extends BaseSearchIndexerSkill { defaultLanguageCode?: OcrSkillLanguage; - lineEnding?: OcrLineEnding; odatatype: "#Microsoft.Skills.Vision.OcrSkill"; shouldDetectOrientation?: boolean; } @@ -2403,53 +1930,10 @@ export interface QueryCaptionResult { } // @public -export type QueryDebugMode = string; - -// @public -export type QueryLanguage = string; - -// @public -export interface QueryResultDocumentRerankerInput { - readonly content?: string; - readonly keywords?: string; - readonly title?: string; -} - -// @public -export interface QueryResultDocumentSemanticField { - readonly name?: string; - readonly state?: SemanticFieldState; -} - -// @public -export interface QueryResultDocumentSubscores { - readonly documentBoost?: number; - readonly text?: TextResult; - readonly vectors?: { - [propertyName: string]: SingleVectorFieldResult; - }[]; -} - -// @public -export type QueryRewrites = GenerativeQueryRewrites; - -// @public -export interface QueryRewritesDebugInfo { - readonly text?: QueryRewritesValuesDebugInfo; - readonly vectors?: QueryRewritesValuesDebugInfo[]; -} - -// @public -export interface QueryRewritesValuesDebugInfo { - readonly inputQuery?: string; - readonly rewrites?: string[]; -} - -// @public -export type QuerySpeller = string; +export type QueryType = "simple" | "full" | "semantic"; // @public -export type QueryType = "simple" | "full" | "semantic"; +export type RankingOrder = string; // @public (undocumented) export type RegexFlags = `${KnownRegexFlags}`; @@ -2461,21 +1945,9 @@ export interface RescoringOptions { rescoreStorageMethod?: VectorSearchCompressionRescoreStorageMethod; } -// @public -export interface ResetDocumentsOptions extends OperationOptions { - datasourceDocumentIds?: string[]; - documentKeys?: string[]; - overwrite?: boolean; -} - // @public export type ResetIndexerOptions = OperationOptions; -// @public -export interface ResetSkillsOptions extends OperationOptions { - skillNames?: string[]; -} - // @public export interface ResourceCounter { quota?: number; @@ -2516,13 +1988,6 @@ export interface ScoringProfile { // @public export type ScoringStatistics = "local" | "global"; -// @public -export interface SearchAlias { - etag?: string; - indexes: string[]; - name: string; -} - // @public export class SearchClient implements IndexDocumentsClient { constructor(endpoint: string, indexName: string, credential: KeyCredential | TokenCredential, options?: SearchClientOptions); @@ -2538,7 +2003,6 @@ export class SearchClient implements IndexDocumentsClient readonly indexName: string; mergeDocuments(documents: TModel[], options?: MergeDocumentsOptions): Promise; mergeOrUploadDocuments(documents: TModel[], options?: MergeOrUploadDocumentsOptions): Promise; - readonly pipeline: Pipeline; search>(searchText?: string, options?: SearchOptions): Promise>; readonly serviceVersion: string; suggest = never>(searchText: string, suggesterName: string, options?: SuggestOptions): Promise>; @@ -2569,12 +2033,10 @@ export interface SearchDocumentsResultBase { readonly answers?: QueryAnswerResult[]; readonly count?: number; readonly coverage?: number; - readonly debugInfo?: DebugInfo; readonly facets?: { [propertyName: string]: FacetResult[]; }; readonly semanticErrorReason?: SemanticErrorReason; - readonly semanticQueryRewritesResultType?: SemanticQueryRewritesResultType; readonly semanticSearchResultsType?: SemanticSearchResultsType; } @@ -2593,6 +2055,7 @@ export interface SearchIndex { charFilters?: CharFilter[]; corsOptions?: CorsOptions; defaultScoringProfile?: string; + description?: string; encryptionKey?: SearchResourceEncryptionKey; etag?: string; fields: SearchField[]; @@ -2607,37 +2070,28 @@ export interface SearchIndex { vectorSearch?: VectorSearch; } -// @public -export type SearchIndexAlias = SearchAlias; - // @public export class SearchIndexClient { constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: SearchIndexClientOptions); analyzeText(indexName: string, options: AnalyzeTextOptions): Promise; // @deprecated readonly apiVersion: string; - createAlias(alias: SearchIndexAlias, options?: CreateAliasOptions): Promise; createIndex(index: SearchIndex, options?: CreateIndexOptions): Promise; - createOrUpdateAlias(alias: SearchIndexAlias, options?: CreateOrUpdateAliasOptions): Promise; createOrUpdateIndex(index: SearchIndex, options?: CreateOrUpdateIndexOptions): Promise; createOrUpdateSynonymMap(synonymMap: SynonymMap, options?: CreateOrUpdateSynonymMapOptions): Promise; createSynonymMap(synonymMap: SynonymMap, options?: CreateSynonymMapOptions): Promise; - deleteAlias(alias: string | SearchIndexAlias, options?: DeleteAliasOptions): Promise; deleteIndex(index: string | SearchIndex, options?: DeleteIndexOptions): Promise; deleteSynonymMap(synonymMap: string | SynonymMap, options?: DeleteSynonymMapOptions): Promise; readonly endpoint: string; - getAlias(aliasName: string, options?: GetAliasOptions): Promise; getIndex(indexName: string, options?: GetIndexOptions): Promise; getIndexStatistics(indexName: string, options?: GetIndexStatisticsOptions): Promise; getSearchClient(indexName: string, options?: SearchClientOptions): SearchClient; getServiceStatistics(options?: GetServiceStatisticsOptions): Promise; getSynonymMap(synonymMapName: string, options?: GetSynonymMapsOptions): Promise; - listAliases(options?: ListAliasesOptions): AliasIterator; listIndexes(options?: ListIndexesOptions): IndexIterator; listIndexesNames(options?: ListIndexesOptions): IndexNameIterator; listSynonymMaps(options?: ListSynonymMapsOptions): Promise>; listSynonymMapsNames(options?: ListSynonymMapsOptions): Promise>; - readonly pipeline: Pipeline; readonly serviceVersion: string; } @@ -2651,7 +2105,6 @@ export interface SearchIndexClientOptions extends ExtendedCommonClientOptions { // @public export interface SearchIndexer { - cache?: SearchIndexerCache; dataSourceName: string; description?: string; encryptionKey?: SearchResourceEncryptionKey; @@ -2666,13 +2119,6 @@ export interface SearchIndexer { targetIndexName: string; } -// @public (undocumented) -export interface SearchIndexerCache { - enableReprocessing?: boolean; - identity?: SearchIndexerDataIdentity; - storageConnectionString?: string; -} - // @public export class SearchIndexerClient { constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: SearchIndexerClientOptions); @@ -2698,10 +2144,7 @@ export class SearchIndexerClient { listIndexersNames(options?: ListIndexersOptions): Promise>; listSkillsets(options?: ListSkillsetsOptions): Promise>; listSkillsetsNames(options?: ListSkillsetsOptions): Promise>; - readonly pipeline: Pipeline; - resetDocuments(indexerName: string, options?: ResetDocumentsOptions): Promise; resetIndexer(indexerName: string, options?: ResetIndexerOptions): Promise; - resetSkills(skillsetName: string, options?: ResetSkillsOptions): Promise; runIndexer(indexerName: string, options?: RunIndexerOptions): Promise; readonly serviceVersion: string; } @@ -2836,7 +2279,7 @@ export interface SearchIndexerLimits { } // @public -export type SearchIndexerSkill = AzureMachineLearningSkill | AzureOpenAIEmbeddingSkill | ConditionalSkill | CustomEntityLookupSkill | DocumentExtractionSkill | DocumentIntelligenceLayoutSkill | EntityLinkingSkill | EntityRecognitionSkill | EntityRecognitionSkillV3 | ImageAnalysisSkill | KeyPhraseExtractionSkill | LanguageDetectionSkill | MergeSkill | OcrSkill | PIIDetectionSkill | SentimentSkill | SentimentSkillV3 | ShaperSkill | SplitSkill | TextTranslationSkill | VisionVectorizeSkill | WebApiSkill; +export type SearchIndexerSkill = AzureOpenAIEmbeddingSkill | ConditionalSkill | CustomEntityLookupSkill | DocumentExtractionSkill | EntityLinkingSkill | EntityRecognitionSkill | EntityRecognitionSkillV3 | ImageAnalysisSkill | KeyPhraseExtractionSkill | LanguageDetectionSkill | MergeSkill | OcrSkill | PIIDetectionSkill | SentimentSkill | SentimentSkillV3 | ShaperSkill | SplitSkill | TextTranslationSkill | WebApiSkill; // @public export interface SearchIndexerSkillset { @@ -2855,6 +2298,7 @@ export interface SearchIndexerStatus { readonly executionHistory: IndexerExecutionResult[]; readonly lastResult?: IndexerExecutionResult; readonly limits: SearchIndexerLimits; + readonly name: string; readonly status: IndexerStatus; } @@ -2966,20 +2410,14 @@ export interface SearchResourceEncryptionKey { export type SearchResult = SelectFields> = { readonly score: number; readonly rerankerScore?: number; + readonly rerankerBoostedScore?: number; readonly highlights?: { [k in SelectFields]?: string[]; }; readonly captions?: QueryCaptionResult[]; document: NarrowedModel; - readonly documentDebugInfo?: DocumentDebugInfo; }; -// @public -export interface SearchScoreThreshold extends BaseVectorThreshold { - kind: "searchScore"; - value: number; -} - // @public export interface SearchServiceStatistics { counters: ServiceCounters; @@ -3005,14 +2443,7 @@ export type SelectFields = (() => T extends TModel ? t export interface SemanticConfiguration { name: string; prioritizedFields: SemanticPrioritizedFields; -} - -// @public -export interface SemanticDebugInfo { - readonly contentFields?: QueryResultDocumentSemanticField[]; - readonly keywordFields?: QueryResultDocumentSemanticField[]; - readonly rerankerInput?: QueryResultDocumentRerankerInput; - readonly titleField?: QueryResultDocumentSemanticField; + rankingOrder?: RankingOrder; } // @public (undocumented) @@ -3027,9 +2458,6 @@ export interface SemanticField { name: string; } -// @public -export type SemanticFieldState = string; - // @public export interface SemanticPrioritizedFields { contentFields?: SemanticField[]; @@ -3037,9 +2465,6 @@ export interface SemanticPrioritizedFields { titleField?: SemanticField; } -// @public -export type SemanticQueryRewritesResultType = string; - // @public export interface SemanticSearch { configurations?: SemanticConfiguration[]; @@ -3051,11 +2476,8 @@ export interface SemanticSearchOptions { answers?: QueryAnswer; captions?: QueryCaption; configurationName?: string; - debugMode?: QueryDebugMode; errorMode?: SemanticErrorMode; maxWaitInMilliseconds?: number; - queryRewrites?: QueryRewrites; - semanticFields?: string[]; semanticQuery?: string; } @@ -3081,7 +2503,6 @@ export interface SentimentSkillV3 extends BaseSearchIndexerSkill { // @public export interface ServiceCounters { - aliasCounter: ResourceCounter; dataSourceCounter: ResourceCounter; documentCounter: ResourceCounter; indexCounter: ResourceCounter; @@ -3146,12 +2567,6 @@ export interface SimpleField { vectorSearchProfileName?: string; } -// @public -export interface SingleVectorFieldResult { - readonly searchScore?: number; - readonly vectorSimilarity?: number; -} - // @public export interface SnowballTokenFilter extends BaseTokenFilter { language: SnowballTokenFilterLanguage; @@ -3170,25 +2585,15 @@ export interface SoftDeleteColumnDeletionDetectionPolicy extends BaseDataDeletio // @public export interface SplitSkill extends BaseSearchIndexerSkill { - azureOpenAITokenizerParameters?: AzureOpenAITokenizerParameters; defaultLanguageCode?: SplitSkillLanguage; - maximumPagesToTake?: number; maxPageLength?: number; odatatype: "#Microsoft.Skills.Text.SplitSkill"; - pageOverlapLength?: number; textSplitMode?: TextSplitMode; - unit?: SplitSkillUnit; } -// @public -export type SplitSkillEncoderModelName = string; - // @public (undocumented) export type SplitSkillLanguage = `${KnownSplitSkillLanguage}`; -// @public -export type SplitSkillUnit = string; - // @public export interface SqlIntegratedChangeTrackingPolicy extends BaseDataChangeDetectionPolicy { odatatype: "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy"; @@ -3285,11 +2690,6 @@ export interface TagScoringParameters { tagsParameter: string; } -// @public -export interface TextResult { - readonly searchScore?: number; -} - // @public (undocumented) export type TextSplitMode = `${KnownTextSplitMode}`; @@ -3311,13 +2711,6 @@ export interface TextWeights { }; } -// @public -export interface TokenAuthAzureMachineLearningVectorizerParameters extends BaseAzureMachineLearningVectorizerParameters { - authKind: "token"; - region?: string; - resourceId: string; -} - // @public export type TokenCharacterKind = "letter" | "digit" | "whitespace" | "punctuation" | "symbol"; @@ -3357,22 +2750,9 @@ export type VectorEncodingFormat = string; // @public (undocumented) export type VectorFilterMode = `${KnownVectorFilterMode}`; -// @public -export interface VectorizableImageBinaryQuery extends BaseVectorQuery { - binaryImage: string; - kind: "imageBinary"; -} - -// @public -export interface VectorizableImageUrlQuery extends BaseVectorQuery { - kind: "imageUrl"; - url: string; -} - // @public export interface VectorizableTextQuery extends BaseVectorQuery { kind: "text"; - queryRewrites?: QueryRewrites; text: string; } @@ -3383,16 +2763,11 @@ export interface VectorizedQuery extends BaseVectorQuery< } // @public -export type VectorQuery = VectorizedQuery | VectorizableTextQuery | VectorizableImageUrlQuery | VectorizableImageBinaryQuery; +export type VectorQuery = VectorizedQuery | VectorizableTextQuery; // @public (undocumented) export type VectorQueryKind = `${KnownVectorQueryKind}`; -// @public (undocumented) -export interface VectorsDebugInfo { - readonly subscores?: QueryResultDocumentSubscores; -} - // @public export interface VectorSearch { algorithms?: VectorSearchAlgorithmConfiguration[]; @@ -3437,26 +2812,11 @@ export interface VectorSearchProfile { } // @public -export type VectorSearchVectorizer = AIServicesVisionVectorizer | AzureMachineLearningVectorizer | AzureOpenAIVectorizer | WebApiVectorizer; +export type VectorSearchVectorizer = AzureOpenAIVectorizer | WebApiVectorizer; // @public export type VectorSearchVectorizerKind = string; -// @public -export interface VectorSimilarityThreshold extends BaseVectorThreshold { - kind: "vectorSimilarity"; - value: number; -} - -// @public -export type VectorThreshold = VectorSimilarityThreshold | SearchScoreThreshold; - -// @public -export interface VisionVectorizeSkill extends BaseSearchIndexerSkill { - modelVersion?: string; - odatatype: "#Microsoft.Skills.Vision.VectorizeSkill"; -} - // @public (undocumented) export type VisualFeature = `${KnownVisualFeature}`; diff --git a/sdk/search/search-documents/src/TROUBLESHOOTING.md b/sdk/search/search-documents/src/TROUBLESHOOTING.md index efa5656e2bb0..679b79eaba26 100644 --- a/sdk/search/search-documents/src/TROUBLESHOOTING.md +++ b/sdk/search/search-documents/src/TROUBLESHOOTING.md @@ -1,7 +1,7 @@ # Troubleshooting Azure Cognitive Search SDK Issues The `azure-search-documents` package provides APIs for operations on the -[Azure Cognitive Search](https://learn.microsoft.com/azure/search/search-what-is-azure-search) cloud service. +[Azure Cognitive Search](https://docs.microsoft.com/azure/search/search-what-is-azure-search) cloud service. ## Table of Contents @@ -13,18 +13,18 @@ The `azure-search-documents` package provides APIs for operations on the ## Troubleshooting Issues By Response Code -See [this page](https://learn.microsoft.com/rest/api/searchservice/http-status-codes) for the common response status codes sent by the Azure Cognitive Search service. +See [this page](https://docs.microsoft.com/rest/api/searchservice/http-status-codes) for the common response status codes sent by the Azure Cognitive Search service. ### 207 Multi-Status -This response status indicates a partial success for an indexing operation. Some documents were successfully processed, but at least one failed. Details of the failed documents are present in the individual `IndexingResult` objects within the `IndexDocumentsResult`. If you want the [`indexDocuments`](https://learn.microsoft.com/javascript/api/@azure/search-documents/searchclient?view=azure-node-latest#@azure-search-documents-searchclient-indexdocuments) method call to throw an exception on any failure, set [`IndexDocumentsOptions.throwOnAnyError`](https://learn.microsoft.com/javascript/api/@azure/search-documents/indexdocumentsoptions?view=azure-node-latest#@azure-search-documents-indexdocumentsoptions-throwonanyfailure) +This response status indicates a partial success for an indexing operation. Some documents were successfully processed, but at least one failed. Details of the failed documents are present in the individual `IndexingResult` objects within the `IndexDocumentsResult`. If you want the [`indexDocuments`](https://docs.microsoft.com/javascript/api/@azure/search-documents/searchclient?view=azure-node-latest#@azure-search-documents-searchclient-indexdocuments) method call to throw an exception on any failure, set [`IndexDocumentsOptions.throwOnAnyError`](https://docs.microsoft.com/javascript/api/@azure/search-documents/indexdocumentsoptions?view=azure-node-latest#@azure-search-documents-indexdocumentsoptions-throwonanyfailure) to `true`. Each failure is then recorded in a separate `IndexingResult` and a single `IndexBatchException` is thrown by the method. ### 403 Forbidden Returned when you pass an invalid api-key. Search service uses two types of keys to control access: admin (read-write) and query (read-only). The **admin key** grants full rights to all operations, including the ability to manage the service, create and delete indexes, indexers, and data sources. The **query key** grants read-only access to indexes and documents. -Ensure that the key used for an API call provides sufficient privileges for the operation. See [here](https://learn.microsoft.com/azure/search/search-security-api-keys) +Ensure that the key used for an API call provides sufficient privileges for the operation. See [here](https://docs.microsoft.com/azure/search/search-security-api-keys) for details about managing API keys. If you are using the `azure-identity` package to authenticate requests to Azure Cognitive Search, please see our [troubleshooting guide](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/TROUBLESHOOTING.md). @@ -37,7 +37,7 @@ Returned when a resource does not exist on the server. If you are managing or qu If this error occurs while you are trying to create an index, it means you already have the maximum number of indexes allowed for your pricing tier. A count of the indexes stored in Azure Cognitive Search is visible in the search service dashboard on the [Azure portal](https://portal.azure.com/). To view the indexes by name, click the Index tile. -Alternatively, you can also get a list of the indexes by name using the [listIndexNames() method](https://learn.microsoft.com/javascript/api/@azure/search-documents/searchindexclient?view=azure-node-latest#@azure-search-documents-searchindexclient-listindexesnames). +Alternatively, you can also get a list of the indexes by name using the [listIndexNames() method](https://docs.microsoft.com/javascript/api/@azure/search-documents/searchindexclient?view=azure-node-latest#@azure-search-documents-searchindexclient-listindexesnames). If this error occurs during document upload, it indicates that you've exceeded your quota on the number of documents per index. You must either create a new index or upgrade for higher capacity limits. @@ -45,7 +45,9 @@ If this error occurs during document upload, it indicates that you've exceeded y A common class of issues when using the Search SDK is that the result set of a search query is different from what is expected. -For such cases, you should start by running the search query in the portal to rule out any service-side issues with the search query or any parameter(s). Review the [OData syntax](https://learn.microsoft.com/azure/search/query-odata-filter-orderby-syntax), if any, used in the query. +For such cases, you should start by running the search query in the portal to rule out any service-side issues with the search query or any parameter(s). Review the [OData syntax](https://docs.microsoft.com/azure/search/query-odata-filter-orderby-syntax), if any, used in the query. -Once the result looks good in the portal, use that as the template to populate the objects and parameters in the search request APIs. You should also verify that the correct set of documents have been indexed and are being searched on the service side. One tip would be to start with a 'broad' query (one that returns a superset of desired results, possibly by giving a large value for or entirely removing, some [query parameters](https://learn.microsoft.com/rest/api/searchservice/search-documents#query-parameters)) +Once the result looks good in the portal, use that as the template to populate the objects and parameters in the search request APIs. You should also verify that the correct set of documents have been indexed and are being searched on the service side. One tip would be to start with a 'broad' query (one that returns a superset of desired results, possibly by giving a large value for or entirely removing, some [query parameters](https://docs.microsoft.com/rest/api/searchservice/search-documents#query-parameters)) and then progressively refining the query till it expresses the desired intent. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fsearch%2Fazure-search-documents%2FTROUBLESHOOTING.png) diff --git a/sdk/search/search-documents/src/errorModels.ts b/sdk/search/search-documents/src/errorModels.ts index 10fadac5a09d..69090a3e1191 100644 --- a/sdk/search/search-documents/src/errorModels.ts +++ b/sdk/search/search-documents/src/errorModels.ts @@ -13,28 +13,28 @@ export interface ErrorResponse { /** The error detail. */ export interface ErrorDetail { /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The error code. NOTE: This property will not be serialized. It can only be populated by the + * server. */ readonly code?: string; /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The error message. NOTE: This property will not be serialized. It can only be populated by the + * server. */ readonly message?: string; /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The error target. NOTE: This property will not be serialized. It can only be populated by the + * server. */ readonly target?: string; /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The error details. NOTE: This property will not be serialized. It can only be populated by the + * server. */ readonly details?: ErrorDetail[]; /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The error additional info. NOTE: This property will not be serialized. It can only be populated + * by the server. */ readonly additionalInfo?: ErrorAdditionalInfo[]; } @@ -42,13 +42,13 @@ export interface ErrorDetail { /** The resource management error additional info. */ export interface ErrorAdditionalInfo { /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The additional info type. NOTE: This property will not be serialized. It can only be populated + * by the server. */ readonly type?: string; /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. + * The additional info. NOTE: This property will not be serialized. It can only be populated by + * the server. */ readonly info?: Record; } diff --git a/sdk/search/search-documents/src/generated/data/models/index.ts b/sdk/search/search-documents/src/generated/data/models/index.ts index 815148d18830..71f741cac84d 100644 --- a/sdk/search/search-documents/src/generated/data/models/index.ts +++ b/sdk/search/search-documents/src/generated/data/models/index.ts @@ -12,13 +12,7 @@ import * as coreHttpCompat from "@azure/core-http-compat"; export type VectorQueryUnion = | VectorQuery | VectorizedQuery - | VectorizableTextQuery - | VectorizableImageUrlQuery - | VectorizableImageBinaryQuery; -export type VectorThresholdUnion = - | VectorThreshold - | VectorSimilarityThreshold - | SearchScoreThreshold; + | VectorizableTextQuery; /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ export interface ErrorResponse { @@ -116,16 +110,6 @@ export interface SearchDocumentsResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly semanticPartialResponseType?: SemanticSearchResultsType; - /** - * Type of query rewrite that was used to retrieve documents. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly semanticQueryRewritesResultType?: SemanticQueryRewritesResultType; - /** - * Debug information that applies to the search results as a whole. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly debugInfo?: DebugInfo; } /** A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval. */ @@ -137,11 +121,6 @@ export interface FacetResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly count?: number; - /** - * The nested facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not contain any nested facets. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly facets?: { [propertyName: string]: FacetResult[] }; } /** An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected. */ @@ -206,10 +185,6 @@ export interface SearchRequest { searchFields?: string; /** A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. */ searchMode?: SearchMode; - /** A value that specifies the language of the search query. */ - queryLanguage?: QueryLanguage; - /** A value that specified the type of the speller to use to spell-correct individual search query terms. */ - speller?: QuerySpellerType; /** The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. */ select?: string; /** 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. */ @@ -228,22 +203,16 @@ export interface SearchRequest { answers?: QueryAnswerType; /** A value that specifies whether captions should be returned as part of the search response. */ captions?: QueryCaptionType; - /** A value that specifies whether query rewrites should be generated to augment the search query. */ - queryRewrites?: QueryRewritesType; - /** The comma-separated list of field names used for semantic ranking. */ - semanticFields?: string; /** The query parameters for vector and hybrid search queries. */ vectorQueries?: VectorQueryUnion[]; /** Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. */ vectorFilterMode?: VectorFilterMode; - /** The query parameters to configure hybrid search behaviors. */ - hybridSearch?: HybridSearch; } /** The query parameters for vector and hybrid search queries. */ export interface VectorQuery { /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "vector" | "text" | "imageUrl" | "imageBinary"; + kind: "vector" | "text"; /** 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. */ @@ -254,24 +223,6 @@ export interface VectorQuery { 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; - /** The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. */ - threshold?: VectorThresholdUnion; - /** The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. */ - filterOverride?: string; -} - -/** The threshold used for vector queries. */ -export interface VectorThreshold { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "vectorSimilarity" | "searchScore"; -} - -/** TThe query parameters to configure hybrid search behaviors. */ -export interface HybridSearch { - /** Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request. Those documents will be combined with the documents matching the vector queries to produce a single final list of results. Choosing a larger maxTextRecallSize value will allow retrieving and paging through more documents (using the top and skip parameters), at the cost of higher resource utilization and higher latency. The value needs to be between 1 and 10,000. Default is 1000. */ - maxTextRecallSize?: number; - /** Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window. */ - countAndFacetMode?: HybridCountAndFacetMode; } /** Contains a document found by a search query, plus associated metadata. */ @@ -288,6 +239,11 @@ export interface SearchResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly _rerankerScore?: number; + /** + * The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic' + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rerankerBoostedScore?: number; /** * Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -323,11 +279,6 @@ export interface QueryCaptionResult { /** Contains debugging information that can be used to further explore your search results. */ export interface DocumentDebugInfo { - /** - * Contains debugging information specific to semantic ranking requests. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly semantic?: SemanticDebugInfo; /** * Contains debugging information specific to vector and hybrid search. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -335,62 +286,6 @@ export interface DocumentDebugInfo { readonly vectors?: VectorsDebugInfo; } -export interface SemanticDebugInfo { - /** - * The title field that was sent to the semantic enrichment process, as well as how it was used - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly titleField?: QueryResultDocumentSemanticField; - /** - * The content fields that were sent to the semantic enrichment process, as well as how they were used - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly contentFields?: QueryResultDocumentSemanticField[]; - /** - * The keyword fields that were sent to the semantic enrichment process, as well as how they were used - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly keywordFields?: QueryResultDocumentSemanticField[]; - /** - * The raw concatenated strings that were sent to the semantic enrichment process. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rerankerInput?: QueryResultDocumentRerankerInput; -} - -/** Description of fields that were sent to the semantic enrichment process, as well as how they were used */ -export interface QueryResultDocumentSemanticField { - /** - * The name of the field that was sent to the semantic enrichment process - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The way the field was used for the semantic enrichment process (fully used, partially used, or unused) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: SemanticFieldState; -} - -/** The raw concatenated strings that were sent to the semantic enrichment process. */ -export interface QueryResultDocumentRerankerInput { - /** - * The raw string for the title field that was used for semantic enrichment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly title?: string; - /** - * The raw concatenated strings for the content fields that were used for semantic enrichment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly content?: string; - /** - * The raw concatenated strings for the keyword fields that were used for semantic enrichment. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly keywords?: string; -} - export interface VectorsDebugInfo { /** * The breakdown of subscores of the document prior to the chosen result set fusion/combination method such as RRF. @@ -441,43 +336,6 @@ export interface SingleVectorFieldResult { readonly vectorSimilarity?: number; } -/** Contains debugging information that can be used to further explore your search results. */ -export interface DebugInfo { - /** - * Contains debugging information specific to query rewrites. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly queryRewrites?: QueryRewritesDebugInfo; -} - -/** Contains debugging information specific to query rewrites. */ -export interface QueryRewritesDebugInfo { - /** - * List of query rewrites generated for the text query. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly text?: QueryRewritesValuesDebugInfo; - /** - * List of query rewrites generated for the vectorizable text queries. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vectors?: QueryRewritesValuesDebugInfo[]; -} - -/** Contains debugging information specific to query rewrites. */ -export interface QueryRewritesValuesDebugInfo { - /** - * The input text to the generative query rewriting model. There may be cases where the user query and the input to the generative model are not identical. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly inputQuery?: string; - /** - * List of query rewrites. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rewrites?: string[]; -} - /** Response containing suggestion query results from an index. */ export interface SuggestDocumentsResult { /** @@ -642,40 +500,6 @@ export interface VectorizableTextQuery extends VectorQuery { kind: "text"; /** The text to be vectorized to perform a vector search query. */ text: string; - /** Can be configured to let a generative model rewrite the query before sending it to be vectorized. */ - queryRewrites?: QueryRewritesType; -} - -/** The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided. */ -export interface VectorizableImageUrlQuery extends VectorQuery { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "imageUrl"; - /** The URL of an image to be vectorized to perform a vector search query. */ - url?: string; -} - -/** The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided. */ -export interface VectorizableImageBinaryQuery extends VectorQuery { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "imageBinary"; - /** The base 64 encoded binary of an image to be vectorized to perform a vector search query. */ - base64Image?: string; -} - -/** The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. */ -export interface VectorSimilarityThreshold extends VectorThreshold { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "vectorSimilarity"; - /** The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. */ - value: number; -} - -/** The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. */ -export interface SearchScoreThreshold extends VectorThreshold { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "searchScore"; - /** The threshold will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. */ - value: number; } /** Parameter group */ @@ -722,22 +546,14 @@ export interface SearchOptions { semanticErrorHandling?: SemanticErrorMode; /** Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. */ semanticMaxWaitInMilliseconds?: number; - /** This parameter is only valid if the query type is `semantic`. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character `|` followed by the `count-` option after the answers parameter value, such as `extractive|count-3`. Default count is 1. The confidence threshold can be configured by appending the pipe character `|` followed by the `threshold-` option after the answers parameter value, such as `extractive|threshold-0.9`. Default threshold is 0.7. The maximum character length of answers can be configured by appending the pipe character '|' followed by the 'count-', such as 'extractive|maxcharlength-600'. */ + /** This parameter is only valid if the query type is `semantic`. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character `|` followed by the `count-` option after the answers parameter value, such as `extractive|count-3`. Default count is 1. The confidence threshold can be configured by appending the pipe character `|` followed by the `threshold-` option after the answers parameter value, such as `extractive|threshold-0.9`. Default threshold is 0.7. */ answers?: QueryAnswerType; - /** This parameter is only valid if the query type is `semantic`. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to `extractive`, highlighting is enabled by default, and can be configured by appending the pipe character `|` followed by the `highlight-` option, such as `extractive|highlight-true`. Defaults to `None`. The maximum character length of captions can be configured by appending the pipe character '|' followed by the 'count-', such as 'extractive|maxcharlength-600'. */ + /** This parameter is only valid if the query type is `semantic`. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to `extractive`, highlighting is enabled by default, and can be configured by appending the pipe character `|` followed by the `highlight-` option, such as `extractive|highlight-true`. Defaults to `None`. */ captions?: QueryCaptionType; /** Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. */ semanticQuery?: string; - /** When QueryRewrites is set to `generative`, the query terms are sent to a generate model which will produce 10 (default) rewrites to help increase the recall of the request. The requested count can be configured by appending the pipe character `|` followed by the `count-` option, such as `generative|count-3`. Defaults to `None`. This parameter is only valid if the query type is `semantic`. */ - queryRewrites?: QueryRewritesType; /** Enables a debugging tool that can be used to further explore your search results. */ debug?: QueryDebugMode; - /** The language of the query. */ - queryLanguage?: QueryLanguage; - /** Improve search recall by spell-correcting individual search query terms. */ - speller?: QuerySpellerType; - /** The list of field names used for semantic ranking. */ - semanticFields?: string[]; } /** Parameter group */ @@ -782,20 +598,20 @@ export interface AutocompleteOptions { top?: number; } -/** Known values of {@link ApiVersion20241101Preview} that the service accepts. */ -export enum KnownApiVersion20241101Preview { - /** Api Version '2024-11-01-preview' */ - TwoThousandTwentyFour1101Preview = "2024-11-01-preview", +/** Known values of {@link ApiVersion20250901} that the service accepts. */ +export enum KnownApiVersion20250901 { + /** Api Version '2025-09-01' */ + TwoThousandTwentyFive0901 = "2025-09-01", } /** - * Defines values for ApiVersion20241101Preview. \ - * {@link KnownApiVersion20241101Preview} can be used interchangeably with ApiVersion20241101Preview, + * Defines values for ApiVersion20250901. \ + * {@link KnownApiVersion20250901} can be used interchangeably with ApiVersion20250901, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **2024-11-01-preview**: Api Version '2024-11-01-preview' + * **2025-09-01**: Api Version '2025-09-01' */ -export type ApiVersion20241101Preview = string; +export type ApiVersion20250901 = string; /** Known values of {@link SemanticErrorMode} that the service accepts. */ export enum KnownSemanticErrorMode { @@ -851,36 +667,12 @@ export enum KnownQueryCaptionType { */ export type QueryCaptionType = string; -/** Known values of {@link QueryRewritesType} that the service accepts. */ -export enum KnownQueryRewritesType { - /** Do not generate additional query rewrites for this query. */ - None = "none", - /** Generate alternative query terms to increase the recall of a search request. */ - Generative = "generative", -} - -/** - * Defines values for QueryRewritesType. \ - * {@link KnownQueryRewritesType} can be used interchangeably with QueryRewritesType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none**: Do not generate additional query rewrites for this query. \ - * **generative**: Generate alternative query terms to increase the recall of a search request. - */ -export type QueryRewritesType = string; - /** Known values of {@link QueryDebugMode} that the service accepts. */ export enum KnownQueryDebugMode { /** No query debugging information will be returned. */ Disabled = "disabled", - /** Allows the user to further explore their reranked results. */ - Semantic = "semantic", /** Allows the user to further explore their hybrid and vector query results. */ Vector = "vector", - /** Allows the user to explore the list of query rewrites generated for their search request. */ - QueryRewrites = "queryRewrites", - /** Turn on all debug options. */ - All = "all", } /** @@ -889,269 +681,16 @@ export enum KnownQueryDebugMode { * this enum contains the known values that the service supports. * ### Known values supported by the service * **disabled**: No query debugging information will be returned. \ - * **semantic**: Allows the user to further explore their reranked results. \ - * **vector**: Allows the user to further explore their hybrid and vector query results. \ - * **queryRewrites**: Allows the user to explore the list of query rewrites generated for their search request. \ - * **all**: Turn on all debug options. + * **vector**: Allows the user to further explore their hybrid and vector query results. */ export type QueryDebugMode = string; -/** Known values of {@link QueryLanguage} that the service accepts. */ -export enum KnownQueryLanguage { - /** Query language not specified. */ - None = "none", - /** Query language value for English (United States). */ - EnUs = "en-us", - /** Query language value for English (Great Britain). */ - EnGb = "en-gb", - /** Query language value for English (India). */ - EnIn = "en-in", - /** Query language value for English (Canada). */ - EnCa = "en-ca", - /** Query language value for English (Australia). */ - EnAu = "en-au", - /** Query language value for French (France). */ - FrFr = "fr-fr", - /** Query language value for French (Canada). */ - FrCa = "fr-ca", - /** Query language value for German (Germany). */ - DeDe = "de-de", - /** Query language value for Spanish (Spain). */ - EsEs = "es-es", - /** Query language value for Spanish (Mexico). */ - EsMx = "es-mx", - /** Query language value for Chinese (China). */ - ZhCn = "zh-cn", - /** Query language value for Chinese (Taiwan). */ - ZhTw = "zh-tw", - /** Query language value for Portuguese (Brazil). */ - PtBr = "pt-br", - /** Query language value for Portuguese (Portugal). */ - PtPt = "pt-pt", - /** Query language value for Italian (Italy). */ - ItIt = "it-it", - /** Query language value for Japanese (Japan). */ - JaJp = "ja-jp", - /** Query language value for Korean (Korea). */ - KoKr = "ko-kr", - /** Query language value for Russian (Russia). */ - RuRu = "ru-ru", - /** Query language value for Czech (Czech Republic). */ - CsCz = "cs-cz", - /** Query language value for Dutch (Belgium). */ - NlBe = "nl-be", - /** Query language value for Dutch (Netherlands). */ - NlNl = "nl-nl", - /** Query language value for Hungarian (Hungary). */ - HuHu = "hu-hu", - /** Query language value for Polish (Poland). */ - PlPl = "pl-pl", - /** Query language value for Swedish (Sweden). */ - SvSe = "sv-se", - /** Query language value for Turkish (Turkey). */ - TrTr = "tr-tr", - /** Query language value for Hindi (India). */ - HiIn = "hi-in", - /** Query language value for Arabic (Saudi Arabia). */ - ArSa = "ar-sa", - /** Query language value for Arabic (Egypt). */ - ArEg = "ar-eg", - /** Query language value for Arabic (Morocco). */ - ArMa = "ar-ma", - /** Query language value for Arabic (Kuwait). */ - ArKw = "ar-kw", - /** Query language value for Arabic (Jordan). */ - ArJo = "ar-jo", - /** Query language value for Danish (Denmark). */ - DaDk = "da-dk", - /** Query language value for Norwegian (Norway). */ - NoNo = "no-no", - /** Query language value for Bulgarian (Bulgaria). */ - BgBg = "bg-bg", - /** Query language value for Croatian (Croatia). */ - HrHr = "hr-hr", - /** Query language value for Croatian (Bosnia and Herzegovina). */ - HrBa = "hr-ba", - /** Query language value for Malay (Malaysia). */ - MsMy = "ms-my", - /** Query language value for Malay (Brunei Darussalam). */ - MsBn = "ms-bn", - /** Query language value for Slovenian (Slovenia). */ - SlSl = "sl-sl", - /** Query language value for Tamil (India). */ - TaIn = "ta-in", - /** Query language value for Vietnamese (Viet Nam). */ - ViVn = "vi-vn", - /** Query language value for Greek (Greece). */ - ElGr = "el-gr", - /** Query language value for Romanian (Romania). */ - RoRo = "ro-ro", - /** Query language value for Icelandic (Iceland). */ - IsIs = "is-is", - /** Query language value for Indonesian (Indonesia). */ - IdId = "id-id", - /** Query language value for Thai (Thailand). */ - ThTh = "th-th", - /** Query language value for Lithuanian (Lithuania). */ - LtLt = "lt-lt", - /** Query language value for Ukrainian (Ukraine). */ - UkUa = "uk-ua", - /** Query language value for Latvian (Latvia). */ - LvLv = "lv-lv", - /** Query language value for Estonian (Estonia). */ - EtEe = "et-ee", - /** Query language value for Catalan. */ - CaEs = "ca-es", - /** Query language value for Finnish (Finland). */ - FiFi = "fi-fi", - /** Query language value for Serbian (Bosnia and Herzegovina). */ - SrBa = "sr-ba", - /** Query language value for Serbian (Montenegro). */ - SrMe = "sr-me", - /** Query language value for Serbian (Serbia). */ - SrRs = "sr-rs", - /** Query language value for Slovak (Slovakia). */ - SkSk = "sk-sk", - /** Query language value for Norwegian (Norway). */ - NbNo = "nb-no", - /** Query language value for Armenian (Armenia). */ - HyAm = "hy-am", - /** Query language value for Bengali (India). */ - BnIn = "bn-in", - /** Query language value for Basque. */ - EuEs = "eu-es", - /** Query language value for Galician. */ - GlEs = "gl-es", - /** Query language value for Gujarati (India). */ - GuIn = "gu-in", - /** Query language value for Hebrew (Israel). */ - HeIl = "he-il", - /** Query language value for Irish (Ireland). */ - GaIe = "ga-ie", - /** Query language value for Kannada (India). */ - KnIn = "kn-in", - /** Query language value for Malayalam (India). */ - MlIn = "ml-in", - /** Query language value for Marathi (India). */ - MrIn = "mr-in", - /** Query language value for Persian (U.A.E.). */ - FaAe = "fa-ae", - /** Query language value for Punjabi (India). */ - PaIn = "pa-in", - /** Query language value for Telugu (India). */ - TeIn = "te-in", - /** Query language value for Urdu (Pakistan). */ - UrPk = "ur-pk", -} - -/** - * Defines values for QueryLanguage. \ - * {@link KnownQueryLanguage} can be used interchangeably with QueryLanguage, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none**: Query language not specified. \ - * **en-us**: Query language value for English (United States). \ - * **en-gb**: Query language value for English (Great Britain). \ - * **en-in**: Query language value for English (India). \ - * **en-ca**: Query language value for English (Canada). \ - * **en-au**: Query language value for English (Australia). \ - * **fr-fr**: Query language value for French (France). \ - * **fr-ca**: Query language value for French (Canada). \ - * **de-de**: Query language value for German (Germany). \ - * **es-es**: Query language value for Spanish (Spain). \ - * **es-mx**: Query language value for Spanish (Mexico). \ - * **zh-cn**: Query language value for Chinese (China). \ - * **zh-tw**: Query language value for Chinese (Taiwan). \ - * **pt-br**: Query language value for Portuguese (Brazil). \ - * **pt-pt**: Query language value for Portuguese (Portugal). \ - * **it-it**: Query language value for Italian (Italy). \ - * **ja-jp**: Query language value for Japanese (Japan). \ - * **ko-kr**: Query language value for Korean (Korea). \ - * **ru-ru**: Query language value for Russian (Russia). \ - * **cs-cz**: Query language value for Czech (Czech Republic). \ - * **nl-be**: Query language value for Dutch (Belgium). \ - * **nl-nl**: Query language value for Dutch (Netherlands). \ - * **hu-hu**: Query language value for Hungarian (Hungary). \ - * **pl-pl**: Query language value for Polish (Poland). \ - * **sv-se**: Query language value for Swedish (Sweden). \ - * **tr-tr**: Query language value for Turkish (Turkey). \ - * **hi-in**: Query language value for Hindi (India). \ - * **ar-sa**: Query language value for Arabic (Saudi Arabia). \ - * **ar-eg**: Query language value for Arabic (Egypt). \ - * **ar-ma**: Query language value for Arabic (Morocco). \ - * **ar-kw**: Query language value for Arabic (Kuwait). \ - * **ar-jo**: Query language value for Arabic (Jordan). \ - * **da-dk**: Query language value for Danish (Denmark). \ - * **no-no**: Query language value for Norwegian (Norway). \ - * **bg-bg**: Query language value for Bulgarian (Bulgaria). \ - * **hr-hr**: Query language value for Croatian (Croatia). \ - * **hr-ba**: Query language value for Croatian (Bosnia and Herzegovina). \ - * **ms-my**: Query language value for Malay (Malaysia). \ - * **ms-bn**: Query language value for Malay (Brunei Darussalam). \ - * **sl-sl**: Query language value for Slovenian (Slovenia). \ - * **ta-in**: Query language value for Tamil (India). \ - * **vi-vn**: Query language value for Vietnamese (Viet Nam). \ - * **el-gr**: Query language value for Greek (Greece). \ - * **ro-ro**: Query language value for Romanian (Romania). \ - * **is-is**: Query language value for Icelandic (Iceland). \ - * **id-id**: Query language value for Indonesian (Indonesia). \ - * **th-th**: Query language value for Thai (Thailand). \ - * **lt-lt**: Query language value for Lithuanian (Lithuania). \ - * **uk-ua**: Query language value for Ukrainian (Ukraine). \ - * **lv-lv**: Query language value for Latvian (Latvia). \ - * **et-ee**: Query language value for Estonian (Estonia). \ - * **ca-es**: Query language value for Catalan. \ - * **fi-fi**: Query language value for Finnish (Finland). \ - * **sr-ba**: Query language value for Serbian (Bosnia and Herzegovina). \ - * **sr-me**: Query language value for Serbian (Montenegro). \ - * **sr-rs**: Query language value for Serbian (Serbia). \ - * **sk-sk**: Query language value for Slovak (Slovakia). \ - * **nb-no**: Query language value for Norwegian (Norway). \ - * **hy-am**: Query language value for Armenian (Armenia). \ - * **bn-in**: Query language value for Bengali (India). \ - * **eu-es**: Query language value for Basque. \ - * **gl-es**: Query language value for Galician. \ - * **gu-in**: Query language value for Gujarati (India). \ - * **he-il**: Query language value for Hebrew (Israel). \ - * **ga-ie**: Query language value for Irish (Ireland). \ - * **kn-in**: Query language value for Kannada (India). \ - * **ml-in**: Query language value for Malayalam (India). \ - * **mr-in**: Query language value for Marathi (India). \ - * **fa-ae**: Query language value for Persian (U.A.E.). \ - * **pa-in**: Query language value for Punjabi (India). \ - * **te-in**: Query language value for Telugu (India). \ - * **ur-pk**: Query language value for Urdu (Pakistan). - */ -export type QueryLanguage = string; - -/** Known values of {@link QuerySpellerType} that the service accepts. */ -export enum KnownQuerySpellerType { - /** Speller not enabled. */ - None = "none", - /** Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. */ - Lexicon = "lexicon", -} - -/** - * Defines values for QuerySpellerType. \ - * {@link KnownQuerySpellerType} can be used interchangeably with QuerySpellerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **none**: Speller not enabled. \ - * **lexicon**: Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. - */ -export type QuerySpellerType = string; - /** Known values of {@link VectorQueryKind} that the service accepts. */ export enum KnownVectorQueryKind { /** Vector query where a raw vector value is provided. */ Vector = "vector", /** Vector query where a text value that needs to be vectorized is provided. */ Text = "text", - /** Vector query where an url that represents an image value that needs to be vectorized is provided. */ - ImageUrl = "imageUrl", - /** Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. */ - ImageBinary = "imageBinary", } /** @@ -1160,30 +699,10 @@ export enum KnownVectorQueryKind { * this enum contains the known values that the service supports. * ### 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. \ - * **imageUrl**: Vector query where an url that represents an image value that needs to be vectorized is provided. \ - * **imageBinary**: Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. + * **text**: Vector query where a text value that needs to be vectorized is provided. */ export type VectorQueryKind = string; -/** Known values of {@link VectorThresholdKind} that the service accepts. */ -export enum KnownVectorThresholdKind { - /** The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. */ - VectorSimilarity = "vectorSimilarity", - /** The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. */ - SearchScore = "searchScore", -} - -/** - * Defines values for VectorThresholdKind. \ - * {@link KnownVectorThresholdKind} can be used interchangeably with VectorThresholdKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **vectorSimilarity**: The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. \ - * **searchScore**: The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - */ -export type VectorThresholdKind = string; - /** Known values of {@link VectorFilterMode} that the service accepts. */ export enum KnownVectorFilterMode { /** The filter will be applied after the candidate set of vector results is returned. Depending on the filter selectivity, this can result in fewer results than requested by the parameter 'k'. */ @@ -1202,45 +721,6 @@ export enum KnownVectorFilterMode { */ export type VectorFilterMode = string; -/** Known values of {@link HybridCountAndFacetMode} that the service accepts. */ -export enum KnownHybridCountAndFacetMode { - /** Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'. */ - CountRetrievableResults = "countRetrievableResults", - /** Include all documents that were matched by the search query when computing 'count' and 'facets', regardless of whether or not those documents are within the 'maxTextRecallSize' retrieval window. */ - CountAllResults = "countAllResults", -} - -/** - * Defines values for HybridCountAndFacetMode. \ - * {@link KnownHybridCountAndFacetMode} can be used interchangeably with HybridCountAndFacetMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **countRetrievableResults**: Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'. \ - * **countAllResults**: Include all documents that were matched by the search query when computing 'count' and 'facets', regardless of whether or not those documents are within the 'maxTextRecallSize' retrieval window. - */ -export type HybridCountAndFacetMode = string; - -/** Known values of {@link SemanticFieldState} that the service accepts. */ -export enum KnownSemanticFieldState { - /** The field was fully used for semantic enrichment. */ - Used = "used", - /** The field was not used for semantic enrichment. */ - Unused = "unused", - /** The field was partially used for semantic enrichment. */ - Partial = "partial", -} - -/** - * Defines values for SemanticFieldState. \ - * {@link KnownSemanticFieldState} can be used interchangeably with SemanticFieldState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **used**: The field was fully used for semantic enrichment. \ - * **unused**: The field was not used for semantic enrichment. \ - * **partial**: The field was partially used for semantic enrichment. - */ -export type SemanticFieldState = string; - /** Known values of {@link SemanticErrorReason} that the service accepts. */ export enum KnownSemanticErrorReason { /** If `semanticMaxWaitInMilliseconds` was set and the semantic processing duration exceeded that value. Only the base results were returned. */ @@ -1279,21 +759,6 @@ export enum KnownSemanticSearchResultsType { * **rerankedResults**: Results have been reranked with the reranker model and will include semantic captions. They will not include any answers, answers highlights or caption highlights. */ export type SemanticSearchResultsType = string; - -/** Known values of {@link SemanticQueryRewritesResultType} that the service accepts. */ -export enum KnownSemanticQueryRewritesResultType { - /** Query rewrites were not successfully generated for this request. Only the original query was used to retrieve the results. */ - OriginalQueryOnly = "originalQueryOnly", -} - -/** - * Defines values for SemanticQueryRewritesResultType. \ - * {@link KnownSemanticQueryRewritesResultType} can be used interchangeably with SemanticQueryRewritesResultType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **originalQueryOnly**: Query rewrites were not successfully generated for this request. Only the original query was used to retrieve the results. - */ -export type SemanticQueryRewritesResultType = string; /** Defines values for QueryType. */ export type QueryType = "simple" | "full" | "semantic"; /** Defines values for SearchMode. */ diff --git a/sdk/search/search-documents/src/generated/data/models/mappers.ts b/sdk/search/search-documents/src/generated/data/models/mappers.ts index 1223832bc3ad..1499aaac8b89 100644 --- a/sdk/search/search-documents/src/generated/data/models/mappers.ts +++ b/sdk/search/search-documents/src/generated/data/models/mappers.ts @@ -194,20 +194,6 @@ export const SearchDocumentsResult: coreClient.CompositeMapper = { name: "String", }, }, - semanticQueryRewritesResultType: { - serializedName: "@search\\.semanticQueryRewritesResultType", - readOnly: true, - type: { - name: "String", - }, - }, - debugInfo: { - serializedName: "@search\\.debug", - type: { - name: "Composite", - className: "DebugInfo", - }, - }, }, }, }; @@ -225,21 +211,6 @@ export const FacetResult: coreClient.CompositeMapper = { name: "Number", }, }, - facets: { - serializedName: "@search\\.facets", - readOnly: true, - type: { - name: "Dictionary", - value: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "FacetResult" }, - }, - }, - }, - }, - }, }, }, }; @@ -406,18 +377,6 @@ export const SearchRequest: coreClient.CompositeMapper = { allowedValues: ["any", "all"], }, }, - queryLanguage: { - serializedName: "queryLanguage", - type: { - name: "String", - }, - }, - speller: { - serializedName: "speller", - type: { - name: "String", - }, - }, select: { serializedName: "select", type: { @@ -476,18 +435,6 @@ export const SearchRequest: coreClient.CompositeMapper = { name: "String", }, }, - queryRewrites: { - serializedName: "queryRewrites", - type: { - name: "String", - }, - }, - semanticFields: { - serializedName: "semanticFields", - type: { - name: "String", - }, - }, vectorQueries: { serializedName: "vectorQueries", type: { @@ -506,13 +453,6 @@ export const SearchRequest: coreClient.CompositeMapper = { name: "String", }, }, - hybridSearch: { - serializedName: "hybridSearch", - type: { - name: "Composite", - className: "HybridSearch", - }, - }, }, }, }; @@ -564,61 +504,6 @@ export const VectorQuery: coreClient.CompositeMapper = { name: "Number", }, }, - threshold: { - serializedName: "threshold", - type: { - name: "Composite", - className: "VectorThreshold", - }, - }, - filterOverride: { - serializedName: "filterOverride", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VectorThreshold: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VectorThreshold", - uberParent: "VectorThreshold", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind", - }, - modelProperties: { - kind: { - serializedName: "kind", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HybridSearch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HybridSearch", - modelProperties: { - maxTextRecallSize: { - serializedName: "maxTextRecallSize", - type: { - name: "Number", - }, - }, - countAndFacetMode: { - serializedName: "countAndFacetMode", - type: { - name: "String", - }, - }, }, }, }; @@ -645,6 +530,14 @@ export const SearchResult: coreClient.CompositeMapper = { name: "Number", }, }, + rerankerBoostedScore: { + serializedName: "@search\\.rerankerBoostedScore", + readOnly: true, + nullable: true, + type: { + name: "Number", + }, + }, _highlights: { serializedName: "@search\\.highlights", readOnly: true, @@ -710,13 +603,6 @@ export const DocumentDebugInfo: coreClient.CompositeMapper = { name: "Composite", className: "DocumentDebugInfo", modelProperties: { - semantic: { - serializedName: "semantic", - type: { - name: "Composite", - className: "SemanticDebugInfo", - }, - }, vectors: { serializedName: "vectors", type: { @@ -728,108 +614,6 @@ export const DocumentDebugInfo: coreClient.CompositeMapper = { }, }; -export const SemanticDebugInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SemanticDebugInfo", - modelProperties: { - titleField: { - serializedName: "titleField", - type: { - name: "Composite", - className: "QueryResultDocumentSemanticField", - }, - }, - contentFields: { - serializedName: "contentFields", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryResultDocumentSemanticField", - }, - }, - }, - }, - keywordFields: { - serializedName: "keywordFields", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryResultDocumentSemanticField", - }, - }, - }, - }, - rerankerInput: { - serializedName: "rerankerInput", - type: { - name: "Composite", - className: "QueryResultDocumentRerankerInput", - }, - }, - }, - }, -}; - -export const QueryResultDocumentSemanticField: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryResultDocumentSemanticField", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const QueryResultDocumentRerankerInput: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryResultDocumentRerankerInput", - modelProperties: { - title: { - serializedName: "title", - readOnly: true, - type: { - name: "String", - }, - }, - content: { - serializedName: "content", - readOnly: true, - type: { - name: "String", - }, - }, - keywords: { - serializedName: "keywords", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - export const VectorsDebugInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -926,79 +710,6 @@ export const SingleVectorFieldResult: coreClient.CompositeMapper = { }, }; -export const DebugInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DebugInfo", - modelProperties: { - queryRewrites: { - serializedName: "queryRewrites", - type: { - name: "Composite", - className: "QueryRewritesDebugInfo", - }, - }, - }, - }, -}; - -export const QueryRewritesDebugInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryRewritesDebugInfo", - modelProperties: { - text: { - serializedName: "text", - type: { - name: "Composite", - className: "QueryRewritesValuesDebugInfo", - }, - }, - vectors: { - serializedName: "vectors", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryRewritesValuesDebugInfo", - }, - }, - }, - }, - }, - }, -}; - -export const QueryRewritesValuesDebugInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QueryRewritesValuesDebugInfo", - modelProperties: { - inputQuery: { - serializedName: "inputQuery", - readOnly: true, - type: { - name: "String", - }, - }, - rewrites: { - serializedName: "rewrites", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - export const SuggestDocumentsResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1395,101 +1106,12 @@ export const VectorizableTextQuery: coreClient.CompositeMapper = { name: "String", }, }, - queryRewrites: { - serializedName: "queryRewrites", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VectorizableImageUrlQuery: coreClient.CompositeMapper = { - serializedName: "imageUrl", - type: { - name: "Composite", - className: "VectorizableImageUrlQuery", - uberParent: "VectorQuery", - polymorphicDiscriminator: VectorQuery.type.polymorphicDiscriminator, - modelProperties: { - ...VectorQuery.type.modelProperties, - url: { - serializedName: "url", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VectorizableImageBinaryQuery: coreClient.CompositeMapper = { - serializedName: "imageBinary", - type: { - name: "Composite", - className: "VectorizableImageBinaryQuery", - uberParent: "VectorQuery", - polymorphicDiscriminator: VectorQuery.type.polymorphicDiscriminator, - modelProperties: { - ...VectorQuery.type.modelProperties, - base64Image: { - serializedName: "base64Image", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VectorSimilarityThreshold: coreClient.CompositeMapper = { - serializedName: "vectorSimilarity", - type: { - name: "Composite", - className: "VectorSimilarityThreshold", - uberParent: "VectorThreshold", - polymorphicDiscriminator: VectorThreshold.type.polymorphicDiscriminator, - modelProperties: { - ...VectorThreshold.type.modelProperties, - value: { - serializedName: "value", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const SearchScoreThreshold: coreClient.CompositeMapper = { - serializedName: "searchScore", - type: { - name: "Composite", - className: "SearchScoreThreshold", - uberParent: "VectorThreshold", - polymorphicDiscriminator: VectorThreshold.type.polymorphicDiscriminator, - modelProperties: { - ...VectorThreshold.type.modelProperties, - value: { - serializedName: "value", - required: true, - type: { - name: "Number", - }, - }, }, }, }; export let discriminators = { VectorQuery: VectorQuery, - VectorThreshold: VectorThreshold, "VectorQuery.vector": VectorizedQuery, "VectorQuery.text": VectorizableTextQuery, - "VectorQuery.imageUrl": VectorizableImageUrlQuery, - "VectorQuery.imageBinary": VectorizableImageBinaryQuery, - "VectorThreshold.vectorSimilarity": VectorSimilarityThreshold, - "VectorThreshold.searchScore": SearchScoreThreshold, }; diff --git a/sdk/search/search-documents/src/generated/data/models/parameters.ts b/sdk/search/search-documents/src/generated/data/models/parameters.ts index f8b2627ed34a..59b4a194e3e1 100644 --- a/sdk/search/search-documents/src/generated/data/models/parameters.ts +++ b/sdk/search/search-documents/src/generated/data/models/parameters.ts @@ -356,16 +356,6 @@ export const semanticQuery: OperationQueryParameter = { }, }; -export const queryRewrites: OperationQueryParameter = { - parameterPath: ["options", "searchOptions", "queryRewrites"], - mapper: { - serializedName: "queryRewrites", - type: { - name: "String", - }, - }, -}; - export const debug: OperationQueryParameter = { parameterPath: ["options", "searchOptions", "debug"], mapper: { @@ -376,42 +366,6 @@ export const debug: OperationQueryParameter = { }, }; -export const queryLanguage: OperationQueryParameter = { - parameterPath: ["options", "searchOptions", "queryLanguage"], - mapper: { - serializedName: "queryLanguage", - type: { - name: "String", - }, - }, -}; - -export const speller: OperationQueryParameter = { - parameterPath: ["options", "searchOptions", "speller"], - mapper: { - serializedName: "speller", - type: { - name: "String", - }, - }, -}; - -export const semanticFields: OperationQueryParameter = { - parameterPath: ["options", "searchOptions", "semanticFields"], - mapper: { - serializedName: "semanticFields", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - collectionFormat: "CSV", -}; - export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], mapper: { diff --git a/sdk/search/search-documents/src/generated/data/operations/documents.ts b/sdk/search/search-documents/src/generated/data/operations/documents.ts index 567b29f484f7..b10c90a18526 100644 --- a/sdk/search/search-documents/src/generated/data/operations/documents.ts +++ b/sdk/search/search-documents/src/generated/data/operations/documents.ts @@ -206,6 +206,9 @@ const searchGetOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.SearchDocumentsResult, }, + 206: { + bodyMapper: Mappers.SearchDocumentsResult, + }, default: { bodyMapper: Mappers.ErrorResponse, }, @@ -237,11 +240,7 @@ const searchGetOperationSpec: coreClient.OperationSpec = { Parameters.answers, Parameters.captions, Parameters.semanticQuery, - Parameters.queryRewrites, Parameters.debug, - Parameters.queryLanguage, - Parameters.speller, - Parameters.semanticFields, ], urlParameters: [Parameters.endpoint, Parameters.indexName], headerParameters: [Parameters.accept], @@ -254,6 +253,9 @@ const searchPostOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.SearchDocumentsResult, }, + 206: { + bodyMapper: Mappers.SearchDocumentsResult, + }, default: { bodyMapper: Mappers.ErrorResponse, }, diff --git a/sdk/search/search-documents/src/generated/data/searchClient.ts b/sdk/search/search-documents/src/generated/data/searchClient.ts index 913be1b41833..36e9d5596706 100644 --- a/sdk/search/search-documents/src/generated/data/searchClient.ts +++ b/sdk/search/search-documents/src/generated/data/searchClient.ts @@ -15,7 +15,7 @@ import { import { DocumentsImpl } from "./operations/index.js"; import { Documents } from "./operationsInterfaces/index.js"; import { - ApiVersion20241101Preview, + ApiVersion20250901, SearchClientOptionalParams, } from "./models/index.js"; @@ -23,7 +23,7 @@ import { export class SearchClient extends coreHttpCompat.ExtendedServiceClient { endpoint: string; indexName: string; - apiVersion: ApiVersion20241101Preview; + apiVersion: ApiVersion20250901; /** * Initializes a new instance of the SearchClient class. @@ -35,7 +35,7 @@ export class SearchClient extends coreHttpCompat.ExtendedServiceClient { constructor( endpoint: string, indexName: string, - apiVersion: ApiVersion20241101Preview, + apiVersion: ApiVersion20250901, options?: SearchClientOptionalParams, ) { if (endpoint === undefined) { @@ -56,7 +56,7 @@ export class SearchClient extends coreHttpCompat.ExtendedServiceClient { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-search-documents/12.2.0-beta.2`; + const packageDetails = `azsdk-js-search-documents/12.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/search/search-documents/src/generated/service/models/index.ts b/sdk/search/search-documents/src/generated/service/models/index.ts index 1ee66b55ab7c..6acebc8ac184 100644 --- a/sdk/search/search-documents/src/generated/service/models/index.ts +++ b/sdk/search/search-documents/src/generated/service/models/index.ts @@ -9,18 +9,13 @@ import * as coreClient from "@azure/core-client"; import * as coreHttpCompat from "@azure/core-http-compat"; -export type SearchIndexerDataIdentityUnion = - | SearchIndexerDataIdentity - | SearchIndexerDataNoneIdentity - | SearchIndexerDataUserAssignedIdentity; export type DataChangeDetectionPolicyUnion = | DataChangeDetectionPolicy | HighWaterMarkChangeDetectionPolicy | SqlIntegratedChangeTrackingPolicy; export type DataDeletionDetectionPolicyUnion = | DataDeletionDetectionPolicy - | SoftDeleteColumnDeletionDetectionPolicy - | NativeBlobSoftDeleteDeletionDetectionPolicy; + | SoftDeleteColumnDeletionDetectionPolicy; export type SearchIndexerSkillUnion = | SearchIndexerSkill | ConditionalSkill @@ -42,15 +37,11 @@ export type SearchIndexerSkillUnion = | DocumentExtractionSkill | DocumentIntelligenceLayoutSkill | WebApiSkill - | AzureMachineLearningSkill - | AzureOpenAIEmbeddingSkill - | VisionVectorizeSkill; + | AzureOpenAIEmbeddingSkill; export type CognitiveServicesAccountUnion = | CognitiveServicesAccount | DefaultCognitiveServicesAccount - | CognitiveServicesAccountKey - | AIServicesAccountKey - | AIServicesAccountIdentity; + | CognitiveServicesAccountKey; export type ScoringFunctionUnion = | ScoringFunction | DistanceScoringFunction @@ -117,13 +108,15 @@ export type VectorSearchAlgorithmConfigurationUnion = export type VectorSearchVectorizerUnion = | VectorSearchVectorizer | AzureOpenAIVectorizer - | WebApiVectorizer - | AIServicesVisionVectorizer - | AMLVectorizer; + | WebApiVectorizer; export type VectorSearchCompressionUnion = | VectorSearchCompression | ScalarQuantizationCompression | BinaryQuantizationCompression; +export type SearchIndexerDataIdentityUnion = + | SearchIndexerDataIdentity + | SearchIndexerDataNoneIdentity + | SearchIndexerDataUserAssignedIdentity; /** Represents a datasource definition, which can be used to configure an indexer. */ export interface SearchIndexerDataSource { @@ -137,8 +130,6 @@ export interface SearchIndexerDataSource { credentials: DataSourceCredentials; /** The data container for the datasource. */ container: SearchIndexerDataContainer; - /** An explicit managed identity to use for this datasource. If not specified and the connection string is a managed identity, the system-assigned managed identity is used. If not specified, the value remains unchanged. If "none" is specified, the value of this property is cleared. */ - identity?: SearchIndexerDataIdentityUnion; /** The data change detection policy for the datasource. */ dataChangeDetectionPolicy?: DataChangeDetectionPolicyUnion; /** The data deletion detection policy for the datasource. */ @@ -151,26 +142,18 @@ export interface SearchIndexerDataSource { /** Represents credentials that can be used to connect to a datasource. */ export interface DataSourceCredentials { - /** The connection string for the datasource. Set to `` (with brackets) if you don't want the connection string updated. Set to `` if you want to remove the connection string value from the datasource. */ + /** The connection string for the datasource. For Azure SQL, Azure Blob, ADLS Gen 2 and Azure Table, this would be the connection string or resource ID if using managed identity. For CosmosDB this would be a formatted connection string specifying ApiKind or resource ID for managed identity. For Onelake files, connection string would be either the workspace guid or workspace FQDN; Onelake only supports managed identity connections. Set to `` (with brackets) if you don't want the connection string updated. Set to `` if you want to remove the connection string value from the datasource. */ connectionString?: string; } /** Represents information about the entity (such as Azure SQL table or CosmosDB collection) that will be indexed. */ export interface SearchIndexerDataContainer { - /** The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. */ + /** The name of the table or view (for Azure SQL datasource), collection (for CosmosDB datasource), container (for Azure Blob and ADLS Gen 2 datasources), Azure Table (for Azure Table datasource), or lakehouse (for Onelake datasource) that will be indexed. */ name: string; - /** A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources. */ + /** A query that is applied to this data container. For CosmosDB datasource query can flatten and filter data. For Azure Blob and ADLS Gen 2 query can filter by folders. For Azure Table query can filter by row data. For Onelake query can filter by folder or shortcut. Not supported by Azure SQL datasources. */ query?: string; } -/** Abstract base type for data identities. */ -export interface SearchIndexerDataIdentity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: - | "#Microsoft.Azure.Search.DataNoneIdentity" - | "#Microsoft.Azure.Search.DataUserAssignedIdentity"; -} - /** Base type for data change detection policies. */ export interface DataChangeDetectionPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -182,9 +165,7 @@ export interface DataChangeDetectionPolicy { /** Base type for data deletion detection policies. */ export interface DataDeletionDetectionPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: - | "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy" - | "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; + odatatype: "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy"; } /** A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be used to encrypt or decrypt data-at-rest, such as indexes and synonym maps. */ @@ -197,8 +178,6 @@ export interface SearchResourceEncryptionKey { vaultUri: string; /** Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. */ accessCredentials?: AzureActiveDirectoryApplicationCredentials; - /** An explicit managed identity to use for this encryption key. If not specified and the access credentials property is null, the system-assigned managed identity is used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. If "none" is specified, the value of this property is cleared. */ - identity?: SearchIndexerDataIdentityUnion; } /** Credentials of a registered application created for your search service, used for authenticated access to the encryption keys stored in Azure Key Vault. */ @@ -267,13 +246,6 @@ export interface ListDataSourcesResult { readonly dataSources: SearchIndexerDataSource[]; } -export interface DocumentKeysOrIds { - /** document keys to be reset */ - documentKeys?: string[]; - /** datasource document identifiers to be reset */ - datasourceDocumentIds?: string[]; -} - /** Represents an indexer. */ export interface SearchIndexer { /** The name of the indexer. */ @@ -300,8 +272,6 @@ export interface SearchIndexer { etag?: string; /** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */ encryptionKey?: SearchResourceEncryptionKey; - /** Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. */ - cache?: SearchIndexerCache; } /** Represents a schedule for indexer execution. */ @@ -346,10 +316,6 @@ export interface IndexingParametersConfiguration { delimitedTextDelimiter?: string; /** For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. */ firstLineContainsHeaders?: boolean; - /** Specifies the submode that will determine whether a markdown file will be parsed into exactly one search document or multiple search documents. Default is `oneToMany`. */ - markdownParsingSubmode?: MarkdownParsingSubmode; - /** Specifies the max header depth that will be considered while grouping markdown content. Default is `h6`. */ - markdownHeaderDepth?: MarkdownHeaderDepth; /** For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property. */ documentRoot?: string; /** Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. */ @@ -384,15 +350,6 @@ export interface FieldMappingFunction { parameters?: { [propertyName: string]: any }; } -export interface SearchIndexerCache { - /** The connection string to the storage account where the cache data will be persisted. */ - storageConnectionString?: string; - /** Specifies whether incremental reprocessing is enabled. */ - enableReprocessing?: boolean; - /** The user-assigned managed identity used for connections to the enrichment cache. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - identity?: SearchIndexerDataIdentityUnion; -} - /** Response from a List Indexers request. If successful, it includes the full definitions of all indexers. */ export interface ListIndexersResult { /** @@ -404,6 +361,11 @@ export interface ListIndexersResult { /** Represents the current status and execution history of an indexer. */ export interface SearchIndexerStatus { + /** + * The name of the indexer. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name: string; /** * Overall indexer status. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -433,16 +395,6 @@ export interface IndexerExecutionResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status: IndexerExecutionStatus; - /** - * The outcome of this indexer execution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly statusDetail?: IndexerExecutionStatusDetail; - /** - * All of the state that defines and dictates the indexer's current execution. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currentState?: IndexerState; /** * The error message indicating the top-level error, if any. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -490,45 +442,6 @@ export interface IndexerExecutionResult { readonly finalTrackingState?: string; } -/** Represents all of the state that defines and dictates the indexer's current execution. */ -export interface IndexerState { - /** - * The mode the indexer is running in. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly mode?: IndexingMode; - /** - * Change tracking state used when indexing starts on all documents in the datasource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allDocumentsInitialChangeTrackingState?: string; - /** - * Change tracking state value when indexing finishes on all documents in the datasource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly allDocumentsFinalChangeTrackingState?: string; - /** - * Change tracking state used when indexing starts on select, reset documents in the datasource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resetDocumentsInitialChangeTrackingState?: string; - /** - * Change tracking state value when indexing finishes on select, reset documents in the datasource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resetDocumentsFinalChangeTrackingState?: string; - /** - * The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resetDocumentKeys?: string[]; - /** - * The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resetDatasourceDocumentIds?: string[]; -} - /** Represents an item- or document-level indexing error. */ export interface SearchIndexerError { /** @@ -653,9 +566,7 @@ export interface SearchIndexerSkill { | "#Microsoft.Skills.Util.DocumentExtractionSkill" | "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill" | "#Microsoft.Skills.Custom.WebApiSkill" - | "#Microsoft.Skills.Custom.AmlSkill" - | "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill" - | "#Microsoft.Skills.Vision.VectorizeSkill"; + | "#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. */ @@ -693,9 +604,7 @@ export interface CognitiveServicesAccount { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: | "#Microsoft.Azure.Search.DefaultCognitiveServices" - | "#Microsoft.Azure.Search.CognitiveServicesByKey" - | "#Microsoft.Azure.Search.AIServicesByKey" - | "#Microsoft.Azure.Search.AIServicesByIdentity"; + | "#Microsoft.Azure.Search.CognitiveServicesByKey"; /** Description of the Azure AI service resource attached to a skillset. */ description?: string; } @@ -706,10 +615,6 @@ export interface SearchIndexerKnowledgeStore { storageConnectionString: string; /** A list of additional projections to perform during indexing. */ projections: SearchIndexerKnowledgeStoreProjection[]; - /** The user-assigned managed identity used for connections to Azure Storage when writing knowledge store projections. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - identity?: SearchIndexerDataIdentityUnion; - /** A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. */ - parameters?: SearchIndexerKnowledgeStoreParameters; } /** Container object for various projection selectors. */ @@ -736,14 +641,6 @@ export interface SearchIndexerKnowledgeStoreProjectionSelector { inputs?: InputFieldMappingEntry[]; } -/** A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. */ -export interface SearchIndexerKnowledgeStoreParameters { - /** Describes unknown properties. The value of an unknown property can be of "any" type. */ - [property: string]: any; - /** Whether or not projections should synthesize a generated key name if one isn't already present. */ - synthesizeGeneratedKeyName?: boolean; -} - /** Definition of additional projections to secondary search indexes. */ export interface SearchIndexerIndexProjection { /** A list of projections to be performed to secondary search indexes. */ @@ -781,11 +678,6 @@ export interface ListSkillsetsResult { readonly skillsets: SearchIndexerSkillset[]; } -export interface SkillNames { - /** the names of skills to be reset. */ - skillNames?: string[]; -} - /** Represents a synonym map definition. */ export interface SynonymMap { /** The name of the synonym map. */ @@ -813,6 +705,8 @@ export interface ListSynonymMapsResult { export interface SearchIndex { /** The name of the index. */ name: string; + /** The description of the index. */ + description?: string; /** The fields of the index. */ fields: SearchField[]; /** The scoring profiles for the index. */ @@ -1038,6 +932,8 @@ export interface SemanticConfiguration { name: string; /** Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. */ prioritizedFields: SemanticPrioritizedFields; + /** Specifies the score type to be used for the sort order of the search results. */ + rankingOrder?: RankingOrder; } /** Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers. */ @@ -1090,7 +986,7 @@ export interface VectorSearchAlgorithmConfiguration { /** Specifies the vectorization method to be used during query time. */ export interface VectorSearchVectorizer { /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "azureOpenAI" | "customWebApi" | "aiServicesVision" | "aml"; + kind: "azureOpenAI" | "customWebApi"; /** The name to associate with this particular vectorization method. */ vectorizerName: string; } @@ -1101,10 +997,6 @@ export interface VectorSearchCompression { 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 the options for rescoring. */ rescoringOptions?: RescoringOptions; /** The number of dimensions to truncate the vectors to. Truncating the vectors reduces the size of the vectors and the amount of data that needs to be transferred during search. This can save storage cost and improve search performance at the expense of recall. It should be only used for embeddings trained with Matryoshka Representation Learning (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no truncation. */ @@ -1195,25 +1087,6 @@ export interface AnalyzedTokenInfo { readonly position: number; } -/** Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations. */ -export interface SearchAlias { - /** The name of the alias. */ - name: string; - /** The name of the index this alias maps to. Only one index name may be specified. */ - indexes: string[]; - /** The ETag of the alias. */ - etag?: string; -} - -/** Response from a List Aliases request. If successful, it includes the associated index mappings for all aliases. */ -export interface ListAliasesResult { - /** - * The aliases in the Search service. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly aliases: SearchAlias[]; -} - /** Response from a get service statistics request. If successful, it includes service level counters and limits. */ export interface ServiceStatistics { /** Service level resource counters. */ @@ -1224,8 +1097,6 @@ export interface ServiceStatistics { /** Represents service-level resource counters and quotas. */ export interface ServiceCounters { - /** Total number of aliases. */ - aliasCounter: ResourceCounter; /** Total number of documents across all indexes in the service. */ documentCounter: ResourceCounter; /** Total number of indexes. */ @@ -1304,6 +1175,14 @@ export interface AzureOpenAIParameters { modelName?: AzureOpenAIModelName; } +/** Abstract base type for data identities. */ +export interface SearchIndexerDataIdentity { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odatatype: + | "#Microsoft.Azure.Search.DataNoneIdentity" + | "#Microsoft.Azure.Search.DataUserAssignedIdentity"; +} + /** Specifies the properties for connecting to a user-defined vectorizer. */ export interface WebApiParameters { /** The URI of the Web API providing the vectorizer. */ @@ -1320,34 +1199,6 @@ export interface WebApiParameters { authIdentity?: SearchIndexerDataIdentityUnion; } -/** Specifies the AI Services Vision parameters for vectorizing a query image or text. */ -export interface AIServicesVisionParameters { - /** The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. */ - modelVersion: string | null; - /** The resource URI of the AI Services resource. */ - resourceUri: string; - /** API key of the designated AI Services resource. */ - apiKey?: string; - /** The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the index, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - authIdentity?: SearchIndexerDataIdentityUnion; -} - -/** Specifies the properties for connecting to an AML vectorizer. */ -export interface AMLParameters { - /** (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. */ - scoringUri: string | null; - /** (Required for key authentication) The key for the AML service. */ - authenticationKey?: string; - /** (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. */ - resourceId?: string; - /** (Optional) When specified, indicates the timeout for the http client making the API call. */ - timeout?: string; - /** (Optional for token authentication). The region the AML service is deployed in. */ - region?: string; - /** The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. */ - modelName?: AIStudioModelCatalogName; -} - /** Provides parameter values to a distance scoring function. */ export interface DistanceScoringParameters { /** The name of the parameter passed in search queries to specify the reference location. */ @@ -1378,6 +1229,14 @@ export interface TagScoringParameters { tagsParameter: string; } +/** A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. */ +export interface SearchIndexerKnowledgeStoreParameters { + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** Whether or not projections should synthesize a generated key name if one isn't already present. */ + synthesizeGeneratedKeyName?: boolean; +} + /** An object that contains information about the matches that were found, and related metadata. */ export 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. */ @@ -1418,27 +1277,14 @@ export interface CustomEntityAlias { fuzzyEditDistance?: number; } -export interface AzureOpenAITokenizerParameters { - /** Only applies if the unit is set to azureOpenAITokens. Options include 'R50k_base', 'P50k_base', 'P50k_edit' and 'CL100k_base'. The default value is 'CL100k_base'. */ - encoderModelName?: SplitSkillEncoderModelName; - /** (Optional) Only applies if the unit is set to azureOpenAITokens. This parameter defines a collection of special tokens that are permitted within the tokenization process. */ - allowedSpecialTokens?: string[]; -} - -/** Clears the identity property of a datasource. */ -export interface SearchIndexerDataNoneIdentity - extends SearchIndexerDataIdentity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.DataNoneIdentity"; -} - -/** Specifies the identity for a datasource to use. */ -export interface SearchIndexerDataUserAssignedIdentity - extends SearchIndexerDataIdentity { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.DataUserAssignedIdentity"; - /** The fully qualified Azure resource Id of a user assigned managed identity typically in the form "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" that should have been assigned to the search service. */ - resourceId: string; +/** Controls the cardinality for chunking the content. */ +export interface DocumentIntelligenceLayoutSkillChunkingProperties { + /** The unit of the chunk. */ + unit?: DocumentIntelligenceLayoutSkillChunkingUnit; + /** The maximum chunk length in characters. Default is 500. */ + maximumLength?: number; + /** The length of overlap provided between two text chunks. Default is 0. */ + overlapLength?: number; } /** Defines a data change detection policy that captures changes based on the value of a high water mark column. */ @@ -1468,13 +1314,6 @@ export interface SoftDeleteColumnDeletionDetectionPolicy softDeleteMarkerValue?: string; } -/** Defines a data deletion detection policy utilizing Azure Blob Storage's native soft delete feature for deletion detection. */ -export interface NativeBlobSoftDeleteDeletionDetectionPolicy - extends DataDeletionDetectionPolicy { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; -} - /** A skill that enables scenarios that require a Boolean operation to determine the data to assign to an output. */ export interface ConditionalSkill extends SearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -1645,10 +1484,6 @@ export interface SplitSkill extends SearchIndexerSkill { pageOverlapLength?: number; /** Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document. */ maximumPagesToTake?: number; - /** Only applies if textSplitMode is set to pages. There are two possible values. The choice of the values will decide the length (maximumPageLength and pageOverlapLength) measurement. The default is 'characters', which means the length will be measured by character. */ - unit?: SplitSkillUnit; - /** Only applies if the unit is set to azureOpenAITokens. If specified, the splitSkill will use these parameters when performing the tokenization. The parameters are a valid 'encoderModelName' and an optional 'allowedSpecialTokens' property. */ - azureOpenAITokenizerParameters?: AzureOpenAITokenizerParameters; } /** A skill looks for text from a custom, user-defined list of words and phrases. */ @@ -1693,14 +1528,20 @@ export interface DocumentExtractionSkill extends SearchIndexerSkill { configuration?: { [propertyName: string]: any }; } -/** A skill that extracts content and layout information (as markdown), via Azure AI Services, from files within the enrichment pipeline. */ +/** A skill that extracts content and layout information, via Azure AI Services, from files within the enrichment pipeline. */ export interface DocumentIntelligenceLayoutSkill extends SearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; + /** Controls the cardinality of the output format. Default is 'markdown'. */ + outputFormat?: DocumentIntelligenceLayoutSkillOutputFormat; /** Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. */ outputMode?: DocumentIntelligenceLayoutSkillOutputMode; /** The depth of headers in the markdown output. Default is h6. */ markdownHeaderDepth?: DocumentIntelligenceLayoutSkillMarkdownHeaderDepth; + /** Controls the cardinality of the content extracted from the document by the skill */ + extractionOptions?: DocumentIntelligenceLayoutSkillExtractionOptions[]; + /** Controls the cardinality for chunking the content. */ + chunkingProperties?: DocumentIntelligenceLayoutSkillChunkingProperties; } /** A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. */ @@ -1725,24 +1566,6 @@ export interface WebApiSkill extends SearchIndexerSkill { authIdentity?: SearchIndexerDataIdentityUnion; } -/** The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment. */ -export interface AzureMachineLearningSkill extends SearchIndexerSkill { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Skills.Custom.AmlSkill"; - /** (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. */ - scoringUri?: string; - /** (Required for key authentication) The key for the AML service. */ - authenticationKey?: string; - /** (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. */ - resourceId?: string; - /** (Optional) When specified, indicates the timeout for the http client making the API call. */ - timeout?: string; - /** (Optional for token authentication). The region the AML service is deployed in. */ - region?: string; - /** (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1. */ - degreeOfParallelism?: number; -} - /** Allows you to generate a vector embedding for a given text input using the Azure OpenAI resource. */ export interface AzureOpenAIEmbeddingSkill extends SearchIndexerSkill, @@ -1753,14 +1576,6 @@ export interface AzureOpenAIEmbeddingSkill dimensions?: number; } -/** Allows you to generate a vector embedding for a given image or text input using the Azure AI Services Vision Vectorize API. */ -export interface VisionVectorizeSkill extends SearchIndexerSkill { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Skills.Vision.VectorizeSkill"; - /** The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. */ - modelVersion: string | null; -} - /** An empty object that represents the default Azure AI service resource for a skillset. */ export interface DefaultCognitiveServicesAccount extends CognitiveServicesAccount { @@ -1776,26 +1591,6 @@ export interface CognitiveServicesAccountKey extends CognitiveServicesAccount { key: string; } -/** The account key of an Azure AI service resource that's attached to a skillset, to be used with the resource's subdomain. */ -export interface AIServicesAccountKey extends CognitiveServicesAccount { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.AIServicesByKey"; - /** The key used to provision the Azure AI service resource attached to a skillset. */ - key: string; - /** The subdomain url for the corresponding AI Service. */ - subdomainUrl: string; -} - -/** The multi-region account of an Azure AI service resource that's attached to a skillset. */ -export interface AIServicesAccountIdentity extends CognitiveServicesAccount { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.AIServicesByIdentity"; - /** The user-assigned managed identity used for connections to AI Service. If not specified, the system-assigned managed identity is used. On updates to the skillset, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - identity: SearchIndexerDataIdentityUnion | null; - /** The subdomain url for the corresponding AI Service. */ - subdomainUrl: string; -} - /** Description for what data to store in Azure Tables. */ export interface SearchIndexerKnowledgeStoreTableProjectionSelector extends SearchIndexerKnowledgeStoreProjectionSelector { @@ -2366,22 +2161,6 @@ export interface WebApiVectorizer extends VectorSearchVectorizer { parameters?: WebApiParameters; } -/** Specifies the AI Services Vision parameters for vectorizing a query image or text. */ -export interface AIServicesVisionVectorizer extends VectorSearchVectorizer { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "aiServicesVision"; - /** Contains the parameters specific to AI Services Vision embedding vectorization. */ - aIServicesVisionParameters?: AIServicesVisionParameters; -} - -/** Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog for generating the vector embedding of a query string. */ -export interface AMLVectorizer extends VectorSearchVectorizer { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "aml"; - /** Specifies the properties of the AML vectorizer. */ - aMLParameters?: AMLParameters; -} - /** Contains configuration options specific to the scalar quantization compression method used during indexing and querying. */ export interface ScalarQuantizationCompression extends VectorSearchCompression { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -2396,6 +2175,22 @@ export interface BinaryQuantizationCompression extends VectorSearchCompression { kind: "binaryQuantization"; } +/** Clears the identity property of a datasource. */ +export interface SearchIndexerDataNoneIdentity + extends SearchIndexerDataIdentity { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odatatype: "#Microsoft.Azure.Search.DataNoneIdentity"; +} + +/** Specifies the identity for a datasource to use. */ +export interface SearchIndexerDataUserAssignedIdentity + extends SearchIndexerDataIdentity { + /** Polymorphic discriminator, which specifies the different types this object can be */ + odatatype: "#Microsoft.Azure.Search.DataUserAssignedIdentity"; + /** The fully qualified Azure resource Id of a user assigned managed identity typically in the form "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" that should have been assigned to the search service. */ + resourceId: string; +} + /** Projection definition for what data to store in Azure Blob. */ export interface SearchIndexerKnowledgeStoreObjectProjectionSelector extends SearchIndexerKnowledgeStoreBlobProjectionSelector {} @@ -2404,36 +2199,36 @@ export interface SearchIndexerKnowledgeStoreObjectProjectionSelector export interface SearchIndexerKnowledgeStoreFileProjectionSelector extends SearchIndexerKnowledgeStoreBlobProjectionSelector {} -/** Known values of {@link ApiVersion20241101Preview} that the service accepts. */ -export enum KnownApiVersion20241101Preview { - /** Api Version '2024-11-01-preview' */ - TwoThousandTwentyFour1101Preview = "2024-11-01-preview", +/** Known values of {@link ApiVersion20250901} that the service accepts. */ +export enum KnownApiVersion20250901 { + /** Api Version '2025-09-01' */ + TwoThousandTwentyFive0901 = "2025-09-01", } /** - * Defines values for ApiVersion20241101Preview. \ - * {@link KnownApiVersion20241101Preview} can be used interchangeably with ApiVersion20241101Preview, + * Defines values for ApiVersion20250901. \ + * {@link KnownApiVersion20250901} can be used interchangeably with ApiVersion20250901, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **2024-11-01-preview**: Api Version '2024-11-01-preview' + * **2025-09-01**: Api Version '2025-09-01' */ -export type ApiVersion20241101Preview = string; +export type ApiVersion20250901 = string; /** Known values of {@link SearchIndexerDataSourceType} that the service accepts. */ export enum KnownSearchIndexerDataSourceType { - /** Indicates an Azure SQL datasource. */ + /** Definition of an Azure SQL datasource whose credentials can either be a standard SQL connection string or the ResourceId of the SQL resource. The container property refers to the table or view to be indexed. Query parameter is not supported for this datasource. */ AzureSql = "azuresql", - /** Indicates a CosmosDB datasource. */ + /** Definition of an CosmosDB datasource whose credentials can either be a formatted connection string containing details for AccountEndpoint, AccountKey, and Database for a key based connection or details for ResourceID and ApiKind for keyless connection. The container property refers to cosmosdb collection to be indexed and the optional query property refers to a SQL query on the collection. */ CosmosDb = "cosmosdb", - /** Indicates an Azure Blob datasource. */ + /** Definition of an Azure Blob datasource whose credentials can either be a storage connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property refers to a specific sub-folder in the container. */ AzureBlob = "azureblob", - /** Indicates an Azure Table datasource. */ + /** Definition of an Azure Table datasource whose credentials can either be a table connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property can be used to filter rows. */ AzureTable = "azuretable", - /** Indicates a MySql datasource. */ + /** Definition of an Azure SQL datasource whose credentials can either be a standard ADO.NET formatted SQL connection string or the ResourceId of the SQL resource. The container property refers to the table or view to be indexed. Query parameter is not supported for this datasource. */ MySql = "mysql", - /** Indicates an ADLS Gen2 datasource. */ + /** Definition of an Azure ADLS Gen 2 datasource whose credentials can either be a storage connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property refers to a specific sub-folder in the container. */ AdlsGen2 = "adlsgen2", - /** Indicates a Microsoft Fabric OneLake datasource. */ + /** Definition of an Microsoft Fabric Onelake datasource whose credentials can either be the Fabric workspace GUID or a workspace FQDN. The container property refers to the lakehouse GUID and the optional query property refers to folders or shortcuts in the lakehouse. */ OneLake = "onelake", } @@ -2442,13 +2237,13 @@ export enum KnownSearchIndexerDataSourceType { * {@link KnownSearchIndexerDataSourceType} can be used interchangeably with SearchIndexerDataSourceType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **azuresql**: Indicates an Azure SQL datasource. \ - * **cosmosdb**: Indicates a CosmosDB datasource. \ - * **azureblob**: Indicates an Azure Blob datasource. \ - * **azuretable**: Indicates an Azure Table datasource. \ - * **mysql**: Indicates a MySql datasource. \ - * **adlsgen2**: Indicates an ADLS Gen2 datasource. \ - * **onelake**: Indicates a Microsoft Fabric OneLake datasource. + * **azuresql**: Definition of an Azure SQL datasource whose credentials can either be a standard SQL connection string or the ResourceId of the SQL resource. The container property refers to the table or view to be indexed. Query parameter is not supported for this datasource. \ + * **cosmosdb**: Definition of an CosmosDB datasource whose credentials can either be a formatted connection string containing details for AccountEndpoint, AccountKey, and Database for a key based connection or details for ResourceID and ApiKind for keyless connection. The container property refers to cosmosdb collection to be indexed and the optional query property refers to a SQL query on the collection. \ + * **azureblob**: Definition of an Azure Blob datasource whose credentials can either be a storage connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property refers to a specific sub-folder in the container. \ + * **azuretable**: Definition of an Azure Table datasource whose credentials can either be a table connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property can be used to filter rows. \ + * **mysql**: Definition of an Azure SQL datasource whose credentials can either be a standard ADO.NET formatted SQL connection string or the ResourceId of the SQL resource. The container property refers to the table or view to be indexed. Query parameter is not supported for this datasource. \ + * **adlsgen2**: Definition of an Azure ADLS Gen 2 datasource whose credentials can either be a storage connection string or the ResourceId of the storage account. The container property refers to the blob container to be indexed and the optional query property refers to a specific sub-folder in the container. \ + * **onelake**: Definition of an Microsoft Fabric Onelake datasource whose credentials can either be the Fabric workspace GUID or a workspace FQDN. The container property refers to the lakehouse GUID and the optional query property refers to folders or shortcuts in the lakehouse. */ export type SearchIndexerDataSourceType = string; @@ -2466,8 +2261,6 @@ export enum KnownBlobIndexerParsingMode { JsonArray = "jsonArray", /** Set to jsonLines to extract individual JSON entities, separated by a new line, as separate documents. */ JsonLines = "jsonLines", - /** Set to markdown to extract content from markdown files. */ - Markdown = "markdown", } /** @@ -2480,59 +2273,10 @@ export enum KnownBlobIndexerParsingMode { * **delimitedText**: Set to delimitedText when blobs are plain CSV files. \ * **json**: Set to json to extract structured content from JSON files. \ * **jsonArray**: Set to jsonArray to extract individual elements of a JSON array as separate documents. \ - * **jsonLines**: Set to jsonLines to extract individual JSON entities, separated by a new line, as separate documents. \ - * **markdown**: Set to markdown to extract content from markdown files. + * **jsonLines**: Set to jsonLines to extract individual JSON entities, separated by a new line, as separate documents. */ export type BlobIndexerParsingMode = string; -/** Known values of {@link MarkdownParsingSubmode} that the service accepts. */ -export enum KnownMarkdownParsingSubmode { - /** Indicates that each section of the markdown file (up to a specified depth) will be parsed into individual search documents. This can result in a single markdown file producing multiple search documents. This is the default sub-mode. */ - OneToMany = "oneToMany", - /** Indicates that each markdown file will be parsed into a single search document. */ - OneToOne = "oneToOne", -} - -/** - * Defines values for MarkdownParsingSubmode. \ - * {@link KnownMarkdownParsingSubmode} can be used interchangeably with MarkdownParsingSubmode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **oneToMany**: Indicates that each section of the markdown file (up to a specified depth) will be parsed into individual search documents. This can result in a single markdown file producing multiple search documents. This is the default sub-mode. \ - * **oneToOne**: Indicates that each markdown file will be parsed into a single search document. - */ -export type MarkdownParsingSubmode = string; - -/** Known values of {@link MarkdownHeaderDepth} that the service accepts. */ -export enum KnownMarkdownHeaderDepth { - /** Indicates that headers up to a level of h1 will be considered while grouping markdown content. */ - H1 = "h1", - /** Indicates that headers up to a level of h2 will be considered while grouping markdown content. */ - H2 = "h2", - /** Indicates that headers up to a level of h3 will be considered while grouping markdown content. */ - H3 = "h3", - /** Indicates that headers up to a level of h4 will be considered while grouping markdown content. */ - H4 = "h4", - /** Indicates that headers up to a level of h5 will be considered while grouping markdown content. */ - H5 = "h5", - /** Indicates that headers up to a level of h6 will be considered while grouping markdown content. This is the default. */ - H6 = "h6", -} - -/** - * Defines values for MarkdownHeaderDepth. \ - * {@link KnownMarkdownHeaderDepth} can be used interchangeably with MarkdownHeaderDepth, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **h1**: Indicates that headers up to a level of h1 will be considered while grouping markdown content. \ - * **h2**: Indicates that headers up to a level of h2 will be considered while grouping markdown content. \ - * **h3**: Indicates that headers up to a level of h3 will be considered while grouping markdown content. \ - * **h4**: Indicates that headers up to a level of h4 will be considered while grouping markdown content. \ - * **h5**: Indicates that headers up to a level of h5 will be considered while grouping markdown content. \ - * **h6**: Indicates that headers up to a level of h6 will be considered while grouping markdown content. This is the default. - */ -export type MarkdownHeaderDepth = string; - /** Known values of {@link BlobIndexerDataToExtract} that the service accepts. */ export enum KnownBlobIndexerDataToExtract { /** Indexes just the standard blob properties and user-specified metadata. */ @@ -2611,39 +2355,6 @@ export enum KnownIndexerExecutionEnvironment { */ export type IndexerExecutionEnvironment = string; -/** Known values of {@link IndexerExecutionStatusDetail} that the service accepts. */ -export enum KnownIndexerExecutionStatusDetail { - /** Indicates that the reset that occurred was for a call to ResetDocs. */ - ResetDocs = "resetDocs", -} - -/** - * Defines values for IndexerExecutionStatusDetail. \ - * {@link KnownIndexerExecutionStatusDetail} can be used interchangeably with IndexerExecutionStatusDetail, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **resetDocs**: Indicates that the reset that occurred was for a call to ResetDocs. - */ -export type IndexerExecutionStatusDetail = string; - -/** Known values of {@link IndexingMode} that the service accepts. */ -export enum KnownIndexingMode { - /** The indexer is indexing all documents in the datasource. */ - IndexingAllDocs = "indexingAllDocs", - /** The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status. */ - IndexingResetDocs = "indexingResetDocs", -} - -/** - * Defines values for IndexingMode. \ - * {@link KnownIndexingMode} can be used interchangeably with IndexingMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **indexingAllDocs**: The indexer is indexing all documents in the datasource. \ - * **indexingResetDocs**: The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status. - */ -export type IndexingMode = string; - /** Known values of {@link IndexProjectionMode} that the service accepts. */ export enum KnownIndexProjectionMode { /** The source document will be skipped from writing into the indexer's target index. */ @@ -3046,6 +2757,24 @@ export enum KnownVectorEncodingFormat { */ export type VectorEncodingFormat = string; +/** Known values of {@link RankingOrder} that the service accepts. */ +export enum KnownRankingOrder { + /** Sets sort order as BoostedRerankerScore */ + BoostedRerankerScore = "BoostedRerankerScore", + /** Sets sort order as ReRankerScore */ + ReRankerScore = "RerankerScore", +} + +/** + * Defines values for RankingOrder. \ + * {@link KnownRankingOrder} can be used interchangeably with RankingOrder, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **BoostedRerankerScore**: Sets sort order as BoostedRerankerScore \ + * **RerankerScore**: Sets sort order as ReRankerScore + */ +export type RankingOrder = string; + /** Known values of {@link VectorSearchAlgorithmKind} that the service accepts. */ export enum KnownVectorSearchAlgorithmKind { /** HNSW (Hierarchical Navigable Small World), a type of approximate nearest neighbors algorithm. */ @@ -3070,10 +2799,6 @@ export enum KnownVectorSearchVectorizerKind { AzureOpenAI = "azureOpenAI", /** Generate embeddings using a custom web endpoint at query time. */ CustomWebApi = "customWebApi", - /** Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. */ - AIServicesVision = "aiServicesVision", - /** Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog at query time. */ - AML = "aml", } /** @@ -3082,9 +2807,7 @@ export enum KnownVectorSearchVectorizerKind { * this enum contains the known values that the service supports. * ### Known values supported by the service * **azureOpenAI**: Generate embeddings using an Azure OpenAI resource at query time. \ - * **customWebApi**: Generate embeddings using a custom web endpoint at query time. \ - * **aiServicesVision**: Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. \ - * **aml**: Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog at query time. + * **customWebApi**: Generate embeddings using a custom web endpoint at query time. */ export type VectorSearchVectorizerKind = string; @@ -3313,36 +3036,6 @@ export enum KnownAzureOpenAIModelName { */ export type AzureOpenAIModelName = string; -/** Known values of {@link AIStudioModelCatalogName} that the service accepts. */ -export enum KnownAIStudioModelCatalogName { - /** OpenAIClipImageTextEmbeddingsVitBasePatch32 */ - OpenAIClipImageTextEmbeddingsVitBasePatch32 = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32", - /** OpenAIClipImageTextEmbeddingsViTLargePatch14336 */ - OpenAIClipImageTextEmbeddingsViTLargePatch14336 = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336", - /** FacebookDinoV2ImageEmbeddingsViTBase */ - FacebookDinoV2ImageEmbeddingsViTBase = "Facebook-DinoV2-Image-Embeddings-ViT-Base", - /** FacebookDinoV2ImageEmbeddingsViTGiant */ - FacebookDinoV2ImageEmbeddingsViTGiant = "Facebook-DinoV2-Image-Embeddings-ViT-Giant", - /** CohereEmbedV3English */ - CohereEmbedV3English = "Cohere-embed-v3-english", - /** CohereEmbedV3Multilingual */ - CohereEmbedV3Multilingual = "Cohere-embed-v3-multilingual", -} - -/** - * Defines values for AIStudioModelCatalogName. \ - * {@link KnownAIStudioModelCatalogName} can be used interchangeably with AIStudioModelCatalogName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32** \ - * **OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336** \ - * **Facebook-DinoV2-Image-Embeddings-ViT-Base** \ - * **Facebook-DinoV2-Image-Embeddings-ViT-Giant** \ - * **Cohere-embed-v3-english** \ - * **Cohere-embed-v3-multilingual** - */ -export type AIStudioModelCatalogName = string; - /** Known values of {@link KeyPhraseExtractionSkillLanguage} that the service accepts. */ export enum KnownKeyPhraseExtractionSkillLanguage { /** Danish */ @@ -4486,48 +4179,6 @@ export enum KnownTextSplitMode { */ export type TextSplitMode = string; -/** Known values of {@link SplitSkillUnit} that the service accepts. */ -export enum KnownSplitSkillUnit { - /** The length will be measured by character. */ - Characters = "characters", - /** The length will be measured by an AzureOpenAI tokenizer from the tiktoken library. */ - AzureOpenAITokens = "azureOpenAITokens", -} - -/** - * Defines values for SplitSkillUnit. \ - * {@link KnownSplitSkillUnit} can be used interchangeably with SplitSkillUnit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **characters**: The length will be measured by character. \ - * **azureOpenAITokens**: The length will be measured by an AzureOpenAI tokenizer from the tiktoken library. - */ -export type SplitSkillUnit = string; - -/** Known values of {@link SplitSkillEncoderModelName} that the service accepts. */ -export enum KnownSplitSkillEncoderModelName { - /** Refers to a base model trained with a 50,000 token vocabulary, often used in general natural language processing tasks. */ - R50KBase = "r50k_base", - /** A base model with a 50,000 token vocabulary, optimized for prompt-based tasks. */ - P50KBase = "p50k_base", - /** Similar to p50k_base but fine-tuned for editing or rephrasing tasks with a 50,000 token vocabulary. */ - P50KEdit = "p50k_edit", - /** A base model with a 100,000 token vocabulary. */ - CL100KBase = "cl100k_base", -} - -/** - * Defines values for SplitSkillEncoderModelName. \ - * {@link KnownSplitSkillEncoderModelName} can be used interchangeably with SplitSkillEncoderModelName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **r50k_base**: Refers to a base model trained with a 50,000 token vocabulary, often used in general natural language processing tasks. \ - * **p50k_base**: A base model with a 50,000 token vocabulary, optimized for prompt-based tasks. \ - * **p50k_edit**: Similar to p50k_base but fine-tuned for editing or rephrasing tasks with a 50,000 token vocabulary. \ - * **cl100k_base**: A base model with a 100,000 token vocabulary. - */ -export type SplitSkillEncoderModelName = string; - /** Known values of {@link CustomEntityLookupSkillLanguage} that the service accepts. */ export enum KnownCustomEntityLookupSkillLanguage { /** Danish */ @@ -4795,9 +4446,27 @@ export enum KnownTextTranslationSkillLanguage { */ export type TextTranslationSkillLanguage = string; +/** Known values of {@link DocumentIntelligenceLayoutSkillOutputFormat} that the service accepts. */ +export enum KnownDocumentIntelligenceLayoutSkillOutputFormat { + /** Specify the format of the output as text. */ + Text = "text", + /** Specify the format of the output as markdown. */ + Markdown = "markdown", +} + +/** + * Defines values for DocumentIntelligenceLayoutSkillOutputFormat. \ + * {@link KnownDocumentIntelligenceLayoutSkillOutputFormat} can be used interchangeably with DocumentIntelligenceLayoutSkillOutputFormat, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **text**: Specify the format of the output as text. \ + * **markdown**: Specify the format of the output as markdown. + */ +export type DocumentIntelligenceLayoutSkillOutputFormat = string; + /** Known values of {@link DocumentIntelligenceLayoutSkillOutputMode} that the service accepts. */ export enum KnownDocumentIntelligenceLayoutSkillOutputMode { - /** Specify the deepest markdown header section to parse. */ + /** Specify that the output should be parsed as 'oneToMany'. */ OneToMany = "oneToMany", } @@ -4806,7 +4475,7 @@ export enum KnownDocumentIntelligenceLayoutSkillOutputMode { * {@link KnownDocumentIntelligenceLayoutSkillOutputMode} can be used interchangeably with DocumentIntelligenceLayoutSkillOutputMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **oneToMany**: Specify the deepest markdown header section to parse. + * **oneToMany**: Specify that the output should be parsed as 'oneToMany'. */ export type DocumentIntelligenceLayoutSkillOutputMode = string; @@ -4840,6 +4509,39 @@ export enum KnownDocumentIntelligenceLayoutSkillMarkdownHeaderDepth { */ export type DocumentIntelligenceLayoutSkillMarkdownHeaderDepth = string; +/** Known values of {@link DocumentIntelligenceLayoutSkillExtractionOptions} that the service accepts. */ +export enum KnownDocumentIntelligenceLayoutSkillExtractionOptions { + /** Specify that image content should be extracted from the document. */ + Images = "images", + /** Specify that location metadata should be extracted from the document. */ + LocationMetadata = "locationMetadata", +} + +/** + * Defines values for DocumentIntelligenceLayoutSkillExtractionOptions. \ + * {@link KnownDocumentIntelligenceLayoutSkillExtractionOptions} can be used interchangeably with DocumentIntelligenceLayoutSkillExtractionOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **images**: Specify that image content should be extracted from the document. \ + * **locationMetadata**: Specify that location metadata should be extracted from the document. + */ +export type DocumentIntelligenceLayoutSkillExtractionOptions = string; + +/** Known values of {@link DocumentIntelligenceLayoutSkillChunkingUnit} that the service accepts. */ +export enum KnownDocumentIntelligenceLayoutSkillChunkingUnit { + /** Specifies chunk by characters. */ + Characters = "characters", +} + +/** + * Defines values for DocumentIntelligenceLayoutSkillChunkingUnit. \ + * {@link KnownDocumentIntelligenceLayoutSkillChunkingUnit} can be used interchangeably with DocumentIntelligenceLayoutSkillChunkingUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **characters**: Specifies chunk by characters. + */ +export type DocumentIntelligenceLayoutSkillChunkingUnit = string; + /** Known values of {@link LexicalTokenizerName} that the service accepts. */ export enum KnownLexicalTokenizerName { /** Grammar-based tokenizer that is suitable for processing most European-language documents. See http:\//lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/standard\/ClassicTokenizer.html */ @@ -5187,8 +4889,6 @@ export interface DataSourcesCreateOrUpdateOptionalParams ifMatch?: string; /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */ ifNoneMatch?: string; - /** Ignores cache reset requirements. */ - skipIndexerResetRequirementForCache?: boolean; } /** Contains response data for the createOrUpdate operation. */ @@ -5231,14 +4931,6 @@ export type DataSourcesCreateResponse = SearchIndexerDataSource; export interface IndexersResetOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface IndexersResetDocsOptionalParams - extends coreClient.OperationOptions { - keysOrIds?: DocumentKeysOrIds; - /** If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested. */ - overwrite?: boolean; -} - /** Optional parameters. */ export interface IndexersRunOptionalParams extends coreClient.OperationOptions {} @@ -5250,10 +4942,6 @@ export interface IndexersCreateOrUpdateOptionalParams ifMatch?: string; /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */ ifNoneMatch?: string; - /** Ignores cache reset requirements. */ - skipIndexerResetRequirementForCache?: boolean; - /** Disables cache reprocessing change detection. */ - disableCacheReprocessingChangeDetection?: boolean; } /** Contains response data for the createOrUpdate operation. */ @@ -5306,10 +4994,6 @@ export interface SkillsetsCreateOrUpdateOptionalParams ifMatch?: string; /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */ ifNoneMatch?: string; - /** Ignores cache reset requirements. */ - skipIndexerResetRequirementForCache?: boolean; - /** Disables cache reprocessing change detection. */ - disableCacheReprocessingChangeDetection?: boolean; } /** Contains response data for the createOrUpdate operation. */ @@ -5348,10 +5032,6 @@ export interface SkillsetsCreateOptionalParams /** Contains response data for the create operation. */ export type SkillsetsCreateResponse = SearchIndexerSkillset; -/** Optional parameters. */ -export interface SkillsetsResetSkillsOptionalParams - extends coreClient.OperationOptions {} - /** Optional parameters. */ export interface SynonymMapsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { @@ -5456,47 +5136,6 @@ export interface IndexesAnalyzeOptionalParams /** Contains response data for the analyze operation. */ export type IndexesAnalyzeResponse = AnalyzeResult; -/** Optional parameters. */ -export interface AliasesCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type AliasesCreateResponse = SearchAlias; - -/** Optional parameters. */ -export interface AliasesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type AliasesListResponse = ListAliasesResult; - -/** Optional parameters. */ -export interface AliasesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. */ - ifMatch?: string; - /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */ - ifNoneMatch?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type AliasesCreateOrUpdateResponse = SearchAlias; - -/** Optional parameters. */ -export interface AliasesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. */ - ifMatch?: string; - /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */ - ifNoneMatch?: string; -} - -/** Optional parameters. */ -export interface AliasesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type AliasesGetResponse = SearchAlias; - /** Optional parameters. */ export interface GetServiceStatisticsOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/search/search-documents/src/generated/service/models/mappers.ts b/sdk/search/search-documents/src/generated/service/models/mappers.ts index 921dceeb787a..ad03ad73887f 100644 --- a/sdk/search/search-documents/src/generated/service/models/mappers.ts +++ b/sdk/search/search-documents/src/generated/service/models/mappers.ts @@ -47,13 +47,6 @@ export const SearchIndexerDataSource: coreClient.CompositeMapper = { className: "SearchIndexerDataContainer", }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, dataChangeDetectionPolicy: { serializedName: "dataChangeDetectionPolicy", type: { @@ -122,27 +115,6 @@ export const SearchIndexerDataContainer: coreClient.CompositeMapper = { }, }; -export const SearchIndexerDataIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - uberParent: "SearchIndexerDataIdentity", - polymorphicDiscriminator: { - serializedName: "@odata\\.type", - clientName: "odatatype", - }, - modelProperties: { - odatatype: { - serializedName: "@odata\\.type", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - export const DataChangeDetectionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -218,13 +190,6 @@ export const SearchResourceEncryptionKey: coreClient.CompositeMapper = { className: "AzureActiveDirectoryApplicationCredentials", }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, }, }, }; @@ -371,37 +336,6 @@ export const ListDataSourcesResult: coreClient.CompositeMapper = { }, }; -export const DocumentKeysOrIds: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DocumentKeysOrIds", - modelProperties: { - documentKeys: { - serializedName: "documentKeys", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - datasourceDocumentIds: { - serializedName: "datasourceDocumentIds", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - export const SearchIndexer: coreClient.CompositeMapper = { type: { name: "Composite", @@ -499,13 +433,6 @@ export const SearchIndexer: coreClient.CompositeMapper = { className: "SearchResourceEncryptionKey", }, }, - cache: { - serializedName: "cache", - type: { - name: "Composite", - className: "SearchIndexerCache", - }, - }, }, }, }; @@ -638,22 +565,6 @@ export const IndexingParametersConfiguration: coreClient.CompositeMapper = { name: "Boolean", }, }, - markdownParsingSubmode: { - defaultValue: "oneToMany", - serializedName: "markdownParsingSubmode", - nullable: true, - type: { - name: "String", - }, - }, - markdownHeaderDepth: { - defaultValue: "h6", - serializedName: "markdownHeaderDepth", - nullable: true, - type: { - name: "String", - }, - }, documentRoot: { serializedName: "documentRoot", type: { @@ -759,35 +670,6 @@ export const FieldMappingFunction: coreClient.CompositeMapper = { }, }; -export const SearchIndexerCache: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchIndexerCache", - modelProperties: { - storageConnectionString: { - serializedName: "storageConnectionString", - type: { - name: "String", - }, - }, - enableReprocessing: { - serializedName: "enableReprocessing", - nullable: true, - type: { - name: "Boolean", - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, - }, - }, -}; - export const ListIndexersResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -816,6 +698,14 @@ export const SearchIndexerStatus: coreClient.CompositeMapper = { name: "Composite", className: "SearchIndexerStatus", modelProperties: { + name: { + serializedName: "name", + required: true, + readOnly: true, + type: { + name: "String", + }, + }, status: { serializedName: "status", required: true, @@ -871,20 +761,6 @@ export const IndexerExecutionResult: coreClient.CompositeMapper = { allowedValues: ["transientFailure", "success", "inProgress", "reset"], }, }, - statusDetail: { - serializedName: "statusDetail", - readOnly: true, - type: { - name: "String", - }, - }, - currentState: { - serializedName: "currentState", - type: { - name: "Composite", - className: "IndexerState", - }, - }, errorMessage: { serializedName: "errorMessage", readOnly: true, @@ -969,74 +845,6 @@ export const IndexerExecutionResult: coreClient.CompositeMapper = { }, }; -export const IndexerState: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IndexerState", - modelProperties: { - mode: { - serializedName: "mode", - readOnly: true, - type: { - name: "String", - }, - }, - allDocumentsInitialChangeTrackingState: { - serializedName: "allDocsInitialChangeTrackingState", - readOnly: true, - type: { - name: "String", - }, - }, - allDocumentsFinalChangeTrackingState: { - serializedName: "allDocsFinalChangeTrackingState", - readOnly: true, - type: { - name: "String", - }, - }, - resetDocumentsInitialChangeTrackingState: { - serializedName: "resetDocsInitialChangeTrackingState", - readOnly: true, - type: { - name: "String", - }, - }, - resetDocumentsFinalChangeTrackingState: { - serializedName: "resetDocsFinalChangeTrackingState", - readOnly: true, - type: { - name: "String", - }, - }, - resetDocumentKeys: { - serializedName: "resetDocumentKeys", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - resetDatasourceDocumentIds: { - serializedName: "resetDatasourceDocumentIds", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - export const SearchIndexerError: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1413,20 +1221,6 @@ export const SearchIndexerKnowledgeStore: coreClient.CompositeMapper = { }, }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, - parameters: { - serializedName: "parameters", - type: { - name: "Composite", - className: "SearchIndexerKnowledgeStoreParameters", - }, - }, }, }, }; @@ -1524,24 +1318,6 @@ export const SearchIndexerKnowledgeStoreProjectionSelector: coreClient.Composite }, }; -export const SearchIndexerKnowledgeStoreParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SearchIndexerKnowledgeStoreParameters", - additionalProperties: { type: { name: "Object" } }, - modelProperties: { - synthesizeGeneratedKeyName: { - defaultValue: false, - serializedName: "synthesizeGeneratedKeyName", - type: { - name: "Boolean", - }, - }, - }, - }, - }; - export const SearchIndexerIndexProjection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1655,26 +1431,6 @@ export const ListSkillsetsResult: coreClient.CompositeMapper = { }, }; -export const SkillNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SkillNames", - modelProperties: { - skillNames: { - serializedName: "skillNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - export const SynonymMap: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1754,6 +1510,12 @@ export const SearchIndex: coreClient.CompositeMapper = { name: "String", }, }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, fields: { serializedName: "fields", required: true, @@ -1993,7 +1755,7 @@ export const SearchField: coreClient.CompositeMapper = { }, vectorSearchDimensions: { constraints: { - InclusiveMaximum: 2048, + InclusiveMaximum: 4096, InclusiveMinimum: 2, }, serializedName: "dimensions", @@ -2421,6 +2183,13 @@ export const SemanticConfiguration: coreClient.CompositeMapper = { className: "SemanticPrioritizedFields", }, }, + rankingOrder: { + serializedName: "rankingOrder", + nullable: true, + type: { + name: "String", + }, + }, }, }, }; @@ -2653,20 +2422,6 @@ export const VectorSearchCompression: coreClient.CompositeMapper = { name: "String", }, }, - rerankWithOriginalVectors: { - defaultValue: true, - serializedName: "rerankWithOriginalVectors", - type: { - name: "Boolean", - }, - }, - defaultOversampling: { - serializedName: "defaultOversampling", - nullable: true, - type: { - name: "Number", - }, - }, rescoringOptions: { serializedName: "rescoringOptions", type: { @@ -2891,63 +2646,6 @@ export const AnalyzedTokenInfo: coreClient.CompositeMapper = { }, }; -export const SearchAlias: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchAlias", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - indexes: { - serializedName: "indexes", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - etag: { - serializedName: "@odata\\.etag", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ListAliasesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListAliasesResult", - modelProperties: { - aliases: { - serializedName: "value", - required: true, - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SearchAlias", - }, - }, - }, - }, - }, - }, -}; - export const ServiceStatistics: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2976,13 +2674,6 @@ export const ServiceCounters: coreClient.CompositeMapper = { name: "Composite", className: "ServiceCounters", modelProperties: { - aliasCounter: { - serializedName: "aliasesCount", - type: { - name: "Composite", - className: "ResourceCounter", - }, - }, documentCounter: { serializedName: "documentCount", type: { @@ -3234,6 +2925,27 @@ export const AzureOpenAIParameters: coreClient.CompositeMapper = { }, }; +export const SearchIndexerDataIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SearchIndexerDataIdentity", + uberParent: "SearchIndexerDataIdentity", + polymorphicDiscriminator: { + serializedName: "@odata\\.type", + clientName: "odatatype", + }, + modelProperties: { + odatatype: { + serializedName: "@odata\\.type", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const WebApiParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3282,94 +2994,6 @@ export const WebApiParameters: coreClient.CompositeMapper = { }, }; -export const AIServicesVisionParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AIServicesVisionParameters", - modelProperties: { - modelVersion: { - serializedName: "modelVersion", - required: true, - nullable: true, - type: { - name: "String", - }, - }, - resourceUri: { - serializedName: "resourceUri", - required: true, - type: { - name: "String", - }, - }, - apiKey: { - serializedName: "apiKey", - type: { - name: "String", - }, - }, - authIdentity: { - serializedName: "authIdentity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, - }, - }, -}; - -export const AMLParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AMLParameters", - modelProperties: { - scoringUri: { - serializedName: "uri", - required: true, - nullable: true, - type: { - name: "String", - }, - }, - authenticationKey: { - serializedName: "key", - nullable: true, - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - nullable: true, - type: { - name: "String", - }, - }, - timeout: { - serializedName: "timeout", - nullable: true, - type: { - name: "TimeSpan", - }, - }, - region: { - serializedName: "region", - nullable: true, - type: { - name: "String", - }, - }, - modelName: { - serializedName: "modelName", - type: { - name: "String", - }, - }, - }, - }, -}; - export const DistanceScoringParameters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3454,6 +3078,24 @@ export const TagScoringParameters: coreClient.CompositeMapper = { }, }; +export const SearchIndexerKnowledgeStoreParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SearchIndexerKnowledgeStoreParameters", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + synthesizeGeneratedKeyName: { + defaultValue: false, + serializedName: "synthesizeGeneratedKeyName", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + export const CustomEntity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3583,72 +3225,41 @@ export const CustomEntityAlias: coreClient.CompositeMapper = { serializedName: "fuzzyEditDistance", nullable: true, type: { - name: "Number", - }, - }, - }, - }, -}; - -export const AzureOpenAITokenizerParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureOpenAITokenizerParameters", - modelProperties: { - encoderModelName: { - serializedName: "encoderModelName", - nullable: true, - type: { - name: "String", - }, - }, - allowedSpecialTokens: { - serializedName: "allowedSpecialTokens", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Number", }, }, }, }, }; -export const SearchIndexerDataNoneIdentity: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Azure.Search.DataNoneIdentity", - type: { - name: "Composite", - className: "SearchIndexerDataNoneIdentity", - uberParent: "SearchIndexerDataIdentity", - polymorphicDiscriminator: - SearchIndexerDataIdentity.type.polymorphicDiscriminator, - modelProperties: { - ...SearchIndexerDataIdentity.type.modelProperties, - }, - }, -}; - -export const SearchIndexerDataUserAssignedIdentity: coreClient.CompositeMapper = +export const DocumentIntelligenceLayoutSkillChunkingProperties: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Azure.Search.DataUserAssignedIdentity", type: { name: "Composite", - className: "SearchIndexerDataUserAssignedIdentity", - uberParent: "SearchIndexerDataIdentity", - polymorphicDiscriminator: - SearchIndexerDataIdentity.type.polymorphicDiscriminator, + className: "DocumentIntelligenceLayoutSkillChunkingProperties", modelProperties: { - ...SearchIndexerDataIdentity.type.modelProperties, - resourceId: { - serializedName: "userAssignedIdentity", - required: true, + unit: { + defaultValue: "characters", + serializedName: "unit", + nullable: true, type: { name: "String", }, }, + maximumLength: { + serializedName: "maximumLength", + nullable: true, + type: { + name: "Number", + }, + }, + overlapLength: { + serializedName: "overlapLength", + nullable: true, + type: { + name: "Number", + }, + }, }, }, }; @@ -3716,22 +3327,6 @@ export const SoftDeleteColumnDeletionDetectionPolicy: coreClient.CompositeMapper }, }; -export const NativeBlobSoftDeleteDeletionDetectionPolicy: coreClient.CompositeMapper = - { - serializedName: - "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy", - type: { - name: "Composite", - className: "NativeBlobSoftDeleteDeletionDetectionPolicy", - uberParent: "DataDeletionDetectionPolicy", - polymorphicDiscriminator: - DataDeletionDetectionPolicy.type.polymorphicDiscriminator, - modelProperties: { - ...DataDeletionDetectionPolicy.type.modelProperties, - }, - }, - }; - export const ConditionalSkill: coreClient.CompositeMapper = { serializedName: "#Microsoft.Skills.Util.ConditionalSkill", type: { @@ -4216,20 +3811,6 @@ export const SplitSkill: coreClient.CompositeMapper = { name: "Number", }, }, - unit: { - serializedName: "unit", - nullable: true, - type: { - name: "String", - }, - }, - azureOpenAITokenizerParameters: { - serializedName: "azureOpenAITokenizerParameters", - type: { - name: "Composite", - className: "AzureOpenAITokenizerParameters", - }, - }, }, }, }; @@ -4372,6 +3953,14 @@ export const DocumentIntelligenceLayoutSkill: coreClient.CompositeMapper = { polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, modelProperties: { ...SearchIndexerSkill.type.modelProperties, + outputFormat: { + defaultValue: "markdown", + serializedName: "outputFormat", + nullable: true, + type: { + name: "String", + }, + }, outputMode: { defaultValue: "oneToMany", serializedName: "outputMode", @@ -4388,6 +3977,25 @@ export const DocumentIntelligenceLayoutSkill: coreClient.CompositeMapper = { name: "String", }, }, + extractionOptions: { + serializedName: "extractionOptions", + nullable: true, + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + chunkingProperties: { + serializedName: "chunkingProperties", + type: { + name: "Composite", + className: "DocumentIntelligenceLayoutSkillChunkingProperties", + }, + }, }, }, }; @@ -4459,61 +4067,6 @@ export const WebApiSkill: coreClient.CompositeMapper = { }, }; -export const AzureMachineLearningSkill: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Skills.Custom.AmlSkill", - type: { - name: "Composite", - className: "AzureMachineLearningSkill", - uberParent: "SearchIndexerSkill", - polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, - modelProperties: { - ...SearchIndexerSkill.type.modelProperties, - scoringUri: { - serializedName: "uri", - nullable: true, - type: { - name: "String", - }, - }, - authenticationKey: { - serializedName: "key", - nullable: true, - type: { - name: "String", - }, - }, - resourceId: { - serializedName: "resourceId", - nullable: true, - type: { - name: "String", - }, - }, - timeout: { - serializedName: "timeout", - nullable: true, - type: { - name: "TimeSpan", - }, - }, - region: { - serializedName: "region", - nullable: true, - type: { - name: "String", - }, - }, - degreeOfParallelism: { - serializedName: "degreeOfParallelism", - nullable: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - export const AzureOpenAIEmbeddingSkill: coreClient.CompositeMapper = { serializedName: "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill", type: { @@ -4535,27 +4088,6 @@ export const AzureOpenAIEmbeddingSkill: coreClient.CompositeMapper = { }, }; -export const VisionVectorizeSkill: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Skills.Vision.VectorizeSkill", - type: { - name: "Composite", - className: "VisionVectorizeSkill", - uberParent: "SearchIndexerSkill", - polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator, - modelProperties: { - ...SearchIndexerSkill.type.modelProperties, - modelVersion: { - serializedName: "modelVersion", - required: true, - nullable: true, - type: { - name: "String", - }, - }, - }, - }, -}; - export const DefaultCognitiveServicesAccount: coreClient.CompositeMapper = { serializedName: "#Microsoft.Azure.Search.DefaultCognitiveServices", type: { @@ -4591,62 +4123,6 @@ export const CognitiveServicesAccountKey: coreClient.CompositeMapper = { }, }; -export const AIServicesAccountKey: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Azure.Search.AIServicesByKey", - type: { - name: "Composite", - className: "AIServicesAccountKey", - uberParent: "CognitiveServicesAccount", - polymorphicDiscriminator: - CognitiveServicesAccount.type.polymorphicDiscriminator, - modelProperties: { - ...CognitiveServicesAccount.type.modelProperties, - key: { - serializedName: "key", - required: true, - type: { - name: "String", - }, - }, - subdomainUrl: { - serializedName: "subdomainUrl", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AIServicesAccountIdentity: coreClient.CompositeMapper = { - serializedName: "#Microsoft.Azure.Search.AIServicesByIdentity", - type: { - name: "Composite", - className: "AIServicesAccountIdentity", - uberParent: "CognitiveServicesAccount", - polymorphicDiscriminator: - CognitiveServicesAccount.type.polymorphicDiscriminator, - modelProperties: { - ...CognitiveServicesAccount.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "SearchIndexerDataIdentity", - }, - }, - subdomainUrl: { - serializedName: "subdomainUrl", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - export const SearchIndexerKnowledgeStoreTableProjectionSelector: coreClient.CompositeMapper = { type: { @@ -4822,7 +4298,7 @@ export const PatternAnalyzer: coreClient.CompositeMapper = { }, }, pattern: { - defaultValue: "W+", + defaultValue: "\W+", serializedName: "pattern", type: { name: "String", @@ -5299,7 +4775,7 @@ export const PatternTokenizer: coreClient.CompositeMapper = { modelProperties: { ...LexicalTokenizer.type.modelProperties, pattern: { - defaultValue: "W+", + defaultValue: "\W+", serializedName: "pattern", type: { name: "String", @@ -6584,48 +6060,6 @@ export const WebApiVectorizer: coreClient.CompositeMapper = { }, }; -export const AIServicesVisionVectorizer: coreClient.CompositeMapper = { - serializedName: "aiServicesVision", - type: { - name: "Composite", - className: "AIServicesVisionVectorizer", - uberParent: "VectorSearchVectorizer", - polymorphicDiscriminator: - VectorSearchVectorizer.type.polymorphicDiscriminator, - modelProperties: { - ...VectorSearchVectorizer.type.modelProperties, - aIServicesVisionParameters: { - serializedName: "aiServicesVisionParameters", - type: { - name: "Composite", - className: "AIServicesVisionParameters", - }, - }, - }, - }, -}; - -export const AMLVectorizer: coreClient.CompositeMapper = { - serializedName: "aml", - type: { - name: "Composite", - className: "AMLVectorizer", - uberParent: "VectorSearchVectorizer", - polymorphicDiscriminator: - VectorSearchVectorizer.type.polymorphicDiscriminator, - modelProperties: { - ...VectorSearchVectorizer.type.modelProperties, - aMLParameters: { - serializedName: "amlParameters", - type: { - name: "Composite", - className: "AMLParameters", - }, - }, - }, - }, -}; - export const ScalarQuantizationCompression: coreClient.CompositeMapper = { serializedName: "scalarQuantization", type: { @@ -6661,6 +6095,42 @@ export const BinaryQuantizationCompression: coreClient.CompositeMapper = { }, }; +export const SearchIndexerDataNoneIdentity: coreClient.CompositeMapper = { + serializedName: "#Microsoft.Azure.Search.DataNoneIdentity", + type: { + name: "Composite", + className: "SearchIndexerDataNoneIdentity", + uberParent: "SearchIndexerDataIdentity", + polymorphicDiscriminator: + SearchIndexerDataIdentity.type.polymorphicDiscriminator, + modelProperties: { + ...SearchIndexerDataIdentity.type.modelProperties, + }, + }, +}; + +export const SearchIndexerDataUserAssignedIdentity: coreClient.CompositeMapper = + { + serializedName: "#Microsoft.Azure.Search.DataUserAssignedIdentity", + type: { + name: "Composite", + className: "SearchIndexerDataUserAssignedIdentity", + uberParent: "SearchIndexerDataIdentity", + polymorphicDiscriminator: + SearchIndexerDataIdentity.type.polymorphicDiscriminator, + modelProperties: { + ...SearchIndexerDataIdentity.type.modelProperties, + resourceId: { + serializedName: "userAssignedIdentity", + required: true, + type: { + name: "String", + }, + }, + }, + }, + }; + export const SearchIndexerKnowledgeStoreObjectProjectionSelector: coreClient.CompositeMapper = { type: { @@ -6686,7 +6156,6 @@ export const SearchIndexerKnowledgeStoreFileProjectionSelector: coreClient.Compo }; export let discriminators = { - SearchIndexerDataIdentity: SearchIndexerDataIdentity, DataChangeDetectionPolicy: DataChangeDetectionPolicy, DataDeletionDetectionPolicy: DataDeletionDetectionPolicy, SearchIndexerSkill: SearchIndexerSkill, @@ -6701,18 +6170,13 @@ export let discriminators = { VectorSearchAlgorithmConfiguration: VectorSearchAlgorithmConfiguration, VectorSearchVectorizer: VectorSearchVectorizer, VectorSearchCompression: VectorSearchCompression, - "SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataNoneIdentity": - SearchIndexerDataNoneIdentity, - "SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataUserAssignedIdentity": - SearchIndexerDataUserAssignedIdentity, + SearchIndexerDataIdentity: SearchIndexerDataIdentity, "DataChangeDetectionPolicy.#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy": HighWaterMarkChangeDetectionPolicy, "DataChangeDetectionPolicy.#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy": SqlIntegratedChangeTrackingPolicy, "DataDeletionDetectionPolicy.#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy": SoftDeleteColumnDeletionDetectionPolicy, - "DataDeletionDetectionPolicy.#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy": - NativeBlobSoftDeleteDeletionDetectionPolicy, "SearchIndexerSkill.#Microsoft.Skills.Util.ConditionalSkill": ConditionalSkill, "SearchIndexerSkill.#Microsoft.Skills.Text.KeyPhraseExtractionSkill": @@ -6745,20 +6209,12 @@ export let discriminators = { "SearchIndexerSkill.#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill": DocumentIntelligenceLayoutSkill, "SearchIndexerSkill.#Microsoft.Skills.Custom.WebApiSkill": WebApiSkill, - "SearchIndexerSkill.#Microsoft.Skills.Custom.AmlSkill": - AzureMachineLearningSkill, "SearchIndexerSkill.#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": AzureOpenAIEmbeddingSkill, - "SearchIndexerSkill.#Microsoft.Skills.Vision.VectorizeSkill": - VisionVectorizeSkill, "CognitiveServicesAccount.#Microsoft.Azure.Search.DefaultCognitiveServices": DefaultCognitiveServicesAccount, "CognitiveServicesAccount.#Microsoft.Azure.Search.CognitiveServicesByKey": CognitiveServicesAccountKey, - "CognitiveServicesAccount.#Microsoft.Azure.Search.AIServicesByKey": - AIServicesAccountKey, - "CognitiveServicesAccount.#Microsoft.Azure.Search.AIServicesByIdentity": - AIServicesAccountIdentity, "ScoringFunction.distance": DistanceScoringFunction, "ScoringFunction.freshness": FreshnessScoringFunction, "ScoringFunction.magnitude": MagnitudeScoringFunction, @@ -6840,8 +6296,10 @@ export let discriminators = { ExhaustiveKnnAlgorithmConfiguration, "VectorSearchVectorizer.azureOpenAI": AzureOpenAIVectorizer, "VectorSearchVectorizer.customWebApi": WebApiVectorizer, - "VectorSearchVectorizer.aiServicesVision": AIServicesVisionVectorizer, - "VectorSearchVectorizer.aml": AMLVectorizer, "VectorSearchCompression.scalarQuantization": ScalarQuantizationCompression, "VectorSearchCompression.binaryQuantization": BinaryQuantizationCompression, + "SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataNoneIdentity": + SearchIndexerDataNoneIdentity, + "SearchIndexerDataIdentity.#Microsoft.Azure.Search.DataUserAssignedIdentity": + SearchIndexerDataUserAssignedIdentity, }; diff --git a/sdk/search/search-documents/src/generated/service/models/parameters.ts b/sdk/search/search-documents/src/generated/service/models/parameters.ts index cc24da1b6b80..957601452128 100644 --- a/sdk/search/search-documents/src/generated/service/models/parameters.ts +++ b/sdk/search/search-documents/src/generated/service/models/parameters.ts @@ -13,14 +13,11 @@ import { } from "@azure/core-client"; import { SearchIndexerDataSource as SearchIndexerDataSourceMapper, - DocumentKeysOrIds as DocumentKeysOrIdsMapper, SearchIndexer as SearchIndexerMapper, SearchIndexerSkillset as SearchIndexerSkillsetMapper, - SkillNames as SkillNamesMapper, SynonymMap as SynonymMapMapper, SearchIndex as SearchIndexMapper, AnalyzeRequest as AnalyzeRequestMapper, - SearchAlias as SearchAliasMapper, } from "../models/mappers.js"; export const contentType: OperationParameter = { @@ -118,16 +115,6 @@ export const apiVersion: OperationQueryParameter = { }, }; -export const skipIndexerResetRequirementForCache: OperationQueryParameter = { - parameterPath: ["options", "skipIndexerResetRequirementForCache"], - mapper: { - serializedName: "ignoreResetRequirements", - type: { - name: "Boolean", - }, - }, -}; - export const select: OperationQueryParameter = { parameterPath: ["options", "select"], mapper: { @@ -149,38 +136,11 @@ export const indexerName: OperationURLParameter = { }, }; -export const keysOrIds: OperationParameter = { - parameterPath: ["options", "keysOrIds"], - mapper: DocumentKeysOrIdsMapper, -}; - -export const overwrite: OperationQueryParameter = { - parameterPath: ["options", "overwrite"], - mapper: { - defaultValue: false, - serializedName: "overwrite", - type: { - name: "Boolean", - }, - }, -}; - export const indexer: OperationParameter = { parameterPath: "indexer", mapper: SearchIndexerMapper, }; -export const disableCacheReprocessingChangeDetection: OperationQueryParameter = - { - parameterPath: ["options", "disableCacheReprocessingChangeDetection"], - mapper: { - serializedName: "disableCacheReprocessingChangeDetection", - type: { - name: "Boolean", - }, - }, - }; - export const skillset: OperationParameter = { parameterPath: "skillset", mapper: SearchIndexerSkillsetMapper, @@ -197,11 +157,6 @@ export const skillsetName: OperationURLParameter = { }, }; -export const skillNames: OperationParameter = { - parameterPath: "skillNames", - mapper: SkillNamesMapper, -}; - export const synonymMap: OperationParameter = { parameterPath: "synonymMap", mapper: SynonymMapMapper, @@ -248,19 +203,3 @@ export const request: OperationParameter = { parameterPath: "request", mapper: AnalyzeRequestMapper, }; - -export const alias: OperationParameter = { - parameterPath: "alias", - mapper: SearchAliasMapper, -}; - -export const aliasName: OperationURLParameter = { - parameterPath: "aliasName", - mapper: { - serializedName: "aliasName", - required: true, - type: { - name: "String", - }, - }, -}; diff --git a/sdk/search/search-documents/src/generated/service/operations/aliases.ts b/sdk/search/search-documents/src/generated/service/operations/aliases.ts deleted file mode 100644 index 32ca20eb76a4..000000000000 --- a/sdk/search/search-documents/src/generated/service/operations/aliases.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Aliases } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { SearchServiceClient } from "../searchServiceClient.js"; -import { - SearchAlias, - AliasesCreateOptionalParams, - AliasesCreateResponse, - AliasesListOptionalParams, - AliasesListResponse, - AliasesCreateOrUpdateOptionalParams, - AliasesCreateOrUpdateResponse, - AliasesDeleteOptionalParams, - AliasesGetOptionalParams, - AliasesGetResponse, -} from "../models/index.js"; - -/** Class containing Aliases operations. */ -export class AliasesImpl implements Aliases { - private readonly client: SearchServiceClient; - - /** - * Initialize a new instance of the class Aliases class. - * @param client Reference to the service client - */ - constructor(client: SearchServiceClient) { - this.client = client; - } - - /** - * Creates a new search alias. - * @param alias The definition of the alias to create. - * @param options The options parameters. - */ - create( - alias: SearchAlias, - options?: AliasesCreateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { alias, options }, - createOperationSpec, - ); - } - - /** - * Lists all aliases available for a search service. - * @param options The options parameters. - */ - list(options?: AliasesListOptionalParams): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Creates a new search alias or updates an alias if it already exists. - * @param aliasName The definition of the alias to create or update. - * @param alias The definition of the alias to create or update. - * @param options The options parameters. - */ - createOrUpdate( - aliasName: string, - alias: SearchAlias, - options?: AliasesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { aliasName, alias, options }, - createOrUpdateOperationSpec, - ); - } - - /** - * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no - * recovery option. The mapped index is untouched by this operation. - * @param aliasName The name of the alias to delete. - * @param options The options parameters. - */ - delete( - aliasName: string, - options?: AliasesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { aliasName, options }, - deleteOperationSpec, - ); - } - - /** - * Retrieves an alias definition. - * @param aliasName The name of the alias to retrieve. - * @param options The options parameters. - */ - get( - aliasName: string, - options?: AliasesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { aliasName, options }, - getOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreClient.OperationSpec = { - path: "/aliases", - httpMethod: "POST", - responses: { - 201: { - bodyMapper: Mappers.SearchAlias, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.alias, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/aliases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ListAliasesResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint], - headerParameters: [Parameters.accept], - serializer, -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: "/aliases('{aliasName}')", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SearchAlias, - }, - 201: { - bodyMapper: Mappers.SearchAlias, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.alias, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint, Parameters.aliasName], - headerParameters: [ - Parameters.contentType, - Parameters.accept, - Parameters.ifMatch, - Parameters.ifNoneMatch, - Parameters.prefer, - ], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/aliases('{aliasName}')", - httpMethod: "DELETE", - responses: { - 204: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint, Parameters.aliasName], - headerParameters: [ - Parameters.accept, - Parameters.ifMatch, - Parameters.ifNoneMatch, - ], - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/aliases('{aliasName}')", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SearchAlias, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint, Parameters.aliasName], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/search/search-documents/src/generated/service/operations/dataSources.ts b/sdk/search/search-documents/src/generated/service/operations/dataSources.ts index 5bf610119b24..b66f9cee7f8f 100644 --- a/sdk/search/search-documents/src/generated/service/operations/dataSources.ts +++ b/sdk/search/search-documents/src/generated/service/operations/dataSources.ts @@ -126,10 +126,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, }, requestBody: Parameters.dataSource, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipIndexerResetRequirementForCache, - ], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.dataSourceName], headerParameters: [ Parameters.contentType, diff --git a/sdk/search/search-documents/src/generated/service/operations/index.ts b/sdk/search/search-documents/src/generated/service/operations/index.ts index 4022a60095f0..ce88c8ccad72 100644 --- a/sdk/search/search-documents/src/generated/service/operations/index.ts +++ b/sdk/search/search-documents/src/generated/service/operations/index.ts @@ -11,4 +11,3 @@ export * from "./indexers.js"; export * from "./skillsets.js"; export * from "./synonymMaps.js"; export * from "./indexes.js"; -export * from "./aliases.js"; diff --git a/sdk/search/search-documents/src/generated/service/operations/indexers.ts b/sdk/search/search-documents/src/generated/service/operations/indexers.ts index 98d42fc0058d..839a9f61567b 100644 --- a/sdk/search/search-documents/src/generated/service/operations/indexers.ts +++ b/sdk/search/search-documents/src/generated/service/operations/indexers.ts @@ -13,7 +13,6 @@ import * as Parameters from "../models/parameters.js"; import { SearchServiceClient } from "../searchServiceClient.js"; import { IndexersResetOptionalParams, - IndexersResetDocsOptionalParams, IndexersRunOptionalParams, SearchIndexer, IndexersCreateOrUpdateOptionalParams, @@ -56,21 +55,6 @@ export class IndexersImpl implements Indexers { ); } - /** - * Resets specific documents in the datasource to be selectively re-ingested by the indexer. - * @param indexerName The name of the indexer to reset documents for. - * @param options The options parameters. - */ - resetDocs( - indexerName: string, - options?: IndexersResetDocsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { indexerName, options }, - resetDocsOperationSpec, - ); - } - /** * Runs an indexer on-demand. * @param indexerName The name of the indexer to run. @@ -185,22 +169,6 @@ const resetOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; -const resetDocsOperationSpec: coreClient.OperationSpec = { - path: "/indexers('{indexerName}')/search.resetdocs", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.keysOrIds, - queryParameters: [Parameters.apiVersion, Parameters.overwrite], - urlParameters: [Parameters.endpoint, Parameters.indexerName], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; const runOperationSpec: coreClient.OperationSpec = { path: "/indexers('{indexerName}')/search.run", httpMethod: "POST", @@ -230,11 +198,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, }, requestBody: Parameters.indexer, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipIndexerResetRequirementForCache, - Parameters.disableCacheReprocessingChangeDetection, - ], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.indexerName], headerParameters: [ Parameters.contentType, diff --git a/sdk/search/search-documents/src/generated/service/operations/skillsets.ts b/sdk/search/search-documents/src/generated/service/operations/skillsets.ts index 770caf4c4473..be99880d64db 100644 --- a/sdk/search/search-documents/src/generated/service/operations/skillsets.ts +++ b/sdk/search/search-documents/src/generated/service/operations/skillsets.ts @@ -22,8 +22,6 @@ import { SkillsetsListResponse, SkillsetsCreateOptionalParams, SkillsetsCreateResponse, - SkillNames, - SkillsetsResetSkillsOptionalParams, } from "../models/index.js"; /** Class containing Skillsets operations. */ @@ -107,23 +105,6 @@ export class SkillsetsImpl implements Skillsets { createOperationSpec, ); } - - /** - * Reset an existing skillset in a search service. - * @param skillsetName The name of the skillset to reset. - * @param skillNames The names of skills to reset. - * @param options The options parameters. - */ - resetSkills( - skillsetName: string, - skillNames: SkillNames, - options?: SkillsetsResetSkillsOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { skillsetName, skillNames, options }, - resetSkillsOperationSpec, - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -143,11 +124,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, }, requestBody: Parameters.skillset, - queryParameters: [ - Parameters.apiVersion, - Parameters.skipIndexerResetRequirementForCache, - Parameters.disableCacheReprocessingChangeDetection, - ], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.skillsetName], headerParameters: [ Parameters.contentType, @@ -228,19 +205,3 @@ const createOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; -const resetSkillsOperationSpec: coreClient.OperationSpec = { - path: "/skillsets('{skillsetName}')/search.resetskills", - httpMethod: "POST", - responses: { - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.skillNames, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.endpoint, Parameters.skillsetName], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/search/search-documents/src/generated/service/operationsInterfaces/aliases.ts b/sdk/search/search-documents/src/generated/service/operationsInterfaces/aliases.ts deleted file mode 100644 index 1a0751eb6ed4..000000000000 --- a/sdk/search/search-documents/src/generated/service/operationsInterfaces/aliases.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SearchAlias, - AliasesCreateOptionalParams, - AliasesCreateResponse, - AliasesListOptionalParams, - AliasesListResponse, - AliasesCreateOrUpdateOptionalParams, - AliasesCreateOrUpdateResponse, - AliasesDeleteOptionalParams, - AliasesGetOptionalParams, - AliasesGetResponse, -} from "../models/index.js"; - -/** Interface representing a Aliases. */ -export interface Aliases { - /** - * Creates a new search alias. - * @param alias The definition of the alias to create. - * @param options The options parameters. - */ - create( - alias: SearchAlias, - options?: AliasesCreateOptionalParams, - ): Promise; - /** - * Lists all aliases available for a search service. - * @param options The options parameters. - */ - list(options?: AliasesListOptionalParams): Promise; - /** - * Creates a new search alias or updates an alias if it already exists. - * @param aliasName The definition of the alias to create or update. - * @param alias The definition of the alias to create or update. - * @param options The options parameters. - */ - createOrUpdate( - aliasName: string, - alias: SearchAlias, - options?: AliasesCreateOrUpdateOptionalParams, - ): Promise; - /** - * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no - * recovery option. The mapped index is untouched by this operation. - * @param aliasName The name of the alias to delete. - * @param options The options parameters. - */ - delete( - aliasName: string, - options?: AliasesDeleteOptionalParams, - ): Promise; - /** - * Retrieves an alias definition. - * @param aliasName The name of the alias to retrieve. - * @param options The options parameters. - */ - get( - aliasName: string, - options?: AliasesGetOptionalParams, - ): Promise; -} diff --git a/sdk/search/search-documents/src/generated/service/operationsInterfaces/index.ts b/sdk/search/search-documents/src/generated/service/operationsInterfaces/index.ts index 4022a60095f0..ce88c8ccad72 100644 --- a/sdk/search/search-documents/src/generated/service/operationsInterfaces/index.ts +++ b/sdk/search/search-documents/src/generated/service/operationsInterfaces/index.ts @@ -11,4 +11,3 @@ export * from "./indexers.js"; export * from "./skillsets.js"; export * from "./synonymMaps.js"; export * from "./indexes.js"; -export * from "./aliases.js"; diff --git a/sdk/search/search-documents/src/generated/service/operationsInterfaces/indexers.ts b/sdk/search/search-documents/src/generated/service/operationsInterfaces/indexers.ts index 3b9a09dc78aa..7a2501641a48 100644 --- a/sdk/search/search-documents/src/generated/service/operationsInterfaces/indexers.ts +++ b/sdk/search/search-documents/src/generated/service/operationsInterfaces/indexers.ts @@ -8,7 +8,6 @@ import { IndexersResetOptionalParams, - IndexersResetDocsOptionalParams, IndexersRunOptionalParams, SearchIndexer, IndexersCreateOrUpdateOptionalParams, @@ -35,15 +34,6 @@ export interface Indexers { indexerName: string, options?: IndexersResetOptionalParams, ): Promise; - /** - * Resets specific documents in the datasource to be selectively re-ingested by the indexer. - * @param indexerName The name of the indexer to reset documents for. - * @param options The options parameters. - */ - resetDocs( - indexerName: string, - options?: IndexersResetDocsOptionalParams, - ): Promise; /** * Runs an indexer on-demand. * @param indexerName The name of the indexer to run. diff --git a/sdk/search/search-documents/src/generated/service/operationsInterfaces/skillsets.ts b/sdk/search/search-documents/src/generated/service/operationsInterfaces/skillsets.ts index 2287fd215c5c..42378fafa8d1 100644 --- a/sdk/search/search-documents/src/generated/service/operationsInterfaces/skillsets.ts +++ b/sdk/search/search-documents/src/generated/service/operationsInterfaces/skillsets.ts @@ -17,8 +17,6 @@ import { SkillsetsListResponse, SkillsetsCreateOptionalParams, SkillsetsCreateResponse, - SkillNames, - SkillsetsResetSkillsOptionalParams, } from "../models/index.js"; /** Interface representing a Skillsets. */ @@ -66,15 +64,4 @@ export interface Skillsets { skillset: SearchIndexerSkillset, options?: SkillsetsCreateOptionalParams, ): Promise; - /** - * Reset an existing skillset in a search service. - * @param skillsetName The name of the skillset to reset. - * @param skillNames The names of skills to reset. - * @param options The options parameters. - */ - resetSkills( - skillsetName: string, - skillNames: SkillNames, - options?: SkillsetsResetSkillsOptionalParams, - ): Promise; } diff --git a/sdk/search/search-documents/src/generated/service/searchServiceClient.ts b/sdk/search/search-documents/src/generated/service/searchServiceClient.ts index 6e24506ad82c..968f25948081 100644 --- a/sdk/search/search-documents/src/generated/service/searchServiceClient.ts +++ b/sdk/search/search-documents/src/generated/service/searchServiceClient.ts @@ -19,7 +19,6 @@ import { SkillsetsImpl, SynonymMapsImpl, IndexesImpl, - AliasesImpl, } from "./operations/index.js"; import { DataSources, @@ -27,12 +26,11 @@ import { Skillsets, SynonymMaps, Indexes, - Aliases, } from "./operationsInterfaces/index.js"; import * as Parameters from "./models/parameters.js"; import * as Mappers from "./models/mappers.js"; import { - ApiVersion20241101Preview, + ApiVersion20250901, SearchServiceClientOptionalParams, GetServiceStatisticsOptionalParams, GetServiceStatisticsResponse, @@ -41,7 +39,7 @@ import { /** @internal */ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient { endpoint: string; - apiVersion: ApiVersion20241101Preview; + apiVersion: ApiVersion20250901; /** * Initializes a new instance of the SearchServiceClient class. @@ -51,7 +49,7 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient { */ constructor( endpoint: string, - apiVersion: ApiVersion20241101Preview, + apiVersion: ApiVersion20250901, options?: SearchServiceClientOptionalParams, ) { if (endpoint === undefined) { @@ -69,7 +67,7 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient { requestContentType: "application/json; charset=utf-8", }; - const packageDetails = `azsdk-js-search-documents/12.2.0-beta.2`; + const packageDetails = `azsdk-js-search-documents/12.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -92,7 +90,6 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient { this.skillsets = new SkillsetsImpl(this); this.synonymMaps = new SynonymMapsImpl(this); this.indexes = new IndexesImpl(this); - this.aliases = new AliasesImpl(this); this.addCustomApiVersionPolicy(apiVersion); } @@ -142,7 +139,6 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient { skillsets: Skillsets; synonymMaps: SynonymMaps; indexes: Indexes; - aliases: Aliases; } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); diff --git a/sdk/search/search-documents/src/index.ts b/sdk/search/search-documents/src/index.ts index aa30f09c94d6..29d6ad4975e8 100644 --- a/sdk/search/search-documents/src/index.ts +++ b/sdk/search/search-documents/src/index.ts @@ -6,53 +6,27 @@ export { AutocompleteItem, AutocompleteMode, AutocompleteResult, - DebugInfo, FacetResult, - HybridCountAndFacetMode, - HybridSearch as HybridSearchOptions, IndexActionType, IndexDocumentsResult, IndexingResult, - KnownHybridCountAndFacetMode, - KnownQueryDebugMode, - KnownQueryLanguage, - KnownQuerySpellerType as KnownQuerySpeller, KnownSemanticErrorMode, KnownSemanticErrorReason, - KnownSemanticFieldState, - KnownSemanticQueryRewritesResultType, KnownSemanticSearchResultsType, KnownVectorFilterMode, KnownVectorQueryKind, - KnownVectorThresholdKind, QueryAnswerResult, QueryCaptionResult, - QueryDebugMode, - QueryLanguage, - QueryResultDocumentRerankerInput, - QueryResultDocumentSubscores, - QueryRewritesDebugInfo, - QueryRewritesValuesDebugInfo, - QuerySpellerType as QuerySpeller, QueryType, ScoringStatistics, SearchMode, - SemanticFieldState, - SemanticQueryRewritesResultType, - SingleVectorFieldResult, - TextResult, - VectorsDebugInfo, } from "./generated/data/models/index.js"; export { - AIServicesAccountKey, - AIStudioModelCatalogName, AnalyzedTokenInfo, AnalyzeResult, AsciiFoldingTokenFilter, AzureActiveDirectoryApplicationCredentials, - AzureMachineLearningSkill, AzureOpenAIModelName, - AzureOpenAITokenizerParameters, BinaryQuantizationCompression, BM25Similarity, CharFilter as BaseCharFilter, @@ -76,8 +50,6 @@ export { DistanceScoringFunction, DistanceScoringParameters, DocumentExtractionSkill, - DocumentIntelligenceLayoutSkillMarkdownHeaderDepth, - DocumentIntelligenceLayoutSkillOutputMode, EdgeNGramTokenFilterSide, EdgeNGramTokenizer, ElisionTokenFilter, @@ -90,50 +62,40 @@ export { HighWaterMarkChangeDetectionPolicy, IndexerExecutionResult, IndexerExecutionStatus, - IndexerExecutionStatusDetail, - IndexerState, IndexerStatus, - IndexingMode, IndexingSchedule, IndexProjectionMode, InputFieldMappingEntry, KeepTokenFilter, KeywordMarkerTokenFilter, - KnownAIStudioModelCatalogName, KnownAzureOpenAIModelName, KnownBlobIndexerDataToExtract, KnownBlobIndexerImageAction, KnownBlobIndexerParsingMode, KnownBlobIndexerPDFTextRotationAlgorithm, + KnownCharFilterName as KnownCharFilterNames, KnownCustomEntityLookupSkillLanguage, - KnownDocumentIntelligenceLayoutSkillMarkdownHeaderDepth, - KnownDocumentIntelligenceLayoutSkillOutputMode, KnownEntityCategory, KnownEntityRecognitionSkillLanguage, KnownImageAnalysisSkillLanguage, KnownImageDetail, KnownIndexerExecutionEnvironment, - KnownIndexerExecutionStatusDetail, - KnownIndexingMode, KnownIndexProjectionMode, KnownKeyPhraseExtractionSkillLanguage, - KnownLexicalAnalyzerName, - KnownLexicalNormalizerName, - KnownLexicalNormalizerName as KnownNormalizerNames, - KnownMarkdownHeaderDepth, - KnownMarkdownParsingSubmode, + KnownLexicalTokenizerName as KnownTokenizerNames, + KnownLexicalNormalizerName as KnownLexicalNormalizerNames, KnownOcrLineEnding, KnownOcrSkillLanguage, KnownPIIDetectionSkillMaskingMode, + KnownRankingOrder, KnownRegexFlags, KnownSearchFieldDataType, KnownSearchIndexerDataSourceType, KnownSentimentSkillLanguage, - KnownSplitSkillEncoderModelName, KnownSplitSkillLanguage, - KnownSplitSkillUnit, KnownTextSplitMode, KnownTextTranslationSkillLanguage, + KnownTokenFilterName as KnownTokenFilterNames, KnownVectorEncodingFormat, KnownVectorSearchAlgorithmKind, KnownVectorSearchAlgorithmMetric, @@ -146,8 +108,8 @@ export { LengthTokenFilter, LexicalAnalyzer as BaseLexicalAnalyzer, LexicalAnalyzerName, - LexicalNormalizer as BaseLexicalNormalizer, LexicalNormalizerName, + LexicalNormalizer as BaseLexicalNormalizer, LexicalTokenizer as BaseLexicalTokenizer, LexicalTokenizerName, LimitTokenFilter, @@ -155,14 +117,11 @@ export { MagnitudeScoringFunction, MagnitudeScoringParameters, MappingCharFilter, - MarkdownHeaderDepth, - MarkdownParsingSubmode, MergeSkill, MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, MicrosoftStemmingTokenizerLanguage, MicrosoftTokenizerLanguage, - NativeBlobSoftDeleteDeletionDetectionPolicy, NGramTokenizer, OcrLineEnding, OutputFieldMappingEntry, @@ -172,14 +131,14 @@ export { PatternReplaceTokenFilter, PhoneticEncoder, PhoneticTokenFilter, - RescoringOptions, + RankingOrder, ResourceCounter, + RescoringOptions, ScalarQuantizationCompression, ScalarQuantizationParameters, ScoringFunction as BaseScoringFunction, ScoringFunctionAggregation, ScoringFunctionInterpolation, - SearchAlias, SearchIndexerDataContainer, SearchIndexerDataIdentity as BaseSearchIndexerDataIdentity, SearchIndexerDataNoneIdentity, @@ -209,8 +168,6 @@ export { SnowballTokenFilter, SnowballTokenFilterLanguage, SoftDeleteColumnDeletionDetectionPolicy, - SplitSkillEncoderModelName, - SplitSkillUnit, SqlIntegratedChangeTrackingPolicy, StemmerOverrideTokenFilter, StemmerTokenFilter, @@ -245,15 +202,12 @@ export { AutocompleteRequest, BaseSearchRequestOptions, BaseVectorQuery, - BaseVectorThreshold, CountDocumentsOptions, DeleteDocumentsOptions, - DocumentDebugInfo, ExcludedODataTypes, ExtractDocumentKey, ExtractiveQueryAnswer, ExtractiveQueryCaption, - GenerativeQueryRewrites, GetDocumentOptions, IndexDocumentsAction, IndexDocumentsOptions, @@ -263,8 +217,6 @@ export { NarrowedModel, QueryAnswer, QueryCaption, - QueryResultDocumentSemanticField, - QueryRewrites, SearchDocumentsPageResult, SearchDocumentsResult, SearchDocumentsResultBase, @@ -281,10 +233,8 @@ export { SearchRequestOptions, SearchRequestQueryTypeOptions, SearchResult, - SearchScoreThreshold, SelectArray, SelectFields, - SemanticDebugInfo, SemanticErrorMode, SemanticErrorReason, SemanticSearchOptions, @@ -297,15 +247,11 @@ export { UnionToIntersection, UploadDocumentsOptions, VectorFilterMode, - VectorizableImageBinaryQuery, - VectorizableImageUrlQuery, VectorizableTextQuery, VectorizedQuery, VectorQuery, VectorQueryKind, VectorSearchOptions, - VectorSimilarityThreshold, - VectorThreshold, } from "./indexModels.js"; export { odata } from "./odata.js"; export { KnownSearchAudience } from "./searchAudience.js"; @@ -320,18 +266,11 @@ export { SearchIndexingBufferedSender, } from "./searchIndexingBufferedSender.js"; export { - AIServicesAccountIdentity, - AIServicesVisionParameters, - AIServicesVisionVectorizer, - AliasIterator, AnalyzeRequest, AnalyzeTextOptions, - AzureMachineLearningVectorizer, - AzureMachineLearningVectorizerParameters, AzureOpenAIEmbeddingSkill, AzureOpenAIParameters, AzureOpenAIVectorizer, - BaseAzureMachineLearningVectorizerParameters, BaseVectorSearchAlgorithmConfiguration, BaseVectorSearchVectorizer, BlobIndexerDataToExtract, @@ -342,11 +281,9 @@ export { CognitiveServicesAccount, ComplexDataType, ComplexField, - CreateAliasOptions, CreateDataSourceConnectionOptions, CreateIndexerOptions, CreateIndexOptions, - CreateOrUpdateAliasOptions, CreateorUpdateDataSourceConnectionOptions, CreateorUpdateIndexerOptions, CreateOrUpdateIndexOptions, @@ -359,20 +296,17 @@ export { CustomEntityLookupSkillLanguage, DataChangeDetectionPolicy, DataDeletionDetectionPolicy, - DeleteAliasOptions, DeleteDataSourceConnectionOptions, DeleteIndexerOptions, DeleteIndexOptions, DeleteSkillsetOptions, DeleteSynonymMapOptions, - DocumentIntelligenceLayoutSkill, EdgeNGramTokenFilter, EntityCategory, EntityRecognitionSkill, EntityRecognitionSkillLanguage, ExhaustiveKnnAlgorithmConfiguration, ExhaustiveKnnParameters, - GetAliasOptions, GetDataSourceConnectionOptions, GetIndexerOptions, GetIndexerStatusOptions, @@ -391,18 +325,13 @@ export { IndexingParametersConfiguration, IndexIterator, IndexNameIterator, - KeyAuthAzureMachineLearningVectorizerParameters, KeyPhraseExtractionSkill, KeyPhraseExtractionSkillLanguage, KeywordTokenizer, KnownAnalyzerNames, - KnownCharFilterNames, - KnownTokenFilterNames, - KnownTokenizerNames, LexicalAnalyzer, LexicalNormalizer, LexicalTokenizer, - ListAliasesOptions, ListDataSourceConnectionsOptions, ListIndexersOptions, ListIndexesOptions, @@ -410,7 +339,6 @@ export { ListSynonymMapsOptions, LuceneStandardTokenizer, NGramTokenFilter, - NoAuthAzureMachineLearningVectorizerParameters, OcrSkill, OcrSkillLanguage, PatternAnalyzer, @@ -418,18 +346,14 @@ export { PIIDetectionSkill, PIIDetectionSkillMaskingMode, RegexFlags, - ResetDocumentsOptions, ResetIndexerOptions, - ResetSkillsOptions, RunIndexerOptions, ScoringFunction, ScoringProfile, SearchField, SearchFieldDataType, SearchIndex, - SearchIndexAlias, SearchIndexer, - SearchIndexerCache, SearchIndexerDataIdentity, SearchIndexerDataSourceConnection, SearchIndexerDataSourceType, @@ -452,7 +376,6 @@ export { TextSplitMode, TextTranslationSkill, TextTranslationSkillLanguage, - TokenAuthAzureMachineLearningVectorizerParameters, TokenFilter, VectorSearch, VectorSearchAlgorithmConfiguration, @@ -460,7 +383,6 @@ export { VectorSearchAlgorithmMetric, VectorSearchCompression, VectorSearchVectorizer, - VisionVectorizeSkill, VisualFeature, WebApiParameters, WebApiSkill, diff --git a/sdk/search/search-documents/src/indexDocumentsBatch.ts b/sdk/search/search-documents/src/indexDocumentsBatch.ts index f3b44a88ab7e..2cf314c82a33 100644 --- a/sdk/search/search-documents/src/indexDocumentsBatch.ts +++ b/sdk/search/search-documents/src/indexDocumentsBatch.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { IndexDocumentsAction } from "./indexModels.js"; +import { IndexDocumentsAction } from "./indexModels.js"; /** * Class used to perform batch operations @@ -34,7 +34,7 @@ export class IndexDocumentsBatch { /** * Update a set of documents in the index. - * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents + * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents * @param documents - The updated documents. */ public merge(documents: TModel[]): void { @@ -50,7 +50,7 @@ export class IndexDocumentsBatch { /** * Update a set of documents in the index or uploads them if they don't exist. - * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents + * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents * @param documents - The new/updated documents. */ public mergeOrUpload(documents: TModel[]): void { diff --git a/sdk/search/search-documents/src/indexModels.ts b/sdk/search/search-documents/src/indexModels.ts index 587b9c83d87d..87e945b29031 100644 --- a/sdk/search/search-documents/src/indexModels.ts +++ b/sdk/search/search-documents/src/indexModels.ts @@ -1,13 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { OperationOptions } from "@azure/core-client"; -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { +import { OperationOptions } from "@azure/core-client"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AutocompleteMode, - DebugInfo, FacetResult, - HybridSearch, IndexActionType, KnownSemanticErrorMode, KnownSemanticErrorReason, @@ -16,18 +14,11 @@ import type { KnownVectorQueryKind, QueryAnswerResult, QueryCaptionResult, - QueryDebugMode, - QueryLanguage, - QueryResultDocumentRerankerInput, - QuerySpellerType as QuerySpeller, QueryType, ScoringStatistics, SearchMode, - SemanticFieldState, - SemanticQueryRewritesResultType, - VectorsDebugInfo, } from "./generated/data/models/index.js"; -import type GeographyPoint from "./geographyPoint.js"; +import GeographyPoint from "./geographyPoint.js"; /** * Options for performing the count operation on the index. @@ -190,9 +181,7 @@ export type SearchIterator< /** The query parameters for vector and hybrid search queries. */ export type VectorQuery = | VectorizedQuery - | VectorizableTextQuery - | VectorizableImageUrlQuery - | VectorizableImageBinaryQuery; + | VectorizableTextQuery; /** The query parameters for vector and hybrid search queries. */ export interface BaseVectorQuery { @@ -200,8 +189,6 @@ export interface BaseVectorQuery { * ### 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. - * **imageUrl**: Vector query where an url that represents an image value that needs to be vectorized is provided. - * **imageBinary**: Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. */ kind: VectorQueryKind; /** Number of nearest neighbors to return as top hits. */ @@ -223,11 +210,6 @@ export interface BaseVectorQuery { 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; - /** The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. */ - threshold?: VectorThreshold; - /** The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in - * the top level filter parameter is used instead. */ - filterOverride?: string; } /** The query parameters to use for vector search when a raw vector value is provided. */ @@ -244,28 +226,6 @@ export interface VectorizableTextQuery extends BaseVector kind: "text"; /** The text to be vectorized to perform a vector search query. */ text: string; - /** - * Can be configured to let a generative model rewrite the query before sending it to be - * vectorized. - */ - queryRewrites?: QueryRewrites; -} - -/** The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided. */ -export interface VectorizableImageUrlQuery extends BaseVectorQuery { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "imageUrl"; - /** The URL of an image to be vectorized to perform a vector search query. */ - url: string; -} - -/** The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided. */ -export interface VectorizableImageBinaryQuery - extends BaseVectorQuery { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "imageBinary"; - /** The base64 encoded binary of an image to be vectorized to perform a vector search query. */ - binaryImage: string; } /** @@ -343,14 +303,6 @@ export interface BaseSearchRequestOptions< * fielded search expression take precedence over any field names listed in this parameter. */ searchFields?: SearchFieldArray; - /** - * The language of the query. - */ - queryLanguage?: QueryLanguage; - /** - * Improve search recall by spell-correcting individual search query terms. - */ - speller?: QuerySpeller; /** * 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' @@ -392,9 +344,6 @@ export interface BaseSearchRequestOptions< * Defines options for vector search queries */ vectorSearchOptions?: VectorSearchOptions; - - /** The query parameters to configure hybrid search behaviors. */ - hybridSearch?: HybridSearch; } /** @@ -432,6 +381,12 @@ export type SearchResult< * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly rerankerScore?: number; + /** + * The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic' + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rerankerBoostedScore?: number; + /** /** * Text fragments from the document that indicate the matching search terms, organized by each * applicable field; null if hit highlighting was not enabled for the query. @@ -445,12 +400,6 @@ export type SearchResult< readonly captions?: QueryCaptionResult[]; document: NarrowedModel; - - /** - * Contains debugging information that can be used to further explore your search results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly documentDebugInfo?: DocumentDebugInfo; }; /** @@ -483,11 +432,6 @@ export interface SearchDocumentsResultBase { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly answers?: QueryAnswerResult[]; - /** - * Debug information that applies to the search results as a whole. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly debugInfo?: DebugInfo; /** * Reason that a partial response was returned for a semantic search request. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -498,11 +442,6 @@ export interface SearchDocumentsResultBase { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly semanticSearchResultsType?: SemanticSearchResultsType; - /** - * Type of query rewrite that was used to retrieve documents. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly semanticQueryRewritesResultType?: SemanticQueryRewritesResultType; } /** @@ -908,25 +847,6 @@ export interface QueryResultDocumentSemanticField { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; - /** - * The way the field was used for the semantic enrichment process (fully used, partially used, or unused) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: SemanticFieldState; -} - -/** Contains debugging information that can be used to further explore your search results. */ -export interface DocumentDebugInfo { - /** - * Contains debugging information specific to semantic search queries. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly semantic?: SemanticDebugInfo; - /** - * Contains debugging information specific to vector and hybrid search. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vectors?: VectorsDebugInfo; } /** @@ -948,11 +868,6 @@ export interface SemanticDebugInfo { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly keywordFields?: QueryResultDocumentSemanticField[]; - /** - * The raw concatenated strings that were sent to the semantic enrichment process. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rerankerInput?: QueryResultDocumentRerankerInput; } /** @@ -969,10 +884,6 @@ export interface ExtractiveQueryAnswer { * The confidence threshold. Default threshold is 0.7 */ threshold?: number; - /** - * An optional upper bound on the number of characters in each answer. - */ - maxAnswerLength?: number; } /** @@ -986,10 +897,6 @@ export type QueryAnswer = ExtractiveQueryAnswer; export interface ExtractiveQueryCaption { captionType: "extractive"; highlight?: boolean; - /** - * An optional upper bound on the number of characters in each caption. - */ - maxCaptionLength?: number; } /** @@ -1029,36 +936,12 @@ export interface SemanticSearchOptions { * to 'None'. */ captions?: QueryCaption; - /** - * When QueryRewrites is set to `generative`, the query terms are sent to a generate model which will - * produce 10 (default) rewrites to help increase the recall of the request. Defaults to `none`. - */ - queryRewrites?: QueryRewrites; /** * Allows setting a separate search query that will be solely used for semantic reranking, * semantic captions and semantic answers. Is useful for scenarios where there is a need to use * different queries between the base retrieval and ranking phase, and the L2 semantic phase. */ semanticQuery?: string; - /** - * The list of field names used for semantic search. - */ - semanticFields?: string[]; - /** - * Enables a debugging tool that can be used to further explore your search results. - */ - debugMode?: QueryDebugMode; -} - -/** Defines options for query rewrites. */ -export type QueryRewrites = GenerativeQueryRewrites; - -/** Generate alternative query terms to increase the recall of a search request. */ -export interface GenerativeQueryRewrites { - /** Polymorphic discriminator, which specifies the different types this object can be */ - rewritesType: "generative"; - /** The number of query rewrites to generate. Defaults to 10.*/ - count?: number; } /** @@ -1099,6 +982,7 @@ export interface SearchScoreThreshold extends BaseVectorThreshold { /** The threshold used for vector queries. */ export type VectorThreshold = VectorSimilarityThreshold | SearchScoreThreshold; + export type SemanticErrorMode = `${KnownSemanticErrorMode}`; export type SemanticErrorReason = `${KnownSemanticErrorReason}`; export type SemanticSearchResultsType = `${KnownSemanticSearchResultsType}`; diff --git a/sdk/search/search-documents/src/odata.ts b/sdk/search/search-documents/src/odata.ts index 11ef22fd7f9f..a02bd4b88fae 100644 --- a/sdk/search/search-documents/src/odata.ts +++ b/sdk/search/search-documents/src/odata.ts @@ -26,14 +26,12 @@ function escapeQuotesIfString(input: unknown, previous: string): string | unknow /** * Escapes an odata filter expression to avoid errors with quoting string literals. * Example usage: - * ```ts snippet:ReadmeSampleOdataUsage - * import { odata } from "@azure/search-documents"; - * + * ```ts * const baseRateMax = 200; * const ratingMin = 4; * const filter = odata`Rooms/any(room: room/BaseRate lt ${baseRateMax}) and Rating ge ${ratingMin}`; * ``` - * For more information on supported syntax see: https://learn.microsoft.com/azure/search/search-query-odata-filter + * For more information on supported syntax see: https://docs.microsoft.com/en-us/azure/search/search-query-odata-filter * @param strings - Array of strings for the expression * @param values - Array of values for the expression */ diff --git a/sdk/search/search-documents/src/odataMetadataPolicy.ts b/sdk/search/search-documents/src/odataMetadataPolicy.ts index b01ddb7ca951..b2a6fa73e17e 100644 --- a/sdk/search/search-documents/src/odataMetadataPolicy.ts +++ b/sdk/search/search-documents/src/odataMetadataPolicy.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { +import { PipelinePolicy, PipelineRequest, PipelineResponse, diff --git a/sdk/search/search-documents/src/searchApiKeyCredentialPolicy.ts b/sdk/search/search-documents/src/searchApiKeyCredentialPolicy.ts index ce3b4a2b832d..4f6daee5b21e 100644 --- a/sdk/search/search-documents/src/searchApiKeyCredentialPolicy.ts +++ b/sdk/search/search-documents/src/searchApiKeyCredentialPolicy.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { KeyCredential } from "@azure/core-auth"; -import type { +import { KeyCredential } from "@azure/core-auth"; +import { PipelinePolicy, PipelineRequest, PipelineResponse, diff --git a/sdk/search/search-documents/src/searchClient.ts b/sdk/search/search-documents/src/searchClient.ts index 9332c5414097..cc5cd410d3e4 100644 --- a/sdk/search/search-documents/src/searchClient.ts +++ b/sdk/search/search-documents/src/searchClient.ts @@ -3,27 +3,24 @@ /// -import type { KeyCredential, TokenCredential } from "@azure/core-auth"; -import { isTokenCredential } from "@azure/core-auth"; -import type { InternalClientPipelineOptions } from "@azure/core-client"; -import type { ExtendedCommonClientOptions } from "@azure/core-http-compat"; -import type { Pipeline } from "@azure/core-rest-pipeline"; +import { isTokenCredential, KeyCredential, TokenCredential } from "@azure/core-auth"; +import { InternalClientPipelineOptions } from "@azure/core-client"; +import { ExtendedCommonClientOptions } from "@azure/core-http-compat"; import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; import { decode, encode } from "./base64.js"; -import type { +import { AutocompleteRequest, AutocompleteResult, IndexDocumentsResult, QueryAnswerType as BaseAnswers, QueryCaptionType as BaseCaptions, - QueryRewritesType as GeneratedQueryRewrites, SearchRequest as GeneratedSearchRequest, SuggestRequest, VectorQueryUnion as GeneratedVectorQuery, } from "./generated/data/models/index.js"; import { SearchClient as GeneratedClient } from "./generated/data/searchClient.js"; import { IndexDocumentsBatch } from "./indexDocumentsBatch.js"; -import type { +import { AutocompleteOptions, CountDocumentsOptions, DeleteDocumentsOptions, @@ -35,7 +32,6 @@ import type { NarrowedModel, QueryAnswer, QueryCaption, - QueryRewrites, SearchDocumentsPageResult, SearchDocumentsResult, SearchFieldArray, @@ -55,7 +51,7 @@ import { logger } from "./logger.js"; import { createOdataMetadataPolicy } from "./odataMetadataPolicy.js"; import { createSearchApiKeyCredentialPolicy } from "./searchApiKeyCredentialPolicy.js"; import { KnownSearchAudience } from "./searchAudience.js"; -import type { IndexDocumentsClient } from "./searchIndexingBufferedSender.js"; +import { IndexDocumentsClient } from "./searchIndexingBufferedSender.js"; import { deserialize, serialize } from "./serialization.js"; import * as utils from "./serviceUtils.js"; import { createSpan } from "./tracing.js"; @@ -119,41 +115,30 @@ export class SearchClient implements IndexDocumentsClient */ private readonly client: GeneratedClient; - /** - * A reference to the internal HTTP pipeline for use with raw requests - */ - public readonly pipeline: Pipeline; - /** * Creates an instance of SearchClient. * * Example usage: - * ```ts snippet:ReadmeSampleSearchClient - * import { SearchClient, AzureKeyCredential } from "@azure/search-documents"; + * ```ts + * const { SearchClient, AzureKeyCredential } = require("@azure/search-documents"); * - * const searchClient = new SearchClient( + * const client = new SearchClient( * "", * "", - * new AzureKeyCredential(""), + * new AzureKeyCredential("") * ); * ``` * * Optionally, the type of the model can be used to enable strong typing and type hints: - * ```ts snippet:ReadmeSampleSearchClientWithModel - * import { SearchClient, AzureKeyCredential } from "@azure/search-documents"; - * + * ```ts * type TModel = { * keyName: string; * field1?: string | null; - * field2?: { - * anotherField?: string | null; - * } | null; + * field2?: { anotherField?: string | null } | null; * }; * - * const searchClient = new SearchClient( - * "", - * "", - * new AzureKeyCredential(""), + * const client = new SearchClient( + * ... * ); * ``` * @@ -203,7 +188,6 @@ export class SearchClient implements IndexDocumentsClient this.serviceVersion, internalClientPipelineOptions, ); - this.pipeline = this.client.pipeline; if (isTokenCredential(credential)) { const scope: string = options.audience @@ -224,7 +208,6 @@ export class SearchClient implements IndexDocumentsClient * Retrieves the number of documents in the index. * @param options - Options to the count operation. */ - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise { const { span, updatedOptions } = createSpan("SearchClient-getDocumentsCount", options); try { @@ -258,27 +241,31 @@ export class SearchClient implements IndexDocumentsClient * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition. * @param options - Options to the autocomplete operation. * @example - * ```ts snippet:ReadmeSampleAutocomplete - * import { SearchClient, AzureKeyCredential, SearchFieldArray } from "@azure/search-documents"; + * ```ts + * import { + * AzureKeyCredential, + * SearchClient, + * SearchFieldArray, + * } from "@azure/search-documents"; * * type TModel = { * key: string; - * azure?: { - * sdk: string | null; - * } | null; + * azure?: { sdk: string | null } | null; * }; * * const client = new SearchClient( * "endpoint.azure", * "indexName", - * new AzureKeyCredential("key"), + * new AzureKeyCredential("key") * ); * * const searchFields: SearchFieldArray = ["azure/sdk"]; * - * const autocompleteResult = await client.autocomplete("searchText", "suggesterName", { - * searchFields, - * }); + * const autocompleteResult = await client.autocomplete( + * "searchText", + * "suggesterName", + * { searchFields } + * ); * ``` */ public async autocomplete( @@ -330,20 +317,11 @@ export class SearchClient implements IndexDocumentsClient select, vectorSearchOptions, semanticSearchOptions, - hybridSearch, ...restOptions } = options as typeof options & { queryType: "semantic" }; - const { - semanticFields, - configurationName, - errorMode, - answers, - captions, - debugMode, - queryRewrites, - ...restSemanticOptions - } = semanticSearchOptions ?? {}; + const { configurationName, errorMode, answers, captions, ...restSemanticOptions } = + semanticSearchOptions ?? {}; const { queries, filterMode, ...restVectorOptions } = vectorSearchOptions ?? {}; const fullOptions: GeneratedSearchRequest = { @@ -352,7 +330,6 @@ export class SearchClient implements IndexDocumentsClient ...restOptions, ...nextPageParameters, searchFields: this.convertSearchFields(searchFields), - semanticFields: this.convertSemanticFields(semanticFields), select: this.convertSelect(select) || "*", orderBy: this.convertOrderBy(orderBy), includeTotalResultCount: includeTotalCount, @@ -361,10 +338,7 @@ export class SearchClient implements IndexDocumentsClient captions: this.convertQueryCaptions(captions), semanticErrorHandling: errorMode, semanticConfigurationName: configurationName, - debug: debugMode, - queryRewrites: this.convertQueryRewrites(queryRewrites), vectorFilterMode: filterMode, - hybridSearch: hybridSearch, }; const { span, updatedOptions } = createSpan("SearchClient-searchDocuments", options); @@ -482,20 +456,22 @@ export class SearchClient implements IndexDocumentsClient * @param searchText - Text to search * @param options - Options for the search operation. * @example - * ```ts snippet:ReadmeSampleSearchTModel - * import { SearchClient, AzureKeyCredential, SearchFieldArray } from "@azure/search-documents"; + * ```ts + * import { + * AzureKeyCredential, + * SearchClient, + * SearchFieldArray, + * } from "@azure/search-documents"; * * type TModel = { * key: string; - * azure?: { - * sdk: string | null; - * } | null; + * azure?: { sdk: string | null } | null; * }; * * const client = new SearchClient( * "endpoint.azure", * "indexName", - * new AzureKeyCredential("key"), + * new AzureKeyCredential("key") * ); * * const select = ["azure/sdk"] as const; @@ -538,20 +514,22 @@ export class SearchClient implements IndexDocumentsClient * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition. * @param options - Options for the suggest operation * @example - * ```ts snippet:ReadmeSampleSuggest - * import { SearchClient, AzureKeyCredential, SearchFieldArray } from "@azure/search-documents"; + * ```ts + * import { + * AzureKeyCredential, + * SearchClient, + * SearchFieldArray, + * } from "@azure/search-documents"; * * type TModel = { * key: string; - * azure?: { - * sdk: string | null; - * } | null; + * azure?: { sdk: string | null } | null; * }; * * const client = new SearchClient( * "endpoint.azure", * "indexName", - * new AzureKeyCredential("key"), + * new AzureKeyCredential("key") * ); * * const select = ["azure/sdk"] as const; @@ -641,7 +619,7 @@ export class SearchClient implements IndexDocumentsClient * This operation may partially succeed and not all document operations will * be reflected in the index. If you would like to treat this as an exception, * set the `throwOnAnyFailure` option to true. - * For more details about how merging works, see: https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents + * For more details about how merging works, see: https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents * @param batch - An array of actions to perform on the index. * @param options - Additional options. */ @@ -709,7 +687,7 @@ export class SearchClient implements IndexDocumentsClient /** * Update a set of documents in the index. - * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents + * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents * @param documents - The updated documents. * @param options - Additional options. */ @@ -737,7 +715,7 @@ export class SearchClient implements IndexDocumentsClient /** * Update a set of documents in the index or upload them if they don't exist. - * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents + * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents * @param documents - The updated documents. * @param options - Additional options. */ @@ -879,13 +857,6 @@ export class SearchClient implements IndexDocumentsClient return searchFields; } - private convertSemanticFields(semanticFields?: string[]): string | undefined { - if (semanticFields) { - return semanticFields.join(","); - } - return semanticFields; - } - private convertOrderBy(orderBy?: string[]): string | undefined { if (orderBy) { return orderBy.join(","); @@ -899,7 +870,7 @@ export class SearchClient implements IndexDocumentsClient } const config = []; - const { answerType: output, count, threshold, maxAnswerLength } = answers; + const { answerType: output, count, threshold } = answers; if (count) { config.push(`count-${count}`); @@ -909,10 +880,6 @@ export class SearchClient implements IndexDocumentsClient config.push(`threshold-${threshold}`); } - if (maxAnswerLength) { - config.push(`maxcharlength-${maxAnswerLength}`); - } - if (config.length) { return output + `|${config.join(",")}`; } @@ -926,16 +893,12 @@ export class SearchClient implements IndexDocumentsClient } const config = []; - const { captionType: output, highlight, maxCaptionLength } = captions; + const { captionType: output, highlight } = captions; if (highlight !== undefined) { config.push(`highlight-${highlight}`); } - if (maxCaptionLength) { - config.push(`maxcharlength-${maxCaptionLength}`); - } - if (config.length) { return output + `|${config.join(",")}`; } @@ -944,43 +907,6 @@ export class SearchClient implements IndexDocumentsClient } private convertVectorQuery>(vectorQuery: T): GeneratedVectorQuery { - switch (vectorQuery.kind) { - case "text": { - const { fields, queryRewrites, ...restFields } = vectorQuery; - return { - ...restFields, - fields: this.convertVectorQueryFields(fields), - queryRewrites: this.convertQueryRewrites(queryRewrites), - }; - } - case "vector": - case "imageUrl": - case "imageBinary": { - return { ...vectorQuery, fields: this.convertVectorQueryFields(vectorQuery?.fields) }; - } - default: { - logger.warning("Unknown vector query kind; sending without serialization"); - return vectorQuery as any; - } - } - } - - private convertQueryRewrites(queryRewrites?: QueryRewrites): GeneratedQueryRewrites | undefined { - if (!queryRewrites) { - return queryRewrites; - } - - const { rewritesType: baseOutput } = queryRewrites; - switch (baseOutput) { - case "generative": { - const { count } = queryRewrites; - - const config = [...(count === undefined ? [] : [`count-${count}`])]; - if (config.length) return baseOutput + `|${config.join(",")}`; - return baseOutput; - } - default: - return baseOutput; - } + return { ...vectorQuery, fields: this.convertVectorQueryFields(vectorQuery?.fields) }; } } diff --git a/sdk/search/search-documents/src/searchIndexClient.ts b/sdk/search/search-documents/src/searchIndexClient.ts index 872e5dbae1c8..99f5efb4f60f 100644 --- a/sdk/search/search-documents/src/searchIndexClient.ts +++ b/sdk/search/search-documents/src/searchIndexClient.ts @@ -3,44 +3,34 @@ /// -import type { KeyCredential, TokenCredential } from "@azure/core-auth"; -import { isTokenCredential } from "@azure/core-auth"; -import type { InternalClientPipelineOptions } from "@azure/core-client"; -import type { ExtendedCommonClientOptions } from "@azure/core-http-compat"; -import type { Pipeline } from "@azure/core-rest-pipeline"; +import { isTokenCredential, KeyCredential, TokenCredential } from "@azure/core-auth"; +import { InternalClientPipelineOptions } from "@azure/core-client"; +import { ExtendedCommonClientOptions } from "@azure/core-http-compat"; import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; -import type { AnalyzeResult } from "./generated/service/models/index.js"; +import { AnalyzeResult } from "./generated/service/models/index.js"; import { SearchServiceClient as GeneratedClient } from "./generated/service/searchServiceClient.js"; import { logger } from "./logger.js"; import { createOdataMetadataPolicy } from "./odataMetadataPolicy.js"; import { createSearchApiKeyCredentialPolicy } from "./searchApiKeyCredentialPolicy.js"; import { KnownSearchAudience } from "./searchAudience.js"; -import type { SearchClientOptions as GetSearchClientOptions } from "./searchClient.js"; -import { SearchClient } from "./searchClient.js"; -import type { - AliasIterator, +import { SearchClient, SearchClientOptions as GetSearchClientOptions } from "./searchClient.js"; +import { AnalyzeTextOptions, - CreateAliasOptions, CreateIndexOptions, - CreateOrUpdateAliasOptions, CreateOrUpdateIndexOptions, CreateOrUpdateSynonymMapOptions, CreateSynonymMapOptions, - DeleteAliasOptions, DeleteIndexOptions, DeleteSynonymMapOptions, - GetAliasOptions, GetIndexOptions, GetIndexStatisticsOptions, GetServiceStatisticsOptions, GetSynonymMapsOptions, IndexIterator, IndexNameIterator, - ListAliasesOptions, ListIndexesOptions, ListSynonymMapsOptions, SearchIndex, - SearchIndexAlias, SearchIndexStatistics, SearchServiceStatistics, SynonymMap, @@ -99,11 +89,6 @@ export class SearchIndexClient { */ private readonly client: GeneratedClient; - /** - * A reference to the internal HTTP pipeline for use with raw requests - */ - public readonly pipeline: Pipeline; - /** * Used to authenticate requests to the service. */ @@ -118,10 +103,13 @@ export class SearchIndexClient { * Creates an instance of SearchIndexClient. * * Example usage: - * ```ts snippet:ReadmeSampleSearchIndexClient - * import { SearchIndexClient, AzureKeyCredential } from "@azure/search-documents"; + * ```ts + * const { SearchIndexClient, AzureKeyCredential } = require("@azure/search-documents"); * - * const indexClient = new SearchIndexClient("", new AzureKeyCredential("")); + * const client = new SearchIndexClient( + * "", + * new AzureKeyCredential(""); + * ); * ``` * @param endpoint - The endpoint of the search service * @param credential - Used to authenticate requests to the service. @@ -162,7 +150,6 @@ export class SearchIndexClient { this.serviceVersion, internalClientPipelineOptions, ); - this.pipeline = this.client.pipeline; if (isTokenCredential(credential)) { const scope: string = this.options.audience @@ -226,52 +213,6 @@ export class SearchIndexClient { }; } - private async *listAliasesPage( - options: ListAliasesOptions = {}, - ): AsyncIterableIterator { - const { span, updatedOptions } = createSpan("SearchIndexClient-listAliases", options); - try { - const result = await this.client.aliases.list(updatedOptions); - yield result.aliases; - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - - private async *listAliasesAll( - options: ListAliasesOptions = {}, - ): AsyncIterableIterator { - for await (const page of this.listAliasesPage(options)) { - yield* page; - } - } - - /** - * Lists all aliases available for a search service. - * @param options - The options parameters. - */ - public listAliases(options: ListAliasesOptions = {}): AliasIterator { - const iter = this.listAliasesAll(options); - - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listAliasesPage(options); - }, - }; - } - private async *listIndexesNamesPage( options: ListIndexesOptions = {}, ): AsyncIterableIterator { @@ -306,7 +247,6 @@ export class SearchIndexClient { * Retrieves a list of names of existing indexes in the service. * @param options - Options to the list index operation. */ - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options public listIndexesNames(options: ListIndexesOptions = {}): IndexNameIterator { const iter = this.listIndexesNamesAll(options); @@ -347,7 +287,6 @@ export class SearchIndexClient { * Retrieves a list of names of existing SynonymMaps in the service. * @param options - Options to the list SynonymMaps operation. */ - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options public async listSynonymMapsNames(options: ListSynonymMapsOptions = {}): Promise> { const { span, updatedOptions } = createSpan("SearchIndexClient-listSynonymMapsNames", options); try { @@ -395,7 +334,6 @@ export class SearchIndexClient { */ public async getSynonymMap( synonymMapName: string, - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options: GetSynonymMapsOptions = {}, ): Promise { const { span, updatedOptions } = createSpan("SearchIndexClient-getSynonymMaps", options); @@ -600,114 +538,6 @@ export class SearchIndexClient { } } - /** - * Creates a new search alias or updates an alias if it already exists. - * @param alias - The definition of the alias to create or update. - * @param options - The options parameters. - */ - public async createOrUpdateAlias( - alias: SearchIndexAlias, - options: CreateOrUpdateAliasOptions = {}, - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexClient-createOrUpdateAlias", options); - try { - const etag = options.onlyIfUnchanged ? alias.etag : undefined; - - const result = await this.client.aliases.createOrUpdate(alias.name, alias, { - ...updatedOptions, - ifMatch: etag, - }); - return result; - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - - /** - * Creates a new search alias. - * @param alias - The definition of the alias to create. - * @param options - The options parameters. - */ - public async createAlias( - alias: SearchIndexAlias, - options: CreateAliasOptions = {}, - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexClient-createAlias", options); - try { - const result = await this.client.aliases.create(alias, updatedOptions); - return result; - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - - /** - * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no - * recovery option. The mapped index is untouched by this operation. - * @param alias - Alias/Name name of the alias to delete. - * @param options - The options parameters. - */ - public async deleteAlias( - alias: string | SearchIndexAlias, - options: DeleteAliasOptions = {}, - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexClient-deleteAlias", options); - try { - const aliasName: string = typeof alias === "string" ? alias : alias.name; - const etag = - typeof alias === "string" ? undefined : options.onlyIfUnchanged ? alias.etag : undefined; - - await this.client.aliases.delete(aliasName, { - ...updatedOptions, - ifMatch: etag, - }); - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - - /** - * Retrieves an alias definition. - * @param aliasName - The name of the alias to retrieve. - * @param options - The options parameters. - */ - public async getAlias( - aliasName: string, - options: GetAliasOptions = {}, - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexClient-getAlias", options); - try { - const result = await this.client.aliases.get(aliasName, updatedOptions); - return result; - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - /** * Retrieves statistics about an index, such as the count of documents and the size * of index storage. diff --git a/sdk/search/search-documents/src/searchIndexerClient.ts b/sdk/search/search-documents/src/searchIndexerClient.ts index 319d4eb29f6e..3ee6d917e7a8 100644 --- a/sdk/search/search-documents/src/searchIndexerClient.ts +++ b/sdk/search/search-documents/src/searchIndexerClient.ts @@ -1,19 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { KeyCredential, TokenCredential } from "@azure/core-auth"; -import { isTokenCredential } from "@azure/core-auth"; -import type { InternalClientPipelineOptions } from "@azure/core-client"; -import type { ExtendedCommonClientOptions } from "@azure/core-http-compat"; -import type { Pipeline } from "@azure/core-rest-pipeline"; +import { isTokenCredential, KeyCredential, TokenCredential } from "@azure/core-auth"; +import { InternalClientPipelineOptions } from "@azure/core-client"; +import { ExtendedCommonClientOptions } from "@azure/core-http-compat"; import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline"; -import type { SearchIndexerStatus } from "./generated/service/models/index.js"; +import { SearchIndexerStatus } from "./generated/service/models/index.js"; import { SearchServiceClient as GeneratedClient } from "./generated/service/searchServiceClient.js"; import { logger } from "./logger.js"; import { createOdataMetadataPolicy } from "./odataMetadataPolicy.js"; import { createSearchApiKeyCredentialPolicy } from "./searchApiKeyCredentialPolicy.js"; import { KnownSearchAudience } from "./searchAudience.js"; -import type { +import { CreateDataSourceConnectionOptions, CreateIndexerOptions, CreateorUpdateDataSourceConnectionOptions, @@ -30,9 +28,7 @@ import type { ListDataSourceConnectionsOptions, ListIndexersOptions, ListSkillsetsOptions, - ResetDocumentsOptions, ResetIndexerOptions, - ResetSkillsOptions, RunIndexerOptions, SearchIndexer, SearchIndexerDataSourceConnection, @@ -92,19 +88,17 @@ export class SearchIndexerClient { */ private readonly client: GeneratedClient; - /** - * A reference to the internal HTTP pipeline for use with raw requests - */ - public readonly pipeline: Pipeline; - /** * Creates an instance of SearchIndexerClient. * * Example usage: - * ```ts snippet:ReadmeSampleSearchIndexerClient - * import { SearchIndexerClient, AzureKeyCredential } from "@azure/search-documents"; + * ```ts + * const { SearchIndexerClient, AzureKeyCredential } = require("@azure/search-documents"); * - * const indexerClient = new SearchIndexerClient("", new AzureKeyCredential("")); + * const client = new SearchIndexerClient( + * "", + * new AzureKeyCredential(""); + * ); * ``` * @param endpoint - The endpoint of the search service * @param credential - Used to authenticate requests to the service. @@ -143,7 +137,6 @@ export class SearchIndexerClient { this.serviceVersion, internalClientPipelineOptions, ); - this.pipeline = this.client.pipeline; if (isTokenCredential(credential)) { const scope: string = options.audience @@ -184,7 +177,6 @@ export class SearchIndexerClient { * Retrieves a list of names of existing indexers in the service. * @param options - Options to the list indexers operation. */ - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options public async listIndexersNames(options: ListIndexersOptions = {}): Promise> { const { span, updatedOptions } = createSpan("SearchIndexerClient-listIndexersNames", options); try { @@ -234,7 +226,6 @@ export class SearchIndexerClient { * @param options - Options to the list indexers operation. */ public async listDataSourceConnectionsNames( - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options options: ListDataSourceConnectionsOptions = {}, ): Promise> { const { span, updatedOptions } = createSpan( @@ -284,7 +275,6 @@ export class SearchIndexerClient { * Retrieves a list of names of existing Skillsets in the service. * @param options - Options to the list Skillsets operation. */ - // eslint-disable-next-line @azure/azure-sdk/ts-naming-options public async listSkillsetsNames(options: ListSkillsetsOptions = {}): Promise> { const { span, updatedOptions } = createSpan("SearchIndexerClient-listSkillsetsNames", options); try { @@ -743,58 +733,4 @@ export class SearchIndexerClient { span.end(); } } - - /** - * Resets specific documents in the datasource to be selectively re-ingested by the indexer. - * @param indexerName - The name of the indexer to reset documents for. - * @param options - Additional optional arguments. - */ - public async resetDocuments( - indexerName: string, - options: ResetDocumentsOptions = {}, - ): Promise { - const { span, updatedOptions } = createSpan("SearchIndexerClient-resetDocs", options); - try { - await this.client.indexers.resetDocs(indexerName, { - ...updatedOptions, - keysOrIds: { - documentKeys: updatedOptions.documentKeys, - datasourceDocumentIds: updatedOptions.datasourceDocumentIds, - }, - }); - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } - - /** - * Reset an existing skillset in a search service. - * @param skillsetName - The name of the skillset to reset. - * @param skillNames - The names of skills to reset. - * @param options - The options parameters. - */ - public async resetSkills(skillsetName: string, options: ResetSkillsOptions = {}): Promise { - const { span, updatedOptions } = createSpan("SearchIndexerClient-resetSkills", options); - try { - await this.client.skillsets.resetSkills( - skillsetName, - { skillNames: options.skillNames }, - updatedOptions, - ); - } catch (e: any) { - span.setStatus({ - status: "error", - error: e.message, - }); - throw e; - } finally { - span.end(); - } - } } diff --git a/sdk/search/search-documents/src/searchIndexingBufferedSender.ts b/sdk/search/search-documents/src/searchIndexingBufferedSender.ts index 8f163e76c7c1..31c7e9565ef1 100644 --- a/sdk/search/search-documents/src/searchIndexingBufferedSender.ts +++ b/sdk/search/search-documents/src/searchIndexingBufferedSender.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { OperationOptions } from "@azure/core-client"; -import type { RestError } from "@azure/core-rest-pipeline"; +import { OperationOptions } from "@azure/core-client"; +import { RestError } from "@azure/core-rest-pipeline"; import { delay } from "@azure/core-util"; -import EventEmitter from "node:events"; -import type { IndexDocumentsResult } from "./generated/data/models/index.js"; +import EventEmitter from "events"; +import { IndexDocumentsResult } from "./generated/data/models/index.js"; import { IndexDocumentsBatch } from "./indexDocumentsBatch.js"; -import type { +import { IndexDocumentsAction, IndexDocumentsOptions, SearchIndexingBufferedSenderDeleteDocumentsOptions, diff --git a/sdk/search/search-documents/src/serviceModels.ts b/sdk/search/search-documents/src/serviceModels.ts index bc9f052564ad..2917a7de8e93 100644 --- a/sdk/search/search-documents/src/serviceModels.ts +++ b/sdk/search/search-documents/src/serviceModels.ts @@ -1,22 +1,17 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { OperationOptions } from "@azure/core-client"; -import type { PagedAsyncIterableIterator } from "@azure/core-paging"; -import type { - AIServicesAccountKey, - AIStudioModelCatalogName, +import { OperationOptions } from "@azure/core-client"; +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { AsciiFoldingTokenFilter, - AzureMachineLearningSkill, AzureOpenAIModelName, - AzureOpenAITokenizerParameters, BinaryQuantizationCompression, BM25Similarity, CharFilterName, CjkBigramTokenFilter, ClassicSimilarity, ClassicTokenizer, - CognitiveServicesAccount as BaseCognitiveServicesAccount, CognitiveServicesAccountKey, CommonGramTokenFilter, ConditionalSkill, @@ -27,8 +22,6 @@ import type { DictionaryDecompounderTokenFilter, DistanceScoringFunction, DocumentExtractionSkill, - DocumentIntelligenceLayoutSkillMarkdownHeaderDepth, - DocumentIntelligenceLayoutSkillOutputMode, EdgeNGramTokenFilterSide, EdgeNGramTokenizer, ElisionTokenFilter, @@ -72,19 +65,16 @@ import type { LengthTokenFilter, LexicalAnalyzerName, LexicalNormalizerName, + LexicalNormalizer as BaseLexicalNormalizer, LexicalTokenizerName, LimitTokenFilter, LuceneStandardAnalyzer, MagnitudeScoringFunction, MappingCharFilter, - MarkdownHeaderDepth, - MarkdownParsingSubmode, MergeSkill, MicrosoftLanguageStemmingTokenizer, MicrosoftLanguageTokenizer, - NativeBlobSoftDeleteDeletionDetectionPolicy, NGramTokenizer, - OcrLineEnding, PathHierarchyTokenizerV2 as PathHierarchyTokenizer, PatternCaptureTokenFilter, PatternReplaceCharFilter, @@ -92,7 +82,6 @@ import type { PhoneticTokenFilter, ScalarQuantizationCompression, ScoringFunctionAggregation, - SearchAlias, SearchIndexerDataContainer, SearchIndexerDataNoneIdentity, SearchIndexerDataUserAssignedIdentity, @@ -107,7 +96,6 @@ import type { ShingleTokenFilter, SnowballTokenFilter, SoftDeleteColumnDeletionDetectionPolicy, - SplitSkillUnit, SqlIntegratedChangeTrackingPolicy, StemmerOverrideTokenFilter, StemmerTokenFilter, @@ -284,11 +272,6 @@ export type GetAliasOptions = OperationOptions; */ export type ListAliasesOptions = OperationOptions; -/** - * Search Alias object. - */ -export type SearchIndexAlias = SearchAlias; - /** * Options for create synonymmap operation. */ @@ -349,14 +332,6 @@ export interface CreateOrUpdateSkillsetOptions extends OperationOptions { * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; - /** - * Ignores cache reset requirements. - */ - skipIndexerResetRequirementForCache?: boolean; - /** - * Disables cache reprocessing change detection. - */ - disableCacheReprocessingChangeDetection?: boolean; } /** @@ -377,10 +352,6 @@ export interface CreateorUpdateIndexerOptions extends OperationOptions { * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; - /** Ignores cache reset requirements. */ - skipIndexerResetRequirementForCache?: boolean; - /** Disables cache reprocessing change detection. */ - disableCacheReprocessingChangeDetection?: boolean; } /** @@ -391,10 +362,6 @@ export interface CreateorUpdateDataSourceConnectionOptions extends OperationOpti * If set to true, Resource will be updated only if the etag matches. */ onlyIfUnchanged?: boolean; - /** - * Ignores cache reset requirements. - */ - skipIndexerResetRequirementForCache?: boolean; } /** @@ -469,11 +436,6 @@ export interface AnalyzeRequest { * NOTE: Either analyzerName or tokenizerName is required in an AnalyzeRequest. */ tokenizerName?: LexicalTokenizerName; - /** - * The name of the normalizer to use to normalize the given text. {@link KnownNormalizerNames} is - * an enum containing built-in analyzer names. - */ - normalizerName?: LexicalNormalizerName; /** * An optional list of token filters to use when breaking the given text. This parameter can only * be set when using the tokenizer parameter. @@ -627,24 +589,14 @@ export interface WebApiSkill extends BaseSearchIndexerSkill { authIdentity?: SearchIndexerDataIdentity; } -/** Allows you to generate a vector embedding for a given image or text input using the Azure AI Services Vision Vectorize API. */ -export interface VisionVectorizeSkill extends BaseSearchIndexerSkill { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Skills.Vision.VectorizeSkill"; - /** The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. */ - modelVersion?: string; -} - /** * Contains the possible cases for Skill. */ export type SearchIndexerSkill = - | AzureMachineLearningSkill | AzureOpenAIEmbeddingSkill | ConditionalSkill | CustomEntityLookupSkill | DocumentExtractionSkill - | DocumentIntelligenceLayoutSkill | EntityLinkingSkill | EntityRecognitionSkill | EntityRecognitionSkillV3 @@ -659,37 +611,14 @@ export type SearchIndexerSkill = | ShaperSkill | SplitSkill | TextTranslationSkill - | VisionVectorizeSkill | WebApiSkill; -/** A skill that extracts content and layout information (as markdown), via Azure AI Services, from files within the enrichment pipeline. */ -export interface DocumentIntelligenceLayoutSkill extends BaseSearchIndexerSkill { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; - /** Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. */ - outputMode?: DocumentIntelligenceLayoutSkillOutputMode; - /** The depth of headers in the markdown output. Default is h6. */ - markdownHeaderDepth?: DocumentIntelligenceLayoutSkillMarkdownHeaderDepth; -} - /** * Contains the possible cases for CognitiveServicesAccount. */ export type CognitiveServicesAccount = | DefaultCognitiveServicesAccount - | CognitiveServicesAccountKey - | AIServicesAccountKey - | AIServicesAccountIdentity; - -/** The multi-region account of an Azure AI service resource that's attached to a skillset. */ -export interface AIServicesAccountIdentity extends BaseCognitiveServicesAccount { - /** Polymorphic discriminator, which specifies the different types this object can be */ - odatatype: "#Microsoft.Azure.Search.AIServicesByIdentity"; - /** The user-assigned managed identity used for connections to AI Service. If not specified, the system-assigned managed identity is used. On updates to the skillset, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - identity?: SearchIndexerDataIdentity; - /** The subdomain url for the corresponding AI Service. */ - subdomainUrl: string; -} + | CognitiveServicesAccountKey; /** * Tokenizer that uses regex pattern matching to construct distinct tokens. This tokenizer is * implemented using Apache Lucene. @@ -871,6 +800,11 @@ export interface NGramTokenFilter { maxGram?: number; } +/** + * Contains the possible cases for LexicalNormalizer. + */ +export type LexicalNormalizer = CustomNormalizer | BaseLexicalNormalizer; + /** * Contains the possible cases for TokenFilter. */ @@ -904,11 +838,6 @@ export type TokenFilter = */ export type CharFilter = MappingCharFilter | PatternReplaceCharFilter; -/** - * Contains the possible cases for LexicalNormalizer. - */ -export type LexicalNormalizer = CustomNormalizer; - /** * Contains the possible cases for ScoringFunction. */ @@ -966,10 +895,9 @@ export interface SimpleField { * returned in a search result. You can disable this option if you don't plan to return the field * contents in a search response to save on storage overhead. This can only be set during index * creation and only for vector fields. This property cannot be changed for existing fields or set - * as false for new fields. If this property is set to `false`, the property `hidden` must be set to - * `true`. This property must be true or unset for key fields, for new fields, and for non-vector - * fields, and it must be null for complex fields. Disabling this property will reduce index - * storage requirements. The default is true for vector fields. + * as false for new fields. If this property is set as false, the property 'hidden' must be set to + * 'true'. This property must be false or unset for key fields, for new fields, and for non-vector + * fields. Disabling this property will reduce index storage requirements. */ stored?: boolean; /** @@ -977,50 +905,50 @@ export interface SimpleField { * analysis such as word-breaking during indexing. If you set a searchable field to a value like * "sunny day", internally it will be split into the individual tokens "sunny" and "day". This * enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) - * are searchable by default. This property must be false for simple - * fields of other non-string data types. - * Note: searchable fields consume extra space in your index to accommodate additional tokenized versions of the field value for full-text + * are searchable by default. This property must be false for simple fields of other non-string + * data types. Note: searchable fields consume extra space + * in your index to accommodate additional tokenized versions of the field value for full-text * searches. If you want to save space in your index and you don't need a field to be included in * searches, set searchable to false. Default is false. */ searchable?: boolean; /** - * A value indicating whether to enable the field to be referenced in $filter queries. `filterable` - * differs from `searchable` in how strings are handled. Fields of type Edm.String or - * Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are - * for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq - * 'sunny' will find no matches, but $filter=f eq 'sunny day' will. - * Default is false. + * A value indicating whether to enable the field to be referenced in $filter queries. filterable + * differs from searchable in how strings are handled. Fields of type Edm.String or + * Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for + * exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' + * will find no matches, but $filter=f eq 'sunny day' will. Default is false. */ filterable?: boolean; /** * A value indicating whether to enable the field to be referenced in $orderby expressions. By - * default, the service sorts results by score, but in many experiences users will want - * to sort by fields in the documents. A simple field can be sortable only if it is single-valued - * (it has a single value in the scope of the parent document). Simple collection fields cannot - * be sortable, since they are multi-valued. Simple sub-fields of complex collections are also + * default, the search engine sorts results by score, but in many experiences users will want to + * sort by fields in the documents. A simple field can be sortable only if it is single-valued (it + * has a single value in the scope of the parent document). Simple collection fields cannot be + * sortable, since they are multi-valued. Simple sub-fields of complex collections are also * multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent * field, or an ancestor field, that's the complex collection. The default is false. + * */ sortable?: boolean; /** * A value indicating whether to enable the field to be referenced in facet queries. Typically * used in a presentation of search results that includes hit count by category (for example, - * search for digital cameras and see hits by brand, by megapixels, by price, and so on). - * Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. - * Default is false for all other simple fields. + * search for digital cameras and see hits by brand, by megapixels, by price, and so on). Fields + * of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is + * false. */ facetable?: boolean; /** - * The name of the analyzer to use for the field. This option can be used only with - * searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. - * Once the analyzer is chosen, it cannot be changed for the field. + * The name of the analyzer to use for the field. This option can be used only with searchable + * fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the + * analyzer is chosen, it cannot be changed for the field. */ analyzerName?: LexicalAnalyzerName; /** * The name of the analyzer used at search time for the field. This option can be used only with - * searchable fields. It must be set together with `indexAnalyzerName` and it cannot be set together - * with the `analyzerName` option. This property cannot be set to the name of a language + * searchable fields. It must be set together with `indexAnalyzerName` and it cannot be set + * together with the `analyzerName` option. This property cannot be set to the name of a language * analyzer; use the `analyzerName` property instead if you need a language analyzer. This * analyzer can be updated on an existing field. */ @@ -1028,22 +956,18 @@ export interface SimpleField { /** * The name of the analyzer used at indexing time for the field. This option can be used only * with searchable fields. It must be set together with searchAnalyzer and it cannot be set - * together with the `analyzerName` option. Once the analyzer is chosen, it cannot be changed for the - * field. KnownAnalyzerNames is an enum containing known values. + * together with the analyzer option. This property cannot be set to the name of a language + * analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer + * is chosen, it cannot be changed for the field. */ indexAnalyzerName?: LexicalAnalyzerName; /** * A list of the names of synonym maps to associate with this field. This option can be used only * with searchable fields. Currently only one synonym map per field is supported. Assigning a - * synonym map to a field ensures that query terms targeting that field are expanded at - * query-time using the rules in the synonym map. This attribute can be changed on existing - * fields. + * synonym map to a field ensures that query terms targeting that field are expanded at query-time + * using the rules in the synonym map. This attribute can be changed on existing fields. */ synonymMapNames?: string[]; - /** - * The name of the normalizer used at indexing time for the field. - */ - normalizerName?: LexicalNormalizerName; /** * The dimensionality of the vector field. */ @@ -1057,6 +981,11 @@ export interface SimpleField { * The encoding format to interpret the field contents. */ vectorEncodingFormat?: VectorEncodingFormat; + /** + * The name of the normalizer to use for the field. This option can be used only with fields with + * filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed + * for the field. Must be null for complex fields. */ + normalizerName?: LexicalNormalizerName; } export function isComplexField(field: SearchField): field is ComplexField { @@ -1120,13 +1049,6 @@ export interface SynonymMap { */ export type IndexIterator = PagedAsyncIterableIterator; -/** - * An iterator for listing the aliases that exist in the Search service. This will make requests - * as needed during iteration. Use .byPage() to make one request to the server - * per iteration. - */ -export type AliasIterator = PagedAsyncIterableIterator; - /** * An iterator for listing the indexes that exist in the Search service. Will make requests * as needed during iteration. Use .byPage() to make one request to the server @@ -1143,6 +1065,8 @@ export interface SearchIndex { * The name of the index. */ name: string; + /** The description of the index. */ + description?: string; /** * The fields of the index. */ @@ -1173,6 +1097,10 @@ export interface SearchIndex { * The tokenizers for the index. */ tokenizers?: LexicalTokenizer[]; + /** + * The normalizers for the index. + */ + normalizers?: LexicalNormalizer[]; /** * The token filters for the index. */ @@ -1181,10 +1109,6 @@ export interface SearchIndex { * The character filters for the index. */ charFilters?: CharFilter[]; - /** - * The normalizers for the index. - */ - normalizers?: LexicalNormalizer[]; /** * A description of an encryption key that you create in Azure Key Vault. This key is used to * provide an additional level of encryption-at-rest for your data when you want full assurance @@ -1295,11 +1219,6 @@ export interface SearchIndexer { * paid services created on or after January 1, 2019. */ encryptionKey?: SearchResourceEncryptionKey; - /** - * Adds caching to an enrichment pipeline to allow for incremental modification steps without - * having to rebuild the index every time. - */ - cache?: SearchIndexerCache; } /** @@ -1443,10 +1362,12 @@ export enum KnownTokenizerNames { /** * Divides text using language-specific rules. */ + // eslint-disable-next-line @typescript-eslint/no-shadow MicrosoftLanguageTokenizer = "microsoft_language_tokenizer", /** * Divides text using language-specific rules and reduces words to their base forms. */ + // eslint-disable-next-line @typescript-eslint/no-shadow MicrosoftLanguageStemmingTokenizer = "microsoft_language_stemming_tokenizer", /** * Tokenizes the input into n-grams of the given size(s). See @@ -1630,7 +1551,7 @@ export enum KnownTokenFilterNames { SoraniNormalization = "sorani_normalization", /** * Language specific stemming filter. See - * https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters + * https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters */ Stemmer = "stemmer", /** @@ -1678,7 +1599,7 @@ export enum KnownCharFilterNames { /** * Defines values for AnalyzerName. - * See https://learn.microsoft.com/rest/api/searchservice/Language-support + * See https://docs.microsoft.com/rest/api/searchservice/Language-support * @readonly */ export enum KnownAnalyzerNames { @@ -2072,9 +1993,7 @@ export type SearchIndexerDataIdentity = /** * Contains the possible cases for DataDeletionDetectionPolicy. */ -export type DataDeletionDetectionPolicy = - | SoftDeleteColumnDeletionDetectionPolicy - | NativeBlobSoftDeleteDeletionDetectionPolicy; +export type DataDeletionDetectionPolicy = SoftDeleteColumnDeletionDetectionPolicy; /** * Represents a datasource definition, which can be used to configure an indexer. @@ -2137,14 +2056,11 @@ export interface SearchIndexerDataSourceConnection { export interface VectorSearch { /** Defines combinations of configurations to use with vector search. */ profiles?: VectorSearchProfile[]; - /** Contains configuration options specific to the algorithm used during indexing and/or querying. */ + /** Contains configuration options specific to the algorithm used during indexing or querying. */ algorithms?: VectorSearchAlgorithmConfiguration[]; /** Contains configuration options on how to vectorize text vector queries. */ vectorizers?: VectorSearchVectorizer[]; - /** - * Contains configuration options specific to the compression method used during indexing or - * querying. - */ + /** Contains configuration options specific to the compression method used during indexing or querying. */ compressions?: VectorSearchCompression[]; } @@ -2277,98 +2193,15 @@ export interface WebApiParameters { } /** Contains configuration options on how to vectorize text vector queries. */ -export type VectorSearchVectorizer = - | AIServicesVisionVectorizer - | AzureMachineLearningVectorizer - | AzureOpenAIVectorizer - | WebApiVectorizer; - -/** Specifies the AI Services Vision parameters for vectorizing a query image or text. */ -export interface AIServicesVisionVectorizer extends BaseVectorSearchVectorizer { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "aiServicesVision"; - /** Contains the parameters specific to AI Services Vision embedding vectorization. */ - parameters?: AIServicesVisionParameters; -} - -/** Specifies the AI Services Vision parameters for vectorizing a query image or text. */ -export interface AIServicesVisionParameters { - /** The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. */ - modelVersion?: string; - /** The resource URI of the AI Services resource. */ - resourceUri: string; - /** API key of the designated AI Services resource. */ - apiKey?: string; - /** The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the index, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. */ - authIdentity?: SearchIndexerDataIdentity; -} - -/** Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog for generating the vector embedding of a query string. */ -export interface AzureMachineLearningVectorizer extends BaseVectorSearchVectorizer { - /** Polymorphic discriminator, which specifies the different types this object can be */ - kind: "aml"; - /** Specifies the properties of the AML vectorizer. */ - amlParameters?: AzureMachineLearningVectorizerParameters; -} +export type VectorSearchVectorizer = AzureOpenAIVectorizer | WebApiVectorizer; -/** Specifies the properties for connecting to an AML vectorizer. */ -export type AzureMachineLearningVectorizerParameters = - | NoAuthAzureMachineLearningVectorizerParameters - | KeyAuthAzureMachineLearningVectorizerParameters - | TokenAuthAzureMachineLearningVectorizerParameters; - -/** Specifies the properties common between all AML vectorizer auth types. */ -export interface BaseAzureMachineLearningVectorizerParameters { - /** When specified, indicates the timeout for the http client making the API call. */ - timeout?: string; - /** The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. */ - modelName?: AIStudioModelCatalogName; -} - -/** - * Specifies the properties for connecting to an AML vectorizer with no authentication. - */ -export interface NoAuthAzureMachineLearningVectorizerParameters - extends BaseAzureMachineLearningVectorizerParameters { - /** Indicates how the service should attempt to identify itself to the AML instance */ - authKind: "none"; - /** The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. */ - scoringUri: string; -} - -/** - * Specifies the properties for connecting to an AML vectorizer with an authentication key. - */ -export interface KeyAuthAzureMachineLearningVectorizerParameters - extends BaseAzureMachineLearningVectorizerParameters { - /** Indicates how the service should attempt to identify itself to the AML instance */ - authKind: "key"; - /** The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. */ - scoringUri: string; - /** The key for the AML service. */ - authenticationKey: string; -} - -/** - * Specifies the properties for connecting to an AML vectorizer with a managed identity. - */ -export interface TokenAuthAzureMachineLearningVectorizerParameters - extends BaseAzureMachineLearningVectorizerParameters { - /** Indicates how the service should attempt to identify itself to the AML instance */ - authKind: "token"; - /** The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/\{guid\}/resourceGroups/\{resource-group-name\}/Microsoft.MachineLearningServices/workspaces/\{workspace-name\}/services/\{service_name\}. */ - resourceId: string; - /** The region the AML service is deployed in. */ - region?: string; -} - -/** Specifies the parameters for connecting to the Azure OpenAI resource. */ +/** Contains the parameters specific to using an Azure Open AI service for vectorization at query time. */ export interface AzureOpenAIParameters { - /** The resource URI of the Azure OpenAI resource. */ + /** The resource uri for your Azure Open AI resource. */ resourceUrl?: string; - /** ID of the Azure OpenAI model deployment on the designated resource. */ + /** ID of your Azure Open AI model deployment on the designated resource. */ deploymentId?: string; - /** API key of the designated Azure OpenAI resource. */ + /** API key for the designated Azure Open AI resource. */ apiKey?: string; /** The user-assigned managed identity used for outbound connections. */ authIdentity?: SearchIndexerDataIdentity; @@ -2406,7 +2239,7 @@ export interface IndexingParametersConfiguration { failOnUnsupportedContentType?: boolean; /** For Azure blobs, set to false if you want to continue indexing if a document fails indexing. */ failOnUnprocessableDocument?: boolean; - /** For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://learn.microsoft.com/azure/search/search-limits-quotas-capacity. */ + /** For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. */ indexStorageMetadataOnlyForOversizedDocuments?: boolean; /** For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. */ delimitedTextHeaders?: string; @@ -2414,10 +2247,6 @@ export interface IndexingParametersConfiguration { delimitedTextDelimiter?: string; /** For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. */ firstLineContainsHeaders?: boolean; - /** Specifies the submode that will determine whether a markdown file will be parsed into exactly one search document or multiple search documents. Default is `oneToMany`. */ - markdownParsingSubmode?: MarkdownParsingSubmode; - /** Specifies the max header depth that will be considered while grouping markdown content. Default is `h6`. */ - markdownHeaderDepth?: MarkdownHeaderDepth; /** For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property. */ documentRoot?: string; /** Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. */ @@ -2510,12 +2339,10 @@ export interface KeyPhraseExtractionSkill extends BaseSearchIndexerSkill { export interface OcrSkill extends BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Vision.OcrSkill"; - /** A value indicating which language code to use. Default is `en`. */ + /** A value indicating which language code to use. Default is en. */ defaultLanguageCode?: OcrSkillLanguage; /** A value indicating to turn orientation detection on or not. Default is false. */ shouldDetectOrientation?: boolean; - /** Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". */ - lineEnding?: OcrLineEnding; } /** Using the Text Analytics API, extracts personal information from an input text and gives you the option of masking it. */ @@ -2554,20 +2381,12 @@ export interface SentimentSkill extends BaseSearchIndexerSkill { export interface SplitSkill extends BaseSearchIndexerSkill { /** Polymorphic discriminator, which specifies the different types this object can be */ odatatype: "#Microsoft.Skills.Text.SplitSkill"; - /** A value indicating which language code to use. Default is `en`. */ + /** A value indicating which language code to use. Default is en. */ defaultLanguageCode?: SplitSkillLanguage; /** A value indicating which split mode to perform. */ textSplitMode?: TextSplitMode; /** The desired maximum page length. Default is 10000. */ maxPageLength?: number; - /** Only applicable when textSplitMode is set to 'pages'. If specified, n+1th chunk will start with this number of characters/tokens from the end of the nth chunk. */ - pageOverlapLength?: number; - /** Only applicable when textSplitMode is set to 'pages'. If specified, the SplitSkill will discontinue splitting after processing the first 'maximumPagesToTake' pages, in order to improve performance when only a few initial pages are needed from each document. */ - maximumPagesToTake?: number; - /** Only applies if textSplitMode is set to pages. There are two possible values. The choice of the values will decide the length (maximumPageLength and pageOverlapLength) measurement. The default is 'characters', which means the length will be measured by character. */ - unit?: SplitSkillUnit; - /** Only applies if the unit is set to azureOpenAITokens. If specified, the splitSkill will use these parameters when performing the tokenization. The parameters are a valid 'encoderModelName' and an optional 'allowedSpecialTokens' property. */ - azureOpenAITokenizerParameters?: AzureOpenAITokenizerParameters; } /** A skill to translate text from one language to another. */ @@ -2597,105 +2416,6 @@ export interface ImageAnalysisSkill extends BaseSearchIndexerSkill { /** Contains configuration options specific to the compression method used during indexing or querying. */ export type VectorSearchCompression = BinaryQuantizationCompression | ScalarQuantizationCompression; -/** - * Defines values for LexicalAnalyzerName. - * {@link KnownLexicalAnalyzerName} can be used interchangeably with LexicalAnalyzerName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ar.microsoft**: Microsoft analyzer for Arabic. - * **ar.lucene**: Lucene analyzer for Arabic. - * **hy.lucene**: Lucene analyzer for Armenian. - * **bn.microsoft**: Microsoft analyzer for Bangla. - * **eu.lucene**: Lucene analyzer for Basque. - * **bg.microsoft**: Microsoft analyzer for Bulgarian. - * **bg.lucene**: Lucene analyzer for Bulgarian. - * **ca.microsoft**: Microsoft analyzer for Catalan. - * **ca.lucene**: Lucene analyzer for Catalan. - * **zh-Hans.microsoft**: Microsoft analyzer for Chinese (Simplified). - * **zh-Hans.lucene**: Lucene analyzer for Chinese (Simplified). - * **zh-Hant.microsoft**: Microsoft analyzer for Chinese (Traditional). - * **zh-Hant.lucene**: Lucene analyzer for Chinese (Traditional). - * **hr.microsoft**: Microsoft analyzer for Croatian. - * **cs.microsoft**: Microsoft analyzer for Czech. - * **cs.lucene**: Lucene analyzer for Czech. - * **da.microsoft**: Microsoft analyzer for Danish. - * **da.lucene**: Lucene analyzer for Danish. - * **nl.microsoft**: Microsoft analyzer for Dutch. - * **nl.lucene**: Lucene analyzer for Dutch. - * **en.microsoft**: Microsoft analyzer for English. - * **en.lucene**: Lucene analyzer for English. - * **et.microsoft**: Microsoft analyzer for Estonian. - * **fi.microsoft**: Microsoft analyzer for Finnish. - * **fi.lucene**: Lucene analyzer for Finnish. - * **fr.microsoft**: Microsoft analyzer for French. - * **fr.lucene**: Lucene analyzer for French. - * **gl.lucene**: Lucene analyzer for Galician. - * **de.microsoft**: Microsoft analyzer for German. - * **de.lucene**: Lucene analyzer for German. - * **el.microsoft**: Microsoft analyzer for Greek. - * **el.lucene**: Lucene analyzer for Greek. - * **gu.microsoft**: Microsoft analyzer for Gujarati. - * **he.microsoft**: Microsoft analyzer for Hebrew. - * **hi.microsoft**: Microsoft analyzer for Hindi. - * **hi.lucene**: Lucene analyzer for Hindi. - * **hu.microsoft**: Microsoft analyzer for Hungarian. - * **hu.lucene**: Lucene analyzer for Hungarian. - * **is.microsoft**: Microsoft analyzer for Icelandic. - * **id.microsoft**: Microsoft analyzer for Indonesian (Bahasa). - * **id.lucene**: Lucene analyzer for Indonesian. - * **ga.lucene**: Lucene analyzer for Irish. - * **it.microsoft**: Microsoft analyzer for Italian. - * **it.lucene**: Lucene analyzer for Italian. - * **ja.microsoft**: Microsoft analyzer for Japanese. - * **ja.lucene**: Lucene analyzer for Japanese. - * **kn.microsoft**: Microsoft analyzer for Kannada. - * **ko.microsoft**: Microsoft analyzer for Korean. - * **ko.lucene**: Lucene analyzer for Korean. - * **lv.microsoft**: Microsoft analyzer for Latvian. - * **lv.lucene**: Lucene analyzer for Latvian. - * **lt.microsoft**: Microsoft analyzer for Lithuanian. - * **ml.microsoft**: Microsoft analyzer for Malayalam. - * **ms.microsoft**: Microsoft analyzer for Malay (Latin). - * **mr.microsoft**: Microsoft analyzer for Marathi. - * **nb.microsoft**: Microsoft analyzer for Norwegian (Bokmål). - * **no.lucene**: Lucene analyzer for Norwegian. - * **fa.lucene**: Lucene analyzer for Persian. - * **pl.microsoft**: Microsoft analyzer for Polish. - * **pl.lucene**: Lucene analyzer for Polish. - * **pt-BR.microsoft**: Microsoft analyzer for Portuguese (Brazil). - * **pt-BR.lucene**: Lucene analyzer for Portuguese (Brazil). - * **pt-PT.microsoft**: Microsoft analyzer for Portuguese (Portugal). - * **pt-PT.lucene**: Lucene analyzer for Portuguese (Portugal). - * **pa.microsoft**: Microsoft analyzer for Punjabi. - * **ro.microsoft**: Microsoft analyzer for Romanian. - * **ro.lucene**: Lucene analyzer for Romanian. - * **ru.microsoft**: Microsoft analyzer for Russian. - * **ru.lucene**: Lucene analyzer for Russian. - * **sr-cyrillic.microsoft**: Microsoft analyzer for Serbian (Cyrillic). - * **sr-latin.microsoft**: Microsoft analyzer for Serbian (Latin). - * **sk.microsoft**: Microsoft analyzer for Slovak. - * **sl.microsoft**: Microsoft analyzer for Slovenian. - * **es.microsoft**: Microsoft analyzer for Spanish. - * **es.lucene**: Lucene analyzer for Spanish. - * **sv.microsoft**: Microsoft analyzer for Swedish. - * **sv.lucene**: Lucene analyzer for Swedish. - * **ta.microsoft**: Microsoft analyzer for Tamil. - * **te.microsoft**: Microsoft analyzer for Telugu. - * **th.microsoft**: Microsoft analyzer for Thai. - * **th.lucene**: Lucene analyzer for Thai. - * **tr.microsoft**: Microsoft analyzer for Turkish. - * **tr.lucene**: Lucene analyzer for Turkish. - * **uk.microsoft**: Microsoft analyzer for Ukrainian. - * **ur.microsoft**: Microsoft analyzer for Urdu. - * **vi.microsoft**: Microsoft analyzer for Vietnamese. - * **standard.lucene**: Standard Lucene analyzer. - * **standardasciifolding.lucene**: Standard ASCII Folding Lucene analyzer. See https:\/\/learn.microsoft.com\/rest\/api\/searchservice\/Custom-analyzers-in-Azure-Search#Analyzers - * **keyword**: Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/KeywordAnalyzer.html - * **pattern**: Flexibly separates text into terms via a regular expression pattern. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/PatternAnalyzer.html - * **simple**: Divides text at non-letters and converts them to lower case. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/SimpleAnalyzer.html - * **stop**: Divides text at non-letters; Applies the lowercase and stopword token filters. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/StopAnalyzer.html - * **whitespace**: An analyzer that uses the whitespace tokenizer. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/WhitespaceAnalyzer.html - */ export type AnalyzerNames = `${KnownLexicalAnalyzerName}`; export type BlobIndexerDataToExtract = `${KnownBlobIndexerDataToExtract}`; export type BlobIndexerImageAction = `${KnownBlobIndexerImageAction}`; diff --git a/sdk/search/search-documents/src/serviceUtils.ts b/sdk/search/search-documents/src/serviceUtils.ts index 0c71e1fb177d..7735ea892e22 100644 --- a/sdk/search/search-documents/src/serviceUtils.ts +++ b/sdk/search/search-documents/src/serviceUtils.ts @@ -1,25 +1,20 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { +import { SearchResult as GeneratedSearchResult, SuggestDocumentsResult as GeneratedSuggestDocumentsResult, } from "./generated/data/models/index.js"; -import type { - AIServicesAccountIdentity as GeneratedAIServicesAccountIdentity, - AIServicesAccountKey as GeneratedAIServicesAccountKey, - AIServicesVisionVectorizer as GeneratedAIServicesVisionVectorizer, - AMLParameters as GeneratedAMLParameters, - AMLVectorizer as GeneratedAMLVectorizer, +import { AzureOpenAIVectorizer as GeneratedAzureOpenAIVectorizer, BM25Similarity, ClassicSimilarity, - CognitiveServicesAccountKey as GeneratedCognitiveServicesAccountKey, + CognitiveServicesAccountKey, CognitiveServicesAccountUnion, CustomAnalyzer as BaseCustomAnalyzer, DataChangeDetectionPolicyUnion, DataDeletionDetectionPolicyUnion, - DefaultCognitiveServicesAccount as GeneratedDefaultCognitiveServicesAccount, + DefaultCognitiveServicesAccount, ExhaustiveKnnAlgorithmConfiguration as GeneratedExhaustiveKnnAlgorithmConfiguration, HighWaterMarkChangeDetectionPolicy, HnswAlgorithmConfiguration as GeneratedHnswAlgorithmConfiguration, @@ -31,12 +26,10 @@ import type { SearchField as GeneratedSearchField, SearchIndex as GeneratedSearchIndex, SearchIndexer as GeneratedSearchIndexer, - SearchIndexerCache as GeneratedSearchIndexerCache, SearchIndexerDataIdentityUnion, SearchIndexerDataNoneIdentity, SearchIndexerDataSource as GeneratedSearchIndexerDataSourceConnection, SearchIndexerDataUserAssignedIdentity, - SearchIndexerKnowledgeStore as BaseSearchIndexerKnowledgeStore, SearchIndexerSkillset as GeneratedSearchIndexerSkillset, SearchIndexerSkillUnion, SearchResourceEncryptionKey as GeneratedSearchResourceEncryptionKey, @@ -49,19 +42,16 @@ import type { VectorSearch as GeneratedVectorSearch, VectorSearchAlgorithmConfigurationUnion as GeneratedVectorSearchAlgorithmConfiguration, VectorSearchVectorizerUnion as GeneratedVectorSearchVectorizer, - WebApiVectorizer as GeneratedWebApiVectorizer, + WebApiVectorizer as GeneratedWebAPIVectorizer, } from "./generated/service/models/index.js"; -import type { +import { SearchResult, SelectFields, SuggestDocumentsResult, SuggestResult, } from "./indexModels.js"; import { logger } from "./logger.js"; -import type { - AIServicesVisionVectorizer, - AzureMachineLearningVectorizer, - AzureMachineLearningVectorizerParameters, +import { AzureOpenAIVectorizer, BlobIndexerDataToExtract, BlobIndexerImageAction, @@ -75,11 +65,10 @@ import type { IndexerExecutionEnvironment, IndexingParameters, IndexingParametersConfiguration, - KeyAuthAzureMachineLearningVectorizerParameters, + isComplexField, LexicalAnalyzer, LexicalNormalizer, LexicalTokenizer, - NoAuthAzureMachineLearningVectorizerParameters, PatternAnalyzer, RegexFlags, ScoringProfile, @@ -87,19 +76,16 @@ import type { SearchFieldDataType, SearchIndex, SearchIndexer, - SearchIndexerCache, SearchIndexerDataIdentity, SearchIndexerDataSourceConnection, SearchIndexerDataSourceType, SearchIndexerIndexProjection, - SearchIndexerKnowledgeStore, SearchIndexerSkill, SearchIndexerSkillset, SearchResourceEncryptionKey, SimilarityAlgorithm, SimpleField, SynonymMap, - TokenAuthAzureMachineLearningVectorizerParameters, TokenFilter, VectorSearch, VectorSearchAlgorithmConfiguration, @@ -107,9 +93,8 @@ import type { VectorSearchVectorizer, WebApiVectorizer, } from "./serviceModels.js"; -import { isComplexField } from "./serviceModels.js"; -export const defaultServiceVersion = "2024-09-01-Preview"; +export const defaultServiceVersion = "2025-09-01"; const knownSkills: Record<`${SearchIndexerSkillUnion["odatatype"]}`, true> = { "#Microsoft.Skills.Custom.WebApiSkill": true, @@ -131,8 +116,6 @@ const knownSkills: Record<`${SearchIndexerSkillUnion["odatatype"]}`, true> = { "#Microsoft.Skills.Util.ShaperSkill": true, "#Microsoft.Skills.Vision.ImageAnalysisSkill": true, "#Microsoft.Skills.Vision.OcrSkill": true, - "#Microsoft.Skills.Custom.AmlSkill": true, - "#Microsoft.Skills.Vision.VectorizeSkill": true, "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill": true, }; @@ -152,19 +135,7 @@ export function convertCognitiveServicesAccountToGenerated( return cognitiveServicesAccount; } - switch (cognitiveServicesAccount.odatatype) { - case "#Microsoft.Azure.Search.AIServicesByIdentity": - case "#Microsoft.Azure.Search.DefaultCognitiveServices": - case "#Microsoft.Azure.Search.CognitiveServicesByKey": - case "#Microsoft.Azure.Search.AIServicesByKey": - return cognitiveServicesAccount; - default: { - logger.warning( - `Unsupported Cognitive Services account odatatype: ${(cognitiveServicesAccount as any).odatatype}`, - ); - return cognitiveServicesAccount as any; - } - } + return cognitiveServicesAccount as CognitiveServicesAccountUnion; } export function convertCognitiveServicesAccountToPublic( @@ -174,37 +145,11 @@ export function convertCognitiveServicesAccountToPublic( return cognitiveServicesAccount; } - const deserializers: Record< - CognitiveServicesAccountUnion["odatatype"], - () => CognitiveServicesAccount - > = { - "#Microsoft.Azure.Search.DefaultCognitiveServices": () => { - return cognitiveServicesAccount as GeneratedDefaultCognitiveServicesAccount; - }, - "#Microsoft.Azure.Search.CognitiveServicesByKey": () => { - return cognitiveServicesAccount as GeneratedCognitiveServicesAccountKey; - }, - "#Microsoft.Azure.Search.AIServicesByKey": () => { - return cognitiveServicesAccount as GeneratedAIServicesAccountKey; - }, - "#Microsoft.Azure.Search.AIServicesByIdentity": () => { - const { identity, ...restParams } = - cognitiveServicesAccount as GeneratedAIServicesAccountIdentity; - return { - ...restParams, - identity: convertSearchIndexerDataIdentityToPublic(identity ?? undefined), - }; - }, - }; - - const defaultDeserializer: () => CognitiveServicesAccount = () => { - logger.warning( - `Unsupported Cognitive Services account odatatype: ${(cognitiveServicesAccount as CognitiveServicesAccount).odatatype}`, - ); - return cognitiveServicesAccount as CognitiveServicesAccount; - }; - - return (deserializers[cognitiveServicesAccount.odatatype] ?? defaultDeserializer)(); + if (cognitiveServicesAccount.odatatype === "#Microsoft.Azure.Search.DefaultCognitiveServices") { + return cognitiveServicesAccount as DefaultCognitiveServicesAccount; + } else { + return cognitiveServicesAccount as CognitiveServicesAccountKey; + } } export function convertTokenFiltersToGenerated( @@ -321,15 +266,13 @@ export function convertFieldsToPublic(fields: GeneratedSearchField[]): SearchFie }); } -export function convertFieldsToGenerated( - fields: SearchField[] | undefined, -): GeneratedSearchField[] | undefined { - return fields?.map((field) => { +export function convertFieldsToGenerated(fields: SearchField[]): GeneratedSearchField[] { + return fields.map((field) => { if (isComplexField(field)) { return { name: field.name, type: field.type, - fields: convertFieldsToGenerated(field.fields), + fields: field.fields ? convertFieldsToGenerated(field.fields) : field.fields, }; } else { const { hidden, ...restField } = field; @@ -345,8 +288,8 @@ export function convertFieldsToGenerated( analyzer: field.analyzerName, searchAnalyzer: field.searchAnalyzerName, indexAnalyzer: field.indexAnalyzerName, - synonymMaps: field.synonymMapNames, normalizer: field.normalizerName, + synonymMaps: field.synonymMapNames, }; } }); @@ -431,7 +374,6 @@ function convertEncryptionKeyToPublic( keyName: encryptionKey.keyName, keyVersion: encryptionKey.keyVersion, vaultUrl: encryptionKey.vaultUri, - identity: convertSearchIndexerDataIdentityToPublic(encryptionKey.identity), }; if (encryptionKey.accessCredentials) { @@ -453,7 +395,6 @@ function convertEncryptionKeyToGenerated( keyName: encryptionKey.keyName, keyVersion: encryptionKey.keyVersion, vaultUri: encryptionKey.vaultUrl, - identity: encryptionKey.identity, }; if (encryptionKey.applicationId) { @@ -469,16 +410,17 @@ function convertEncryptionKeyToGenerated( export function generatedIndexToPublicIndex(generatedIndex: GeneratedSearchIndex): SearchIndex { return { name: generatedIndex.name, + description: generatedIndex.description, defaultScoringProfile: generatedIndex.defaultScoringProfile, corsOptions: generatedIndex.corsOptions, suggesters: generatedIndex.suggesters, encryptionKey: convertEncryptionKeyToPublic(generatedIndex.encryptionKey), etag: generatedIndex.etag, analyzers: convertAnalyzersToPublic(generatedIndex.analyzers), + normalizers: generatedIndex.normalizers as LexicalNormalizer[], tokenizers: convertTokenizersToPublic(generatedIndex.tokenizers), tokenFilters: generatedIndex.tokenFilters as TokenFilter[], charFilters: generatedIndex.charFilters as CharFilter[], - normalizers: generatedIndex.normalizers as LexicalNormalizer[], scoringProfiles: generatedIndex.scoringProfiles as ScoringProfile[], fields: convertFieldsToPublic(generatedIndex.fields), similarity: convertSimilarityToPublic(generatedIndex.similarity), @@ -498,11 +440,8 @@ export function generatedVectorSearchVectorizerToPublicVectorizer( return generatedVectorizer; } - const knownVectorizerDeserializers: Record< - VectorSearchVectorizer["kind"], - () => VectorSearchVectorizer - > = { - azureOpenAI: () => { + switch (generatedVectorizer.kind) { + case "azureOpenAI": { const { parameters } = generatedVectorizer as GeneratedAzureOpenAIVectorizer; const authIdentity = convertSearchIndexerDataIdentityToPublic(parameters?.authIdentity); const vectorizer: AzureOpenAIVectorizer = { @@ -510,90 +449,19 @@ export function generatedVectorSearchVectorizerToPublicVectorizer( parameters: { ...parameters, authIdentity }, }; return vectorizer; - }, - - customWebApi: () => { - const { parameters } = generatedVectorizer as GeneratedWebApiVectorizer; + } + case "customWebApi": { + const { parameters } = generatedVectorizer as GeneratedWebAPIVectorizer; const authIdentity = convertSearchIndexerDataIdentityToPublic(parameters?.authIdentity); const vectorizer: WebApiVectorizer = { - ...(generatedVectorizer as GeneratedWebApiVectorizer), + ...(generatedVectorizer as GeneratedWebAPIVectorizer), parameters: { ...parameters, authIdentity }, }; return vectorizer; - }, - - aiServicesVision: () => { - const generatedVisionVectorizer = generatedVectorizer as GeneratedAIServicesVisionVectorizer; - const { aIServicesVisionParameters: generatedParameters } = generatedVisionVectorizer; - const parameters = generatedParameters - ? { - ...generatedParameters, - modelVersion: generatedParameters.modelVersion ?? undefined, - resourceUri: generatedParameters.resourceUri, - authIdentity: convertSearchIndexerDataIdentityToPublic( - generatedParameters.authIdentity, - ), - } - : undefined; - const vectorizer: AIServicesVisionVectorizer = { - ...generatedVisionVectorizer, - parameters, - }; - return vectorizer; - }, - aml: () => { - const generatedAMLVectorizer = generatedVectorizer as GeneratedAMLVectorizer; - - const vectorizer: AzureMachineLearningVectorizer = { - ...generatedAMLVectorizer, - amlParameters: - generatedAzureMachineLearningVectorizerParametersToPublicAzureMachineLearningVectorizerParameters( - generatedAMLVectorizer.aMLParameters, - ), - }; - - return vectorizer; - }, - }; - const defaultDeserializer = (): any => { - logger.warning(`Unsupported vectorizer kind: ${(generatedVectorizer as any).kind}`); - return generatedVectorizer as any; - }; - - return (knownVectorizerDeserializers[generatedVectorizer.kind] ?? defaultDeserializer)(); -} - -function generatedAzureMachineLearningVectorizerParametersToPublicAzureMachineLearningVectorizerParameters( - aMLParameters?: GeneratedAMLParameters, -): AzureMachineLearningVectorizerParameters | undefined { - if (!aMLParameters) { - return aMLParameters; - } - - const { resourceId, authenticationKey, scoringUri } = aMLParameters; - // Sensitive to case order - switch (true) { - case resourceId !== undefined && resourceId !== null: { - return { - ...aMLParameters, - authKind: "token", - } as TokenAuthAzureMachineLearningVectorizerParameters; - } - case authenticationKey !== undefined && authenticationKey !== null: { - return { - ...aMLParameters, - authKind: "key", - } as KeyAuthAzureMachineLearningVectorizerParameters; - } - case scoringUri !== undefined && scoringUri !== null: { - return { - ...aMLParameters, - authKind: "none", - } as NoAuthAzureMachineLearningVectorizerParameters; } } - logger.warning("Unknown AML parameter kind"); - return aMLParameters as any; + logger.warning(`Unsupported vectorizer kind: ${(generatedVectorizer as any).kind}`); + return generatedVectorizer as any; } export function generatedVectorSearchAlgorithmConfigurationToPublicVectorSearchAlgorithmConfiguration(): undefined; @@ -648,7 +516,7 @@ export function generatedSearchResultToPublicSearchResult< _highlights: highlights, _rerankerScore: rerankerScore, _captions: captions, - documentDebugInfo: documentDebugInfo, + rerankerBoostedScore, ...restProps } = result; const obj = { @@ -656,7 +524,7 @@ export function generatedSearchResultToPublicSearchResult< highlights, rerankerScore, captions, - documentDebugInfo, + rerankerBoostedScore, document: restProps, }; return obj as SearchResult; @@ -697,7 +565,7 @@ export function publicIndexToGeneratedIndex(index: SearchIndex): GeneratedSearch tokenFilters: convertTokenFiltersToGenerated(tokenFilters), analyzers: convertAnalyzersToGenerated(analyzers), tokenizers: convertTokenizersToGenerated(tokenizers), - fields: convertFieldsToGenerated(fields) ?? [], + fields: convertFieldsToGenerated(fields), similarity: convertSimilarityToGenerated(similarity), }; } @@ -705,19 +573,12 @@ export function publicIndexToGeneratedIndex(index: SearchIndex): GeneratedSearch export function generatedSkillsetToPublicSkillset( generatedSkillset: GeneratedSearchIndexerSkillset, ): SearchIndexerSkillset { - const { - skills, - cognitiveServicesAccount, - knowledgeStore, - encryptionKey, - indexProjection, - ...props - } = generatedSkillset; + const { skills, cognitiveServicesAccount, encryptionKey, indexProjection, ...props } = + generatedSkillset; return { ...props, skills: convertSkillsToPublic(skills), cognitiveServicesAccount: convertCognitiveServicesAccountToPublic(cognitiveServicesAccount), - knowledgeStore: convertKnowledgeStoreToPublic(knowledgeStore), encryptionKey: convertEncryptionKeyToPublic(encryptionKey), indexProjection: indexProjection as SearchIndexerIndexProjection, }; @@ -726,12 +587,17 @@ export function generatedSkillsetToPublicSkillset( export function publicSkillsetToGeneratedSkillset( skillset: SearchIndexerSkillset, ): GeneratedSearchIndexerSkillset { - const { cognitiveServicesAccount, encryptionKey } = skillset; - return { ...skillset, - cognitiveServicesAccount: convertCognitiveServicesAccountToGenerated(cognitiveServicesAccount), - encryptionKey: convertEncryptionKeyToGenerated(encryptionKey), + name: skillset.name, + description: skillset.description, + etag: skillset.etag, + skills: skillset.skills, + cognitiveServicesAccount: convertCognitiveServicesAccountToGenerated( + skillset.cognitiveServicesAccount, + ), + knowledgeStore: skillset.knowledgeStore, + encryptionKey: convertEncryptionKeyToGenerated(skillset.encryptionKey), }; } @@ -804,7 +670,6 @@ export function generatedSearchIndexerToPublicSearchIndexer( ...indexer, parameters, encryptionKey: convertEncryptionKeyToPublic(indexer.encryptionKey), - cache: convertSearchIndexerCacheToPublic(indexer.cache), }; } @@ -819,7 +684,6 @@ export function publicDataSourceToGeneratedDataSource( connectionString: dataSource.connectionString, }, container: dataSource.container, - identity: dataSource.identity, etag: dataSource.etag, dataChangeDetectionPolicy: dataSource.dataChangeDetectionPolicy, dataDeletionDetectionPolicy: dataSource.dataDeletionDetectionPolicy, @@ -836,7 +700,6 @@ export function generatedDataSourceToPublicDataSource( type: dataSource.type as SearchIndexerDataSourceType, connectionString: dataSource.credentials.connectionString, container: dataSource.container, - identity: convertSearchIndexerDataIdentityToPublic(dataSource.identity), etag: dataSource.etag, dataChangeDetectionPolicy: convertDataChangeDetectionPolicyToPublic( dataSource.dataChangeDetectionPolicy, @@ -899,29 +762,3 @@ export function getRandomIntegerInclusive(min: number, max: number): number { const offset = Math.floor(Math.random() * (max - min + 1)); return offset + min; } - -function convertKnowledgeStoreToPublic( - knowledgeStore: BaseSearchIndexerKnowledgeStore | undefined, -): SearchIndexerKnowledgeStore | undefined { - if (!knowledgeStore) { - return knowledgeStore; - } - - return { - ...knowledgeStore, - identity: convertSearchIndexerDataIdentityToPublic(knowledgeStore.identity), - }; -} - -export function convertSearchIndexerCacheToPublic( - cache?: GeneratedSearchIndexerCache, -): SearchIndexerCache | undefined { - if (!cache) { - return cache; - } - - return { - ...cache, - identity: convertSearchIndexerDataIdentityToPublic(cache.identity), - }; -} diff --git a/sdk/search/search-documents/src/synonymMapHelper-browser.mts b/sdk/search/search-documents/src/synonymMapHelper-browser.mts index 7fbd358e50d7..b63fd204bcfa 100644 --- a/sdk/search/search-documents/src/synonymMapHelper-browser.mts +++ b/sdk/search/search-documents/src/synonymMapHelper-browser.mts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { SynonymMap } from "./serviceModels.js"; +import { SynonymMap } from "./serviceModels.js"; /** * Helper method to create a SynonymMap object. This is a NodeJS only method. diff --git a/sdk/search/search-documents/src/synonymMapHelper.ts b/sdk/search/search-documents/src/synonymMapHelper.ts index 9a10bab8dfb6..bc756125d296 100644 --- a/sdk/search/search-documents/src/synonymMapHelper.ts +++ b/sdk/search/search-documents/src/synonymMapHelper.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import fs from "node:fs"; -import { promisify } from "node:util"; -import type { SynonymMap } from "./serviceModels.js"; +import * as fs from "fs"; +import { promisify } from "util"; +import { SynonymMap } from "./serviceModels.js"; const readFileAsync = promisify(fs.readFile); /** diff --git a/sdk/search/search-documents/swagger/Data.md b/sdk/search/search-documents/swagger/Data.md index eb033c447e37..0664fba40278 100644 --- a/sdk/search/search-documents/swagger/Data.md +++ b/sdk/search/search-documents/swagger/Data.md @@ -10,13 +10,13 @@ generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src/generated/data -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/14531a7cf6101c1dd57e7c1c83103a047bb8f5bb/specification/search/data-plane/Azure.Search/preview/2024-11-01-preview/searchindex.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/613315ec5a543cdc0f0b259b23a5ae02f46663dc/specification/search/data-plane/Azure.Search/stable/2025-09-01/searchindex.json add-credentials: false title: SearchClient use-extension: "@autorest/typescript": "6.0.34" core-http-compat-mode: true -package-version: 12.2.0-beta.2 +package-version: 12.2.0 disable-async-iterators: true api-version-parameter: choice v3: true diff --git a/sdk/search/search-documents/swagger/Service.md b/sdk/search/search-documents/swagger/Service.md index 7ecc45be5da6..bf0efe8bd51a 100644 --- a/sdk/search/search-documents/swagger/Service.md +++ b/sdk/search/search-documents/swagger/Service.md @@ -10,12 +10,12 @@ generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src/generated/service -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/14531a7cf6101c1dd57e7c1c83103a047bb8f5bb/specification/search/data-plane/Azure.Search/preview/2024-11-01-preview/searchservice.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/613315ec5a543cdc0f0b259b23a5ae02f46663dc/specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json add-credentials: false use-extension: "@autorest/typescript": "6.0.34" core-http-compat-mode: true -package-version: 12.2.0-beta.2 +package-version: 12.2.0 disable-async-iterators: true api-version-parameter: choice v3: true diff --git a/sdk/search/search-documents/test/internal/base64.spec.ts b/sdk/search/search-documents/test/internal/node/base64.spec.ts similarity index 86% rename from sdk/search/search-documents/test/internal/base64.spec.ts rename to sdk/search/search-documents/test/internal/node/base64.spec.ts index 252a27b289c0..ffcc7c14a7b7 100644 --- a/sdk/search/search-documents/test/internal/base64.spec.ts +++ b/sdk/search/search-documents/test/internal/node/base64.spec.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { decode, encode } from "../../src/base64.js"; +import { decode, encode } from "../../../src/base64.js"; import { describe, it, assert } from "vitest"; describe("base64", () => {