diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 87d3282904bcd..4f3b10bb446e2 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,14 +1,42 @@ # Release History -## 11.6.0-beta.5 (Unreleased) +## 11.6.0 (2024-07-17) ### Features Added +- Added support for `2024-07-01` service version. +- `SemanticSearchOptions` now supports `SemanticQuery`, which allows for specifying a semantic query that is only used + for semantic reranking. +- `VectorQuery` now supports `Oversampling` and `Weight`, which allows for specifying richer configurations on how + vector queries affect search results. +- Added support for `VectorizableTextQuery`, which allows for passing a text-based query that is vectorized service-side + by `VectorSearchVectorizer`s configured on the index so that vectorization doesn't need to happen before querying. +- Added support for "bring your own endpoint" with `VectorSearchVectorizer`, with implementations `AzureOpenAIVectorizer` + and `WebApiVectorizer`. This enables the service to use a user-provided configuration for vectorizing text, rather + than requiring all client-side calls to vectorize before querying, allowing for easier standardization of vectorization. +- Added support for compression with `VectorSearchCompression`, with implementations `BinaryQuantizationCompression` + and `ScalarQuantizationCompression`. This allows for reducing the size of vectors in the index, which can reduce + storage costs and improve querying performance. +- Added support for `VectorEncodingFormat`, which allows for specifying the encoding format of the vector data. +- Added support for `AzureOpenAIEmbeddingSkill`, which is a skill that uses the Azure OpenAI service to create text + embeddings during indexing. +- Added support for index projections with `SearchIndexerIndexProjection`, which allows for specifying how indexed + documents are projected in the index (or indexes). +- Added support for "narrow" types in `SearchFieldDataType`. This allows for specifying smaller types for vector fields + to reduce storage costs and improve querying performance. +- Added support for `SearchIndexerDataIdentity`, which allows for specifying the identity for the data source for the + indexer. +- `SearchField` and `SearchableField` now support `IsStored` and `VectorEncodingFormat` configurations. `IsStored` allows + for specifying behaviors on how the index will retain vector data (enabling the ability to reduce storage costs), and + `VectorEncodingFormat` allows for specifying the encoding format of the vector data. +- `OcrSkill` now supports `LineEnding`, which allows for specifying the line ending character used by the OCR skill. +- `SplitSkill` now supports `MaximumPagesToTake` and `PageOverlapLength`, which allows for specifying how the split + skill behaves when splitting documents into pages. +- `SearchServiceLimits` now supports `MaxStoragePerIndexInBytes`, which shows the maximum storage allowed per index. ### Breaking Changes -### Bugs Fixed - -### Other Changes +- All service concepts that have been in preview but not included in the `2024-07-01` GA have been removed. This + includes concepts such as index aliases, normalizers, Azure Machine Learning skills, hybrid search, and more. ## 11.6.0-beta.4 (2024-05-06) diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index d950c97b75ee7..39c50e6d61047 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -79,7 +79,7 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede } public partial class SearchClientOptions : Azure.Core.ClientOptions { - public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2024_05_01_Preview) { } + public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2024_07_01) { } public Azure.Search.Documents.SearchAudience? Audience { get { throw null; } set { } } public Azure.Core.Serialization.ObjectSerializer Serializer { get { throw null; } set { } } public Azure.Search.Documents.SearchClientOptions.ServiceVersion Version { get { throw null; } } @@ -87,7 +87,7 @@ public enum ServiceVersion { V2020_06_30 = 1, V2023_11_01 = 2, - V2024_05_01_Preview = 3, + V2024_07_01 = 3, } } public static partial class SearchFilter @@ -151,12 +151,9 @@ public SearchOptions() { } public System.Collections.Generic.IList HighlightFields { get { throw null; } } public string HighlightPostTag { get { throw null; } set { } } public string HighlightPreTag { get { throw null; } set { } } - public Azure.Search.Documents.Models.HybridSearch HybridSearch { get { throw null; } set { } } public bool? IncludeTotalCount { get { throw null; } set { } } public double? MinimumCoverage { get { throw null; } set { } } public System.Collections.Generic.IList OrderBy { get { throw null; } } - public Azure.Search.Documents.Models.QueryLanguage? QueryLanguage { get { throw null; } set { } } - public Azure.Search.Documents.Models.QuerySpellerType? QuerySpeller { get { throw null; } set { } } public Azure.Search.Documents.Models.SearchQueryType? QueryType { get { throw null; } set { } } public System.Collections.Generic.IList ScoringParameters { get { throw null; } } public string ScoringProfile { get { throw null; } set { } } @@ -218,20 +215,14 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual string ServiceName { get { throw null; } } public virtual Azure.Response> AnalyzeText(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> AnalyzeTextAsync(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateAlias(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAliasAsync(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateAlias(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAliasAsync(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteAlias(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAliasAsync(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -240,10 +231,6 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual Azure.Response DeleteSynonymMap(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAlias(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAliasAsync(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAliases(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAliasesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetIndexes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -276,32 +263,12 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task> CreateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -336,12 +303,8 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task>> GetSkillsetNamesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> GetSkillsets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> GetSkillsetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ResetDocuments(string indexerName, bool? overwrite = default(bool?), Azure.Search.Documents.Models.ResetDocumentOptions resetDocumentOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResetDocumentsAsync(string indexerName, bool? overwrite = default(bool?), Azure.Search.Documents.Models.ResetDocumentOptions resetDocumentOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ResetSkills(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResetSkillsAsync(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RunIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RunIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -354,7 +317,6 @@ public SimpleFieldAttribute() { } public bool IsHidden { get { throw null; } set { } } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } - public string NormalizerName { get { throw null; } set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public partial class VectorSearchFieldAttribute : System.Attribute @@ -369,41 +331,6 @@ public VectorSearchFieldAttribute() { } } namespace Azure.Search.Documents.Indexes.Models { - public partial class AIServicesVisionParameters - { - public AIServicesVisionParameters(string modelVersion, System.Uri resourceUri) { } - public string ApiKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - public System.Uri ResourceUri { get { throw null; } set { } } - } - public partial class AIServicesVisionVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public AIServicesVisionVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.AIServicesVisionParameters AIServicesVisionParameters { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AIStudioModelCatalogName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AIStudioModelCatalogName(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName CohereEmbedV3English { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName CohereEmbedV3Multilingual { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsViTLargePatch14336 { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName left, Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName left, Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName right) { throw null; } - public override string ToString() { throw null; } - } public partial class AnalyzedTokenInfo { internal AnalyzedTokenInfo() { } @@ -416,11 +343,9 @@ public partial class AnalyzeTextOptions { public AnalyzeTextOptions(string text) { } public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName analyzerName) { } - public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName normalizerName) { } public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalTokenizerName tokenizerName) { } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? AnalyzerName { get { throw null; } } public System.Collections.Generic.IList CharFilters { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } } public string Text { get { throw null; } } public System.Collections.Generic.IList TokenFilters { get { throw null; } } public Azure.Search.Documents.Indexes.Models.LexicalTokenizerName? TokenizerName { get { throw null; } } @@ -430,38 +355,12 @@ public partial class AsciiFoldingTokenFilter : Azure.Search.Documents.Indexes.Mo public AsciiFoldingTokenFilter(string name) { } public bool? PreserveOriginal { get { throw null; } set { } } } - public partial class AzureMachineLearningParameters - { - public AzureMachineLearningParameters(System.Uri scoringUri) { } - public string AuthenticationKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName? ModelName { get { throw null; } set { } } - public string Region { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - public System.Uri ScoringUri { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - } - public partial class AzureMachineLearningSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill - { - public AzureMachineLearningSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, Azure.Core.ResourceIdentifier resourceId, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { } - public AzureMachineLearningSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, System.Uri scoringUri, string authenticationKey = null) { } - public string AuthenticationKey { get { throw null; } } - public int? DegreeOfParallelism { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } - public System.Uri ScoringUri { get { throw null; } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - } - public partial class AzureMachineLearningVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public AzureMachineLearningVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.AzureMachineLearningParameters AMLParameters { get { throw null; } set { } } - } public partial class AzureOpenAIEmbeddingSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill { public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } public string ApiKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string DeploymentId { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthenticationIdentity { get { throw null; } set { } } + public string DeploymentName { get { throw null; } set { } } public int? Dimensions { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.AzureOpenAIModelName? ModelName { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -472,7 +371,6 @@ public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable @@ -726,27 +628,6 @@ public CustomEntityLookupSkill(System.Collections.Generic.IEnumerable CharFilters { get { throw null; } } - public System.Collections.Generic.IList TokenFilters { get { throw null; } } - } - public partial class CustomVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public CustomVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.CustomWebApiParameters CustomWebApiParameters { get { throw null; } set { } } - } - public partial class CustomWebApiParameters - { - public CustomWebApiParameters() { } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string AuthResourceId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary HttpHeaders { get { throw null; } } - public string HttpMethod { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } public partial class DataChangeDetectionPolicy { internal DataChangeDetectionPolicy() { } @@ -1056,14 +937,6 @@ public ImageAnalysisSkill(System.Collections.Generic.IEnumerable { @@ -1085,7 +958,6 @@ internal IndexerChangeTrackingState() { } public partial class IndexerExecutionResult { internal IndexerExecutionResult() { } - public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.DateTimeOffset? EndTime { get { throw null; } } public string ErrorMessage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } @@ -1095,7 +967,6 @@ internal IndexerExecutionResult() { } public int ItemCount { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus Status { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? StatusDetail { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } } public enum IndexerExecutionStatus @@ -1105,55 +976,12 @@ public enum IndexerExecutionStatus InProgress = 2, Reset = 3, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IndexerExecutionStatusDetail : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IndexerExecutionStatusDetail(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail ResetDocs { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } - public override string ToString() { throw null; } - } - public partial class IndexerState - { - internal IndexerState() { } - public Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState ChangeTrackingState { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResetDataSourceDocumentIds { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResetDocumentKeys { get { throw null; } } - } public enum IndexerStatus { Unknown = 0, Error = 1, Running = 2, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IndexingMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IndexingMode(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexingMode AllDocuments { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.IndexingMode ResetDocuments { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.IndexingMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.IndexingMode left, Azure.Search.Documents.Indexes.Models.IndexingMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.IndexingMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexingMode left, Azure.Search.Documents.Indexes.Models.IndexingMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class IndexingParameters { public IndexingParameters() { } @@ -1291,8 +1119,6 @@ public KeywordTokenizer(string name) { } public partial class KnowledgeStore { public KnowledgeStore(string storageConnectionString, System.Collections.Generic.IEnumerable projections) { } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerKnowledgeStoreParameters Parameters { get { throw null; } set { } } public System.Collections.Generic.IList Projections { get { throw null; } } public string StorageConnectionString { get { throw null; } set { } } } @@ -1551,40 +1377,6 @@ public static partial class Values public const string ZhHantMicrosoft = "zh-Hant.microsoft"; } } - public partial class LexicalNormalizer - { - public LexicalNormalizer(string name) { } - public string Name { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LexicalNormalizerName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LexicalNormalizerName(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName AsciiFolding { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Elision { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Lowercase { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Standard { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Uppercase { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.LexicalNormalizerName other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.LexicalNormalizerName left, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.LexicalNormalizerName (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.LexicalNormalizerName left, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName right) { throw null; } - public override string ToString() { throw null; } - public static partial class Values - { - public const string AsciiFolding = "asciifolding"; - public const string Elision = "elision"; - public const string Lowercase = "lowercase"; - public const string Standard = "standard"; - public const string Uppercase = "uppercase"; - } - } public partial class LexicalTokenizer { internal LexicalTokenizer() { } @@ -1625,26 +1417,6 @@ public LimitTokenFilter(string name) { } public bool? ConsumeAllTokens { get { throw null; } set { } } public int? MaxTokenCount { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LineEnding : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LineEnding(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.LineEnding CarriageReturn { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding CarriageReturnLineFeed { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding LineFeed { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding Space { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.LineEnding other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.LineEnding left, Azure.Search.Documents.Indexes.Models.LineEnding right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.LineEnding (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.LineEnding left, Azure.Search.Documents.Indexes.Models.LineEnding right) { throw null; } - public override string ToString() { throw null; } - } public partial class LuceneStandardAnalyzer : Azure.Search.Documents.Indexes.Models.LexicalAnalyzer { public LuceneStandardAnalyzer(string name) { } @@ -1786,10 +1558,6 @@ public enum MicrosoftTokenizerLanguage Urdu = 40, Vietnamese = 41, } - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy - { - public NativeBlobSoftDeleteDeletionDetectionPolicy() { } - } public partial class NGramTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public NGramTokenFilter(string name) { } @@ -1803,11 +1571,31 @@ public NGramTokenizer(string name) { } public int? MinGram { get { throw null; } set { } } public System.Collections.Generic.IList TokenChars { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OcrLineEnding : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OcrLineEnding(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding CarriageReturn { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding CarriageReturnLineFeed { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding LineFeed { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding Space { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.OcrLineEnding other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Search.Documents.Indexes.Models.OcrLineEnding left, Azure.Search.Documents.Indexes.Models.OcrLineEnding right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.OcrLineEnding (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.OcrLineEnding left, Azure.Search.Documents.Indexes.Models.OcrLineEnding right) { throw null; } + public override string ToString() { throw null; } + } public partial class OcrSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill { public OcrSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } public Azure.Search.Documents.Indexes.Models.OcrSkillLanguage? DefaultLanguageCode { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.LineEnding? LineEnding { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.OcrLineEnding? LineEnding { get { throw null; } set { } } public bool? ShouldDetectOrientation { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -2117,15 +1905,15 @@ public PiiDetectionSkill(System.Collections.Generic.IEnumerable SynonymMapNames { get { throw null; } } } - public partial class SearchAlias - { - public SearchAlias(string name, System.Collections.Generic.IEnumerable indexes) { } - public SearchAlias(string name, string index) { } - public Azure.ETag? ETag { get { throw null; } } - public System.Collections.Generic.IList Indexes { get { throw null; } } - public string Name { get { throw null; } set { } } - } public partial class SearchField { public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFieldDataType type) { } @@ -2187,7 +1967,6 @@ public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool? IsSortable { get { throw null; } set { } } public bool? IsStored { get { throw null; } set { } } public string Name { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? SearchAnalyzerName { get { throw null; } set { } } public System.Collections.Generic.IList SynonymMapNames { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchFieldDataType Type { get { throw null; } } @@ -2246,7 +2025,6 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable Fields { get { throw null; } set { } } public string Name { get { throw null; } } - public System.Collections.Generic.IList Normalizers { get { throw null; } } public System.Collections.Generic.IList ScoringProfiles { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SemanticSearch SemanticSearch { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm Similarity { get { throw null; } set { } } @@ -2258,7 +2036,6 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable selectors) { } + public SearchIndexerIndexProjection(System.Collections.Generic.IEnumerable selectors) { } public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjectionsParameters Parameters { get { throw null; } set { } } public System.Collections.Generic.IList Selectors { get { throw null; } } } @@ -2365,12 +2133,6 @@ public SearchIndexerIndexProjectionsParameters() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexProjectionMode? ProjectionMode { get { throw null; } set { } } } - public partial class SearchIndexerKnowledgeStoreParameters - { - public SearchIndexerKnowledgeStoreParameters() { } - public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } - public bool? SynthesizeGeneratedKeyName { get { throw null; } set { } } - } public partial class SearchIndexerLimits { internal SearchIndexerLimits() { } @@ -2394,7 +2156,7 @@ public SearchIndexerSkillset(string name, System.Collections.Generic.IEnumerable public string Description { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjections IndexProjections { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjection IndexProjection { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.KnowledgeStore KnowledgeStore { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Skills { get { throw null; } } @@ -2434,7 +2196,6 @@ public partial class SearchResourceEncryptionKey public SearchResourceEncryptionKey(System.Uri vaultUri, string keyName, string keyVersion) { } public string ApplicationId { get { throw null; } set { } } public string ApplicationSecret { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } public string KeyName { get { throw null; } } public string KeyVersion { get { throw null; } } public System.Uri VaultUri { get { throw null; } } @@ -2442,7 +2203,6 @@ public SearchResourceEncryptionKey(System.Uri vaultUri, string keyName, string k public partial class SearchServiceCounters { internal SearchServiceCounters() { } - public Azure.Search.Documents.Indexes.Models.SearchResourceCounter AliasCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter DataSourceCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter DocumentCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter IndexCounter { get { throw null; } } @@ -2586,7 +2346,6 @@ public SimpleField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool IsHidden { get { throw null; } set { } } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } } public partial class SnowballTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { @@ -3047,7 +2806,7 @@ public partial class VectorSearch { public VectorSearch() { } public System.Collections.Generic.IList Algorithms { get { throw null; } } - public System.Collections.Generic.IList Compressions { get { throw null; } } + public System.Collections.Generic.IList Compressions { get { throw null; } } public System.Collections.Generic.IList Profiles { get { throw null; } } public System.Collections.Generic.IList Vectorizers { get { throw null; } } } @@ -3076,28 +2835,28 @@ protected VectorSearchAlgorithmConfiguration(string name) { } public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchAlgorithmMetric left, Azure.Search.Documents.Indexes.Models.VectorSearchAlgorithmMetric right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class VectorSearchCompressionConfiguration + public abstract partial class VectorSearchCompression { - protected VectorSearchCompressionConfiguration(string name) { } + protected VectorSearchCompression(string compressionName) { } + public string CompressionName { get { throw null; } } public double? DefaultOversampling { get { throw null; } set { } } - public string Name { get { throw null; } set { } } public bool? RerankWithOriginalVectors { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorSearchCompressionTargetDataType : System.IEquatable + public readonly partial struct VectorSearchCompressionTarget : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public VectorSearchCompressionTargetDataType(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType Int8 { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType other) { throw null; } + public VectorSearchCompressionTarget(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget Int8 { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType right) { throw null; } + public static bool operator ==(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget right) { throw null; } public override string ToString() { throw null; } } public partial class VectorSearchField : Azure.Search.Documents.Indexes.Models.SearchFieldTemplate @@ -3113,19 +2872,14 @@ public partial class VectorSearchProfile { public VectorSearchProfile(string name, string algorithmConfigurationName) { } public string AlgorithmConfigurationName { get { throw null; } set { } } - public string CompressionConfigurationName { get { throw null; } set { } } + public string CompressionName { get { throw null; } set { } } public string Name { get { throw null; } set { } } - public string Vectorizer { get { throw null; } set { } } + public string VectorizerName { get { throw null; } set { } } } public abstract partial class VectorSearchVectorizer { - protected VectorSearchVectorizer(string name) { } - public string Name { get { throw null; } set { } } - } - public partial class VisionVectorizeSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill - { - public VisionVectorizeSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, string modelVersion) { } - public string ModelVersion { get { throw null; } set { } } + protected VectorSearchVectorizer(string vectorizerName) { } + public string VectorizerName { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VisualFeature : System.IEquatable @@ -3162,6 +2916,21 @@ public WebApiSkill(System.Collections.Generic.IEnumerable HttpHeaders { get { throw null; } } + public string HttpMethod { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } public partial class WordDelimiterTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public WordDelimiterTokenFilter(string name) { } @@ -3197,11 +2966,6 @@ internal AutocompleteResults() { } public double? Coverage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } - public partial class DocumentDebugInfo - { - internal DocumentDebugInfo() { } - public Azure.Search.Documents.Models.SemanticDebugInfo Semantic { get { throw null; } } - } public partial class FacetResult : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IReadOnlyDictionary, System.Collections.IEnumerable { internal FacetResult() { } @@ -3226,30 +2990,6 @@ public enum FacetType Value = 0, Range = 1, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HybridCountAndFacetMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridCountAndFacetMode(string value) { throw null; } - public static Azure.Search.Documents.Models.HybridCountAndFacetMode CountAllResults { get { throw null; } } - public static Azure.Search.Documents.Models.HybridCountAndFacetMode CountRetrievableResults { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.HybridCountAndFacetMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Models.HybridCountAndFacetMode left, Azure.Search.Documents.Models.HybridCountAndFacetMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.HybridCountAndFacetMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.HybridCountAndFacetMode left, Azure.Search.Documents.Models.HybridCountAndFacetMode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class HybridSearch - { - public HybridSearch() { } - public Azure.Search.Documents.Models.HybridCountAndFacetMode? CountAndFacetMode { get { throw null; } set { } } - public int? MaxTextRecallSize { get { throw null; } set { } } - } public partial class IndexActionCompletedEventArgs : Azure.Search.Documents.Models.IndexActionEventArgs { public IndexActionCompletedEventArgs(Azure.Search.Documents.SearchIndexingBufferedSender sender, Azure.Search.Documents.Models.IndexDocumentsAction action, Azure.Search.Documents.Models.IndexingResult result, bool isRunningSynchronously, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) : base (default(Azure.Search.Documents.SearchIndexingBufferedSender), default(Azure.Search.Documents.Models.IndexDocumentsAction), default(bool), default(System.Threading.CancellationToken)) { } @@ -3380,143 +3120,6 @@ internal QueryCaptionResult() { } public static bool operator !=(Azure.Search.Documents.Models.QueryCaptionType left, Azure.Search.Documents.Models.QueryCaptionType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QueryDebugMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QueryDebugMode(string value) { throw null; } - public static Azure.Search.Documents.Models.QueryDebugMode Disabled { get { throw null; } } - public static Azure.Search.Documents.Models.QueryDebugMode Semantic { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QueryDebugMode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Models.QueryDebugMode left, Azure.Search.Documents.Models.QueryDebugMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QueryDebugMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QueryDebugMode left, Azure.Search.Documents.Models.QueryDebugMode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QueryLanguage : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QueryLanguage(string value) { throw null; } - public static Azure.Search.Documents.Models.QueryLanguage ArEg { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArJo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArKw { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArMa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArSa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage BgBg { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage BnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage CaEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage CsCz { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage DaDk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage DeDe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ElGr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnAu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnCa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnGb { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnUs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EsEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EsMx { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EtEe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EuEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FaAe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FiFi { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FrCa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FrFr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GaIe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GlEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GuIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HeIl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HiIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HrBa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HrHr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HuHu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HyAm { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage IdId { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage IsIs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ItIt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage JaJp { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage KnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage KoKr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage LtLt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage LvLv { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MlIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MrIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MsBn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MsMy { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NbNo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NlBe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NlNl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage None { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NoNo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PaIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PlPl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PtBr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PtPt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage RoRo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage RuRu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SkSk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SlSl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrBa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrMe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrRs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SvSe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TaIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TeIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ThTh { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TrTr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage UkUa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage UrPk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ViVn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ZhCn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ZhTw { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QueryLanguage other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QueryLanguage (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } - public override string ToString() { throw null; } - } - public partial class QueryResultDocumentRerankerInput - { - internal QueryResultDocumentRerankerInput() { } - public string Content { get { throw null; } } - public string Keywords { get { throw null; } } - public string Title { get { throw null; } } - } - public partial class QueryResultDocumentSemanticField - { - internal QueryResultDocumentSemanticField() { } - public string Name { get { throw null; } } - public Azure.Search.Documents.Models.SemanticFieldState? State { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QuerySpellerType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QuerySpellerType(string value) { throw null; } - public static Azure.Search.Documents.Models.QuerySpellerType Lexicon { get { throw null; } } - public static Azure.Search.Documents.Models.QuerySpellerType None { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QuerySpellerType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Models.QuerySpellerType left, Azure.Search.Documents.Models.QuerySpellerType right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QuerySpellerType (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QuerySpellerType left, Azure.Search.Documents.Models.QuerySpellerType right) { throw null; } - public override string ToString() { throw null; } - } public partial class RangeFacetResult where T : struct { public RangeFacetResult(long count, T? from, T? to) { } @@ -3524,17 +3127,6 @@ public RangeFacetResult(long count, T? from, T? to) { } public T? From { get { throw null; } } public T? To { get { throw null; } } } - public partial class ResetDocumentOptions - { - public ResetDocumentOptions() { } - public System.Collections.Generic.IList DataSourceDocumentIds { get { throw null; } } - public System.Collections.Generic.IList DocumentKeys { get { throw null; } } - } - public partial class ResetSkillsOptions - { - public ResetSkillsOptions() { } - public System.Collections.Generic.IList SkillNames { get { throw null; } } - } public enum ScoringStatistics { Local = 0, @@ -3594,23 +3186,17 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.CognitiveServicesAccount CognitiveServicesAccount(string oDataType, string description) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataChangeDetectionPolicy DataChangeDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy DataDeletionDetectionPolicy(string oDataType) { throw null; } - public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null) { throw null; } public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable results) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexerState currentState = null, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList errors, System.Collections.Generic.IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialChangeTrackingState = null, string allDocumentsFinalChangeTrackingState = null, string resetDocumentsInitialChangeTrackingState = null, string resetDocumentsFinalChangeTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null) { throw null; } public static Azure.Search.Documents.Models.IndexingResult IndexingResult(string key, string errorMessage, bool succeeded, int status) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalAnalyzer LexicalAnalyzer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalTokenizer LexicalTokenizer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Models.QueryAnswerResult QueryAnswerResult(double? score = default(double?), string key = null, string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } - public static Azure.Search.Documents.Models.QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) { throw null; } - public static Azure.Search.Documents.Models.QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, Azure.Search.Documents.Models.SemanticFieldState? state = default(Azure.Search.Documents.Models.SemanticFieldState?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.ScoringFunction ScoringFunction(string type, string fieldName, double boost, Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation? interpolation) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerError SearchIndexerError(string key, string errorMessage, int statusCode, string name, string details, string documentationLink) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerLimits SearchIndexerLimits(System.TimeSpan? maxRunTime, long? maxDocumentExtractionSize, long? maxDocumentContentCharactersToExtract) { throw null; } @@ -3634,15 +3220,12 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter vectorIndexSizeCounter = null) { throw null; } - public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter aliasCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter vectorIndexSizeCounter = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex, int? maxFieldNestingDepthPerIndex, int? maxComplexCollectionFieldsPerIndex, int? maxComplexObjectsInCollectionsPerDocument) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex = default(int?), int? maxFieldNestingDepthPerIndex = default(int?), int? maxComplexCollectionFieldsPerIndex = default(int?), int? maxComplexObjectsInCollectionsPerDocument = default(int?), long? maxStoragePerIndexInBytes = default(long?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchServiceStatistics SearchServiceStatistics(Azure.Search.Documents.Indexes.Models.SearchServiceCounters counters, Azure.Search.Documents.Indexes.Models.SearchServiceLimits limits) { throw null; } public static Azure.Search.Documents.Models.SearchSuggestion SearchSuggestion(T document, string text) { throw null; } - public static Azure.Search.Documents.Models.SemanticDebugInfo SemanticDebugInfo(Azure.Search.Documents.Models.QueryResultDocumentSemanticField titleField = null, System.Collections.Generic.IEnumerable contentFields = null, System.Collections.Generic.IEnumerable keywordFields = null, Azure.Search.Documents.Models.QueryResultDocumentRerankerInput rerankerInput = null) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType) { throw null; } public static Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm SimilarityAlgorithm(string oDataType) { throw null; } @@ -3680,30 +3263,16 @@ public partial class SearchResult { internal SearchResult() { } public T Document { get { throw null; } } - public System.Collections.Generic.IList DocumentDebugInfo { get { throw null; } } public System.Collections.Generic.IDictionary> Highlights { get { throw null; } } public double? Score { get { throw null; } } public Azure.Search.Documents.Models.SemanticSearchResult SemanticSearch { get { throw null; } } } - public partial class SearchScoreThreshold : Azure.Search.Documents.Models.VectorThreshold - { - public SearchScoreThreshold(double value) { } - public double Value { get { throw null; } set { } } - } public partial class SearchSuggestion { internal SearchSuggestion() { } public T Document { get { throw null; } } public string Text { get { throw null; } } } - public partial class SemanticDebugInfo - { - internal SemanticDebugInfo() { } - public System.Collections.Generic.IReadOnlyList ContentFields { get { throw null; } } - public System.Collections.Generic.IReadOnlyList KeywordFields { get { throw null; } } - public Azure.Search.Documents.Models.QueryResultDocumentRerankerInput RerankerInput { get { throw null; } } - public Azure.Search.Documents.Models.QueryResultDocumentSemanticField TitleField { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SemanticErrorMode : System.IEquatable { @@ -3741,35 +3310,14 @@ internal SemanticDebugInfo() { } public static bool operator !=(Azure.Search.Documents.Models.SemanticErrorReason left, Azure.Search.Documents.Models.SemanticErrorReason right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SemanticFieldState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SemanticFieldState(string value) { throw null; } - public static Azure.Search.Documents.Models.SemanticFieldState Partial { get { throw null; } } - public static Azure.Search.Documents.Models.SemanticFieldState Unused { get { throw null; } } - public static Azure.Search.Documents.Models.SemanticFieldState Used { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.SemanticFieldState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Search.Documents.Models.SemanticFieldState left, Azure.Search.Documents.Models.SemanticFieldState right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.SemanticFieldState (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.SemanticFieldState left, Azure.Search.Documents.Models.SemanticFieldState right) { throw null; } - public override string ToString() { throw null; } - } public partial class SemanticSearchOptions { public SemanticSearchOptions() { } - public Azure.Search.Documents.Models.QueryDebugMode? Debug { get { throw null; } set { } } public Azure.Search.Documents.Models.SemanticErrorMode? ErrorMode { get { throw null; } set { } } public System.TimeSpan? MaxWait { get { throw null; } set { } } public Azure.Search.Documents.Models.QueryAnswer QueryAnswer { get { throw null; } set { } } public Azure.Search.Documents.Models.QueryCaption QueryCaption { get { throw null; } set { } } public string SemanticConfigurationName { get { throw null; } set { } } - public System.Collections.Generic.IList SemanticFields { get { throw null; } } public string SemanticQuery { get { throw null; } set { } } } public partial class SemanticSearchResult @@ -3833,16 +3381,6 @@ public ValueFacetResult(long count, T value) { } public static bool operator !=(Azure.Search.Documents.Models.VectorFilterMode left, Azure.Search.Documents.Models.VectorFilterMode right) { throw null; } public override string ToString() { throw null; } } - public partial class VectorizableImageBinaryQuery : Azure.Search.Documents.Models.VectorQuery - { - public VectorizableImageBinaryQuery() { } - public string Base64Image { get { throw null; } set { } } - } - public partial class VectorizableImageUrlQuery : Azure.Search.Documents.Models.VectorQuery - { - public VectorizableImageUrlQuery() { } - public System.Uri Url { get { throw null; } set { } } - } public partial class VectorizableTextQuery : Azure.Search.Documents.Models.VectorQuery { public VectorizableTextQuery(string text) { } @@ -3860,7 +3398,6 @@ protected VectorQuery() { } public System.Collections.Generic.IList Fields { get { throw null; } } public int? KNearestNeighborsCount { get { throw null; } set { } } public double? Oversampling { get { throw null; } set { } } - public Azure.Search.Documents.Models.VectorThreshold Threshold { get { throw null; } set { } } public float? Weight { get { throw null; } set { } } } public partial class VectorSearchOptions @@ -3869,15 +3406,6 @@ public VectorSearchOptions() { } public Azure.Search.Documents.Models.VectorFilterMode? FilterMode { get { throw null; } set { } } public System.Collections.Generic.IList Queries { get { throw null; } } } - public partial class VectorSimilarityThreshold : Azure.Search.Documents.Models.VectorThreshold - { - public VectorSimilarityThreshold(double value) { } - public double Value { get { throw null; } set { } } - } - public abstract partial class VectorThreshold - { - protected VectorThreshold() { } - } } namespace Microsoft.Extensions.Azure { @@ -3887,5 +3415,7 @@ public static partial class SearchClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddSearchClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/search/Azure.Search.Documents/assets.json b/sdk/search/Azure.Search.Documents/assets.json index 16f79264e79b5..aafd0fe3cdc6a 100644 --- a/sdk/search/Azure.Search.Documents/assets.json +++ b/sdk/search/Azure.Search.Documents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/search/Azure.Search.Documents", - "Tag": "net/search/Azure.Search.Documents_52c4e21bfa" + "Tag": "net/search/Azure.Search.Documents_cd3c397d05" } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md b/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md index 4e1d3abe45675..fbf1b051ef4e8 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md @@ -102,7 +102,6 @@ SearchIndex index = new SearchIndex("movies") SearchableField genreField = new SearchableField("genre") { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Lowercase, IsFacetable = true, IsFilterable = true }; diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md index 68d5d1654c3e2..e91fce3841615 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md @@ -13,7 +13,7 @@ We will create an instace of `SearchIndex` and define `Hotel` fields. ```C# Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Reduced_Vector_Search_Index string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; -string deploymentId = "my-text-embedding-3-small"; +string deploymentName = "my-text-embedding-3-small"; int modelDimensions = 256; // Here's the reduced model dimensions string indexName = "hotel"; @@ -34,7 +34,7 @@ SearchIndex searchIndex = new(indexName) { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -45,11 +45,11 @@ SearchIndex searchIndex = new(indexName) { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbedding3Small } } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md index acca19e1a1531..bdb591056f590 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md @@ -178,7 +178,6 @@ SearchResults response = await searchClient.SearchAsync( QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic, }); diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md index 0d9170915fa52..bf390ab2b1d61 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md @@ -11,7 +11,7 @@ We will create an instace of `SearchIndex` and define `Hotel` fields. ```C# Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Vector_Search_Index_UsingVectorizableTextQuery string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; -string deploymentId = "text-embedding-ada-002"; +string deploymentName = "text-embedding-ada-002"; int modelDimensions = 1536; string indexName = "hotel"; @@ -32,7 +32,7 @@ SearchIndex searchIndex = new(indexName) { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -43,11 +43,11 @@ SearchIndex searchIndex = new(indexName) { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbeddingAda002 } } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md b/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md index 0d16a6cda6604..d06941df28b5f 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md @@ -125,7 +125,6 @@ SearchResults response = await searchClient.SearchAsync( QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic }); @@ -177,7 +176,6 @@ SearchResults response = await searchClient.SearchAsync( QueryAnswer = new(QueryAnswerType.Extractive), SemanticQuery = "Is there any hotel located on the main commercial artery of the city in the heart of New York?" }, - QueryLanguage = QueryLanguage.EnUs, }); int count = 0; diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index 93d233bb99bcf..61eee85fb9532 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -1,7 +1,7 @@ Microsoft Azure.Search.Documents client library - 11.6.0-beta.5 + 11.6.0 11.5.1 diff --git a/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs b/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs index c30acb3eae4b7..8a5c01e65ede4 100644 --- a/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs +++ b/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs @@ -144,7 +144,7 @@ public SearchIndexingBufferedSender( /// #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize void IDisposable.Dispose() => - DisposeAsync(async: false).EnsureCompleted(); + DisposeInternalAsync(async: false).EnsureCompleted(); #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize /// @@ -155,7 +155,7 @@ void IDisposable.Dispose() => /// #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize async ValueTask IAsyncDisposable.DisposeAsync() => - await DisposeAsync(async: true).ConfigureAwait(false); + await DisposeInternalAsync(async: true).ConfigureAwait(false); #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize /// @@ -165,7 +165,7 @@ async ValueTask IAsyncDisposable.DisposeAsync() => /// /// Whether to call this sync or async. /// A Task that will wait until we're disposed. - internal async Task DisposeAsync(bool async) + internal async Task DisposeInternalAsync(bool async) { if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs deleted file mode 100644 index 0be9b01ecc3a4..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents -{ - internal partial class AliasesRestClient - { - private readonly HttpPipeline _pipeline; - private readonly string _endpoint; - private readonly Guid? _xMsClientRequestId; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of AliasesRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The endpoint URL of the search service. - /// The tracking ID sent with the request to help with debugging. - /// Api Version. - /// , , or is null. - public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _xMsClientRequestId = xMsClientRequestId; - _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); - } - - internal HttpMessage CreateCreateRequest(SearchAlias @alias) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(@alias); - request.Content = content; - return message; - } - - /// Creates a new search alias. - /// The definition of the alias to create. - /// The cancellation token to use. - /// is null. - public async Task> CreateAsync(SearchAlias @alias, CancellationToken cancellationToken = default) - { - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateRequest(@alias); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new search alias. - /// The definition of the alias to create. - /// The cancellation token to use. - /// is null. - public Response Create(SearchAlias @alias, CancellationToken cancellationToken = default) - { - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateRequest(@alias); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest() - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// Lists all aliases available for a search service. - /// The cancellation token to use. - public async Task> ListAsync(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ListAliasesResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListAliasesResult.DeserializeListAliasesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all aliases available for a search service. - /// The cancellation token to use. - public Response List(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ListAliasesResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListAliasesResult.DeserializeListAliasesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string aliasName, SearchAlias @alias, string ifMatch, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Prefer", "return=representation"); - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(@alias); - request.Content = content; - return message; - } - - /// Creates a new search alias or updates an alias if it already exists. - /// The definition of the alias to create or update. - /// The definition of the alias to create or update. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// or is null. - public async Task> CreateOrUpdateAsync(string aliasName, SearchAlias @alias, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateOrUpdateRequest(aliasName, @alias, ifMatch, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new search alias or updates an alias if it already exists. - /// The definition of the alias to create or update. - /// The definition of the alias to create or update. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// or is null. - public Response CreateOrUpdate(string aliasName, SearchAlias @alias, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateOrUpdateRequest(aliasName, @alias, ifMatch, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string aliasName, string ifMatch, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// 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. - /// The name of the alias to delete. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// is null. - public async Task DeleteAsync(string aliasName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateDeleteRequest(aliasName, ifMatch, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - case 404: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// 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. - /// The name of the alias to delete. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// is null. - public Response Delete(string aliasName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateDeleteRequest(aliasName, ifMatch, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - case 404: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string aliasName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// Retrieves an alias definition. - /// The name of the alias to retrieve. - /// The cancellation token to use. - /// is null. - public async Task> GetAsync(string aliasName, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateGetRequest(aliasName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieves an alias definition. - /// The name of the alias to retrieve. - /// The cancellation token to use. - /// is null. - public Response Get(string aliasName, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateGetRequest(aliasName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs index 92d8c9916a50d..dc074f6c6e40a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs @@ -32,7 +32,7 @@ internal partial class DataSourcesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -41,7 +41,7 @@ public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache) + internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,10 +52,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIn uri.AppendPath(dataSourceName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -79,10 +75,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIn /// The definition of the datasource to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -93,7 +88,7 @@ public async Task> CreateOrUpdateAsy throw new ArgumentNullException(nameof(dataSource)); } - using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -115,10 +110,9 @@ public async Task> CreateOrUpdateAsy /// The definition of the datasource to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -129,7 +123,7 @@ public Response CreateOrUpdate(string dataSou throw new ArgumentNullException(nameof(dataSource)); } - using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs index f86ce480b4b98..735dd1c0c5c38 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs @@ -36,7 +36,7 @@ internal partial class DocumentsRestClient /// Api Version. /// , , , or is null. /// is an empty string, and was expected to be non-empty. - public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs index 6501aa941e7a7..aa690713035b8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.Search.Documents.Indexes.Models; -using Azure.Search.Documents.Models; namespace Azure.Search.Documents { @@ -33,7 +32,7 @@ internal partial class IndexersRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -102,81 +101,6 @@ public Response Reset(string indexerName, CancellationToken cancellationToken = } } - internal HttpMessage CreateResetDocsRequest(string indexerName, bool? overwrite, ResetDocumentOptions keysOrIds) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/indexers('", false); - uri.AppendPath(indexerName, true); - uri.AppendPath("')/search.resetdocs", false); - if (overwrite != null) - { - uri.AppendQuery("overwrite", overwrite.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - if (keysOrIds != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(keysOrIds); - request.Content = content; - } - return message; - } - - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// The name of the indexer to reset documents for. - /// 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. - /// The to use. - /// The cancellation token to use. - /// is null. - public async Task ResetDocsAsync(string indexerName, bool? overwrite = null, ResetDocumentOptions keysOrIds = null, CancellationToken cancellationToken = default) - { - if (indexerName == null) - { - throw new ArgumentNullException(nameof(indexerName)); - } - - using var message = CreateResetDocsRequest(indexerName, overwrite, keysOrIds); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// The name of the indexer to reset documents for. - /// 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. - /// The to use. - /// The cancellation token to use. - /// is null. - public Response ResetDocs(string indexerName, bool? overwrite = null, ResetDocumentOptions keysOrIds = null, CancellationToken cancellationToken = default) - { - if (indexerName == null) - { - throw new ArgumentNullException(nameof(indexerName)); - } - - using var message = CreateResetDocsRequest(indexerName, overwrite, keysOrIds); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateRunRequest(string indexerName) { var message = _pipeline.CreateMessage(); @@ -237,7 +161,7 @@ public Response Run(string indexerName, CancellationToken cancellationToken = de } } - internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndexer indexer, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache, bool? disableCacheReprocessingChangeDetection) + internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndexer indexer, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -248,14 +172,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndex uri.AppendPath(indexerName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } - if (disableCacheReprocessingChangeDetection != null) - { - uri.AppendQuery("disableCacheReprocessingChangeDetection", disableCacheReprocessingChangeDetection.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -279,11 +195,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndex /// The definition of the indexer to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -294,7 +208,7 @@ public async Task> CreateOrUpdateAsync(string indexerNam throw new ArgumentNullException(nameof(indexer)); } - using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -316,11 +230,9 @@ public async Task> CreateOrUpdateAsync(string indexerNam /// The definition of the indexer to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -331,7 +243,7 @@ public Response CreateOrUpdate(string indexerName, SearchIndexer throw new ArgumentNullException(nameof(indexer)); } - using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs index 81a7679c9a41a..2280480e9e27b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs @@ -32,7 +32,7 @@ internal partial class IndexesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs deleted file mode 100644 index 4f640c436afe2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AIServicesVisionParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ModelVersion != null) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - else - { - writer.WriteNull("modelVersion"); - } - writer.WritePropertyName("resourceUri"u8); - writer.WriteStringValue(ResourceUri.AbsoluteUri); - if (Optional.IsDefined(ApiKey)) - { - writer.WritePropertyName("apiKey"u8); - writer.WriteStringValue(ApiKey); - } - if (Optional.IsDefined(AuthIdentity)) - { - if (AuthIdentity != null) - { - writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); - } - else - { - writer.WriteNull("authIdentity"); - } - } - writer.WriteEndObject(); - } - - internal static AIServicesVisionParameters DeserializeAIServicesVisionParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - Uri resourceUri = default; - string apiKey = default; - SearchIndexerDataIdentity authIdentity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelVersion = null; - continue; - } - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceUri"u8)) - { - resourceUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("apiKey"u8)) - { - apiKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("authIdentity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - authIdentity = null; - continue; - } - authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - } - return new AIServicesVisionParameters(modelVersion, resourceUri, apiKey, authIdentity); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AIServicesVisionParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAIServicesVisionParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs deleted file mode 100644 index 0009bf7e1e56b..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the AI Services Vision parameters for vectorizing a query image or text. - public partial class AIServicesVisionParameters - { - /// Initializes a new instance of . - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// The resource URI of the AI Services resource. - /// is null. - public AIServicesVisionParameters(string modelVersion, Uri resourceUri) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - ModelVersion = modelVersion; - ResourceUri = resourceUri; - } - - /// Initializes a new instance of . - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// The resource URI of the AI Services resource. - /// API key of the designated AI Services resource. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal AIServicesVisionParameters(string modelVersion, Uri resourceUri, string apiKey, SearchIndexerDataIdentity authIdentity) - { - ModelVersion = modelVersion; - ResourceUri = resourceUri; - ApiKey = apiKey; - AuthIdentity = authIdentity; - } - - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - public string ModelVersion { get; set; } - /// The resource URI of the AI Services resource. - public Uri ResourceUri { get; set; } - /// API key of the designated AI Services resource. - public string ApiKey { get; set; } - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs deleted file mode 100644 index 19e9e761c2b9c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AIServicesVisionVectorizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AIServicesVisionParameters)) - { - writer.WritePropertyName("aiServicesVisionParameters"u8); - writer.WriteObjectValue(AIServicesVisionParameters); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static AIServicesVisionVectorizer DeserializeAIServicesVisionVectorizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AIServicesVisionParameters aiServicesVisionParameters = default; - string name = default; - VectorSearchVectorizerKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("aiServicesVisionParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aiServicesVisionParameters = AIServicesVisionParameters.DeserializeAIServicesVisionParameters(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorSearchVectorizerKind(property.Value.GetString()); - continue; - } - } - return new AIServicesVisionVectorizer(name, kind, aiServicesVisionParameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AIServicesVisionVectorizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAIServicesVisionVectorizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs deleted file mode 100644 index 571ffe2d49776..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the AI Services Vision parameters for vectorizing a query image or text. - public partial class AIServicesVisionVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AIServicesVisionVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.AIServicesVision; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Contains the parameters specific to AI Services Vision embedding vectorization. - internal AIServicesVisionVectorizer(string name, VectorSearchVectorizerKind kind, AIServicesVisionParameters aiServicesVisionParameters) : base(name, kind) - { - AIServicesVisionParameters = aiServicesVisionParameters; - Kind = kind; - } - - /// Contains the parameters specific to AI Services Vision embedding vectorization. - public AIServicesVisionParameters AIServicesVisionParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs deleted file mode 100644 index a39bd282dc8d8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// The name of the embedding model from the Azure AI Studio Catalog that will be called. - public readonly partial struct AIStudioModelCatalogName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AIStudioModelCatalogName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OpenAIClipImageTextEmbeddingsVitBasePatch32Value = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32"; - private const string OpenAIClipImageTextEmbeddingsViTLargePatch14336Value = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336"; - private const string FacebookDinoV2ImageEmbeddingsViTBaseValue = "Facebook-DinoV2-Image-Embeddings-ViT-Base"; - private const string FacebookDinoV2ImageEmbeddingsViTGiantValue = "Facebook-DinoV2-Image-Embeddings-ViT-Giant"; - private const string CohereEmbedV3EnglishValue = "Cohere-embed-v3-english"; - private const string CohereEmbedV3MultilingualValue = "Cohere-embed-v3-multilingual"; - - /// OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32. - public static AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get; } = new AIStudioModelCatalogName(OpenAIClipImageTextEmbeddingsVitBasePatch32Value); - /// OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336. - public static AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsViTLargePatch14336 { get; } = new AIStudioModelCatalogName(OpenAIClipImageTextEmbeddingsViTLargePatch14336Value); - /// Facebook-DinoV2-Image-Embeddings-ViT-Base. - public static AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get; } = new AIStudioModelCatalogName(FacebookDinoV2ImageEmbeddingsViTBaseValue); - /// Facebook-DinoV2-Image-Embeddings-ViT-Giant. - public static AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get; } = new AIStudioModelCatalogName(FacebookDinoV2ImageEmbeddingsViTGiantValue); - /// Cohere-embed-v3-english. - public static AIStudioModelCatalogName CohereEmbedV3English { get; } = new AIStudioModelCatalogName(CohereEmbedV3EnglishValue); - /// Cohere-embed-v3-multilingual. - public static AIStudioModelCatalogName CohereEmbedV3Multilingual { get; } = new AIStudioModelCatalogName(CohereEmbedV3MultilingualValue); - /// Determines if two values are the same. - public static bool operator ==(AIStudioModelCatalogName left, AIStudioModelCatalogName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AIStudioModelCatalogName left, AIStudioModelCatalogName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AIStudioModelCatalogName(string value) => new AIStudioModelCatalogName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AIStudioModelCatalogName other && Equals(other); - /// - public bool Equals(AIStudioModelCatalogName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs index f3416858af7ff..2235bef4a688d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs @@ -27,11 +27,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tokenizer"u8); writer.WriteStringValue(TokenizerName.Value.ToString()); } - if (Optional.IsDefined(NormalizerName)) - { - writer.WritePropertyName("normalizer"u8); - writer.WriteStringValue(NormalizerName.Value.ToString()); - } if (Optional.IsCollectionDefined(TokenFilters)) { writer.WritePropertyName("tokenFilters"u8); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs index e05de3bfdeb8e..688a7d301346e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs @@ -27,17 +27,15 @@ public AnalyzeTextOptions(string text) /// Initializes a new instance of . /// The text to break into tokens. - /// The name of the analyzer to use to break the given text. - /// The name of the tokenizer to use to break the given text. - /// The name of the normalizer to use to normalize the given text. - /// An optional list of token filters to use when breaking the given text. - /// An optional list of character filters to use when breaking the given text. - internal AnalyzeTextOptions(string text, LexicalAnalyzerName? analyzerName, LexicalTokenizerName? tokenizerName, LexicalNormalizerName? normalizerName, IList tokenFilters, IList charFilters) + /// The name of the analyzer to use to break the given text. If this parameter is not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually exclusive. + /// The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. + /// An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. + /// An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. + internal AnalyzeTextOptions(string text, LexicalAnalyzerName? analyzerName, LexicalTokenizerName? tokenizerName, IList tokenFilters, IList charFilters) { Text = text; AnalyzerName = analyzerName; TokenizerName = tokenizerName; - NormalizerName = normalizerName; TokenFilters = tokenFilters; CharFilters = charFilters; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs deleted file mode 100644 index 90e61a6cdd1a6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ScoringUri != null) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(ScoringUri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - if (Optional.IsDefined(AuthenticationKey)) - { - if (AuthenticationKey != null) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(AuthenticationKey); - } - else - { - writer.WriteNull("key"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - if (Optional.IsDefined(Region)) - { - if (Region != null) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - else - { - writer.WriteNull("region"); - } - } - if (Optional.IsDefined(ModelName)) - { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static AzureMachineLearningParameters DeserializeAzureMachineLearningParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri uri = default; - string key = default; - string resourceId = default; - TimeSpan? timeout = default; - string region = default; - AIStudioModelCatalogName? modelName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("key"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("region"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - region = null; - continue; - } - region = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modelName = new AIStudioModelCatalogName(property.Value.GetString()); - continue; - } - } - return new AzureMachineLearningParameters( - uri, - key, - resourceId, - timeout, - region, - modelName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AzureMachineLearningParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs deleted file mode 100644 index 98d1b67d46aea..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the properties for connecting to an AML vectorizer. - public partial class AzureMachineLearningParameters - { - /// Initializes a new instance of . - /// (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. - public AzureMachineLearningParameters(Uri scoringUri) - { - ScoringUri = scoringUri; - } - - /// Initializes a new instance of . - /// (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. - /// (Required for key authentication) The key for the AML service. - /// (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}. - /// (Optional) When specified, indicates the timeout for the http client making the API call. - /// (Optional for token authentication). The region the AML service is deployed in. - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. - internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, AIStudioModelCatalogName? modelName) - { - ScoringUri = scoringUri; - AuthenticationKey = authenticationKey; - ResourceId = resourceId; - Timeout = timeout; - Region = region; - ModelName = modelName; - } - - /// (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. - public Uri ScoringUri { get; set; } - /// (Required for key authentication) The key for the AML service. - public string AuthenticationKey { get; set; } - /// (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}. - public string ResourceId { get; set; } - /// (Optional) When specified, indicates the timeout for the http client making the API call. - public TimeSpan? Timeout { get; set; } - /// (Optional for token authentication). The region the AML service is deployed in. - public string Region { get; set; } - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. - public AIStudioModelCatalogName? ModelName { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs deleted file mode 100644 index 3e61c144e65fd..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningSkill : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ScoringUri)) - { - if (ScoringUri != null) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(ScoringUri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(AuthenticationKey)) - { - if (AuthenticationKey != null) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(AuthenticationKey); - } - else - { - writer.WriteNull("key"); - } - } - if (Optional.IsDefined(RawResourceId)) - { - if (RawResourceId != null) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(RawResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - if (Optional.IsDefined(RawLocation)) - { - if (RawLocation != null) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(RawLocation); - } - else - { - writer.WriteNull("region"); - } - } - if (Optional.IsDefined(DegreeOfParallelism)) - { - if (DegreeOfParallelism != null) - { - writer.WritePropertyName("degreeOfParallelism"u8); - writer.WriteNumberValue(DegreeOfParallelism.Value); - } - else - { - writer.WriteNull("degreeOfParallelism"); - } - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Context)) - { - writer.WritePropertyName("context"u8); - writer.WriteStringValue(Context); - } - writer.WritePropertyName("inputs"u8); - writer.WriteStartArray(); - foreach (var item in Inputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static AzureMachineLearningSkill DeserializeAzureMachineLearningSkill(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri uri = default; - string key = default; - string resourceId = default; - TimeSpan? timeout = default; - string region = default; - int? degreeOfParallelism = default; - string odataType = default; - string name = default; - string description = default; - string context = default; - IList inputs = default; - IList outputs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("key"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("region"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - region = null; - continue; - } - region = property.Value.GetString(); - continue; - } - if (property.NameEquals("degreeOfParallelism"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - degreeOfParallelism = null; - continue; - } - degreeOfParallelism = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("context"u8)) - { - context = property.Value.GetString(); - continue; - } - if (property.NameEquals("inputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); - } - inputs = array; - continue; - } - if (property.NameEquals("outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); - } - outputs = array; - continue; - } - } - return new AzureMachineLearningSkill( - odataType, - name, - description, - context, - inputs, - outputs, - uri, - key, - resourceId, - timeout, - region, - degreeOfParallelism); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AzureMachineLearningSkill FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningSkill(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs deleted file mode 100644 index a8485c08910d7..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// 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. - public partial class AzureMachineLearningSkill : SearchIndexerSkill - { - /// Initializes a new instance of . - /// A URI fragment specifying the type of skill. - /// 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 '#'. - /// The description of the skill which describes the inputs, outputs, and usage of the skill. - /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// (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. - /// (Required for key authentication) The key for the AML service. - /// (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}. - /// (Optional) When specified, indicates the timeout for the http client making the API call. - /// (Optional for token authentication). The region the AML service is deployed in. - /// (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. - internal AzureMachineLearningSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, Uri scoringUri, string authenticationKey, string rawResourceId, TimeSpan? timeout, string rawLocation, int? degreeOfParallelism) : base(oDataType, name, description, context, inputs, outputs) - { - ScoringUri = scoringUri; - AuthenticationKey = authenticationKey; - RawResourceId = rawResourceId; - Timeout = timeout; - RawLocation = rawLocation; - DegreeOfParallelism = degreeOfParallelism; - ODataType = oDataType ?? "#Microsoft.Skills.Custom.AmlSkill"; - } - /// (Optional) When specified, indicates the timeout for the http client making the API call. - public TimeSpan? Timeout { get; set; } - /// (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. - public int? DegreeOfParallelism { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs deleted file mode 100644 index 3425f3fcadd6a..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningVectorizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AMLParameters)) - { - writer.WritePropertyName("amlParameters"u8); - writer.WriteObjectValue(AMLParameters); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static AzureMachineLearningVectorizer DeserializeAzureMachineLearningVectorizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureMachineLearningParameters amlParameters = default; - string name = default; - VectorSearchVectorizerKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("amlParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - amlParameters = AzureMachineLearningParameters.DeserializeAzureMachineLearningParameters(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorSearchVectorizerKind(property.Value.GetString()); - continue; - } - } - return new AzureMachineLearningVectorizer(name, kind, amlParameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AzureMachineLearningVectorizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningVectorizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs deleted file mode 100644 index 884920750f349..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog for generating the vector embedding of a query string. - public partial class AzureMachineLearningVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AzureMachineLearningVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.AML; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Specifies the properties of the AML vectorizer. - internal AzureMachineLearningVectorizer(string name, VectorSearchVectorizerKind kind, AzureMachineLearningParameters amlParameters) : base(name, kind) - { - AMLParameters = amlParameters; - Kind = kind; - } - - /// Specifies the properties of the AML vectorizer. - public AzureMachineLearningParameters AMLParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs index 4ef9fa67bbc68..ac23ccb14245c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs @@ -34,22 +34,22 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceUri"u8); writer.WriteStringValue(ResourceUri.AbsoluteUri); } - if (Optional.IsDefined(DeploymentId)) + if (Optional.IsDefined(DeploymentName)) { writer.WritePropertyName("deploymentId"u8); - writer.WriteStringValue(DeploymentId); + writer.WriteStringValue(DeploymentName); } if (Optional.IsDefined(ApiKey)) { writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); } - if (Optional.IsDefined(AuthIdentity)) + if (Optional.IsDefined(AuthenticationIdentity)) { - if (AuthIdentity != null) + if (AuthenticationIdentity != null) { writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); + writer.WriteObjectValue(AuthenticationIdentity); } else { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs index ef9a3b6f4e2b5..0f9de43318f32 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs @@ -34,21 +34,21 @@ public AzureOpenAIEmbeddingSkill(IEnumerable inputs, IEn /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. /// The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. /// The resource URI of the Azure OpenAI resource. - /// ID of the Azure OpenAI model deployment on the designated resource. + /// ID of the Azure OpenAI model deployment on the designated resource. /// API key of the designated Azure OpenAI resource. - /// + /// /// The user-assigned managed identity used for outbound connections. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// The name of the embedding model that is deployed at the provided deploymentId path. - internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? dimensions, Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName) : base(oDataType, name, description, context, inputs, outputs) + internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? dimensions, Uri resourceUri, string deploymentName, string apiKey, SearchIndexerDataIdentity authenticationIdentity, AzureOpenAIModelName? modelName) : base(oDataType, name, description, context, inputs, outputs) { Dimensions = dimensions; ResourceUri = resourceUri; - DeploymentId = deploymentId; + DeploymentName = deploymentName; ApiKey = apiKey; - AuthIdentity = authIdentity; + AuthenticationIdentity = authenticationIdentity; ModelName = modelName; ODataType = oDataType ?? "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"; } @@ -58,7 +58,7 @@ internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string descrip /// The resource URI of the Azure OpenAI resource. public Uri ResourceUri { get; set; } /// ID of the Azure OpenAI model deployment on the designated resource. - public string DeploymentId { get; set; } + public string DeploymentName { get; set; } /// API key of the designated Azure OpenAI resource. public string ApiKey { get; set; } /// @@ -66,7 +66,7 @@ internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string descrip /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } + public SearchIndexerDataIdentity AuthenticationIdentity { get; set; } /// The name of the embedding model that is deployed at the provided deploymentId path. public AzureOpenAIModelName? ModelName { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs index 98b6d6cabd965..3e360a0ee115e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs @@ -25,7 +25,6 @@ public AzureOpenAIModelName(string value) private const string TextEmbeddingAda002Value = "text-embedding-ada-002"; private const string TextEmbedding3LargeValue = "text-embedding-3-large"; private const string TextEmbedding3SmallValue = "text-embedding-3-small"; - private const string ExperimentalValue = "experimental"; /// text-embedding-ada-002. public static AzureOpenAIModelName TextEmbeddingAda002 { get; } = new AzureOpenAIModelName(TextEmbeddingAda002Value); @@ -33,8 +32,6 @@ public AzureOpenAIModelName(string value) public static AzureOpenAIModelName TextEmbedding3Large { get; } = new AzureOpenAIModelName(TextEmbedding3LargeValue); /// text-embedding-3-small. public static AzureOpenAIModelName TextEmbedding3Small { get; } = new AzureOpenAIModelName(TextEmbedding3SmallValue); - /// experimental. - public static AzureOpenAIModelName Experimental { get; } = new AzureOpenAIModelName(ExperimentalValue); /// Determines if two values are the same. public static bool operator ==(AzureOpenAIModelName left, AzureOpenAIModelName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs index 14505c71c2194..195e803075524 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs @@ -15,13 +15,13 @@ public partial class AzureOpenAIVectorizer : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(AzureOpenAIParameters)) + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("azureOpenAIParameters"u8); - writer.WriteObjectValue(AzureOpenAIParameters); + writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); @@ -33,7 +33,7 @@ internal static AzureOpenAIVectorizer DeserializeAzureOpenAIVectorizer(JsonEleme { return null; } - AzureOpenAIParameters azureOpenAIParameters = default; + AzureOpenAIVectorizerParameters azureOpenAIParameters = default; string name = default; VectorSearchVectorizerKind kind = default; foreach (var property in element.EnumerateObject()) @@ -44,7 +44,7 @@ internal static AzureOpenAIVectorizer DeserializeAzureOpenAIVectorizer(JsonEleme { continue; } - azureOpenAIParameters = AzureOpenAIParameters.DeserializeAzureOpenAIParameters(property.Value); + azureOpenAIParameters = AzureOpenAIVectorizerParameters.DeserializeAzureOpenAIVectorizerParameters(property.Value); continue; } if (property.NameEquals("name"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs index c310739603b6a..8e7280613ed0c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs @@ -13,26 +13,26 @@ namespace Azure.Search.Documents.Indexes.Models public partial class AzureOpenAIVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AzureOpenAIVectorizer(string name) : base(name) + /// The name to associate with this particular vectorization method. + /// is null. + public AzureOpenAIVectorizer(string vectorizerName) : base(vectorizerName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); Kind = VectorSearchVectorizerKind.AzureOpenAI; } /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - /// Contains the parameters specific to Azure OpenAI embedding vectorization. - internal AzureOpenAIVectorizer(string name, VectorSearchVectorizerKind kind, AzureOpenAIParameters azureOpenAIParameters) : base(name, kind) + /// Contains the parameters specific to Azure OpenAI embedding vectorization. + internal AzureOpenAIVectorizer(string vectorizerName, VectorSearchVectorizerKind kind, AzureOpenAIVectorizerParameters parameters) : base(vectorizerName, kind) { - AzureOpenAIParameters = azureOpenAIParameters; + Parameters = parameters; Kind = kind; } /// Contains the parameters specific to Azure OpenAI embedding vectorization. - public AzureOpenAIParameters AzureOpenAIParameters { get; set; } + public AzureOpenAIVectorizerParameters Parameters { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs similarity index 83% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs index efa95ab6e2f5c..ba9e814ea874f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class AzureOpenAIParameters : IUtf8JsonSerializable + public partial class AzureOpenAIVectorizerParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,22 +21,22 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceUri"u8); writer.WriteStringValue(ResourceUri.AbsoluteUri); } - if (Optional.IsDefined(DeploymentId)) + if (Optional.IsDefined(DeploymentName)) { writer.WritePropertyName("deploymentId"u8); - writer.WriteStringValue(DeploymentId); + writer.WriteStringValue(DeploymentName); } if (Optional.IsDefined(ApiKey)) { writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); } - if (Optional.IsDefined(AuthIdentity)) + if (Optional.IsDefined(AuthenticationIdentity)) { - if (AuthIdentity != null) + if (AuthenticationIdentity != null) { writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); + writer.WriteObjectValue(AuthenticationIdentity); } else { @@ -51,7 +51,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AzureOpenAIParameters DeserializeAzureOpenAIParameters(JsonElement element) + internal static AzureOpenAIVectorizerParameters DeserializeAzureOpenAIVectorizerParameters(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -103,15 +103,15 @@ internal static AzureOpenAIParameters DeserializeAzureOpenAIParameters(JsonEleme continue; } } - return new AzureOpenAIParameters(resourceUri, deploymentId, apiKey, authIdentity, modelName); + return new AzureOpenAIVectorizerParameters(resourceUri, deploymentId, apiKey, authIdentity, modelName); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AzureOpenAIParameters FromResponse(Response response) + internal static AzureOpenAIVectorizerParameters FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureOpenAIParameters(document.RootElement); + return DeserializeAzureOpenAIVectorizerParameters(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs similarity index 75% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs index 33725e89005ff..9243c5e40dfcb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs @@ -10,36 +10,36 @@ namespace Azure.Search.Documents.Indexes.Models { /// Specifies the parameters for connecting to the Azure OpenAI resource. - public partial class AzureOpenAIParameters + public partial class AzureOpenAIVectorizerParameters { - /// Initializes a new instance of . - public AzureOpenAIParameters() + /// Initializes a new instance of . + public AzureOpenAIVectorizerParameters() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The resource URI of the Azure OpenAI resource. - /// ID of the Azure OpenAI model deployment on the designated resource. + /// ID of the Azure OpenAI model deployment on the designated resource. /// API key of the designated Azure OpenAI resource. - /// + /// /// The user-assigned managed identity used for outbound connections. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// The name of the embedding model that is deployed at the provided deploymentId path. - internal AzureOpenAIParameters(Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName) + internal AzureOpenAIVectorizerParameters(Uri resourceUri, string deploymentName, string apiKey, SearchIndexerDataIdentity authenticationIdentity, AzureOpenAIModelName? modelName) { ResourceUri = resourceUri; - DeploymentId = deploymentId; + DeploymentName = deploymentName; ApiKey = apiKey; - AuthIdentity = authIdentity; + AuthenticationIdentity = authenticationIdentity; ModelName = modelName; } /// The resource URI of the Azure OpenAI resource. public Uri ResourceUri { get; set; } /// ID of the Azure OpenAI model deployment on the designated resource. - public string DeploymentId { get; set; } + public string DeploymentName { get; set; } /// API key of the designated Azure OpenAI resource. public string ApiKey { get; set; } /// @@ -47,7 +47,7 @@ internal AzureOpenAIParameters(Uri resourceUri, string deploymentId, string apiK /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } + public SearchIndexerDataIdentity AuthenticationIdentity { get; set; } /// The name of the embedding model that is deployed at the provided deploymentId path. public AzureOpenAIModelName? ModelName { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs new file mode 100644 index 0000000000000..37d081cb707e0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class BinaryQuantizationCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(CompressionName); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(RerankWithOriginalVectors)) + { + writer.WritePropertyName("rerankWithOriginalVectors"u8); + writer.WriteBooleanValue(RerankWithOriginalVectors.Value); + } + if (Optional.IsDefined(DefaultOversampling)) + { + if (DefaultOversampling != null) + { + writer.WritePropertyName("defaultOversampling"u8); + writer.WriteNumberValue(DefaultOversampling.Value); + } + else + { + writer.WriteNull("defaultOversampling"); + } + } + writer.WriteEndObject(); + } + + internal static BinaryQuantizationCompression DeserializeBinaryQuantizationCompression(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + VectorSearchCompressionKind kind = default; + bool? rerankWithOriginalVectors = default; + double? defaultOversampling = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new VectorSearchCompressionKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("rerankWithOriginalVectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rerankWithOriginalVectors = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultOversampling"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultOversampling = null; + continue; + } + defaultOversampling = property.Value.GetDouble(); + continue; + } + } + return new BinaryQuantizationCompression(name, kind, rerankWithOriginalVectors, defaultOversampling); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new BinaryQuantizationCompression FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBinaryQuantizationCompression(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs new file mode 100644 index 0000000000000..bb4b2a87dbd25 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Contains configuration options specific to the binary quantization compression method used during indexing and querying. + public partial class BinaryQuantizationCompression : VectorSearchCompression + { + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + public BinaryQuantizationCompression(string compressionName) : base(compressionName) + { + Argument.AssertNotNull(compressionName, nameof(compressionName)); + + Kind = VectorSearchCompressionKind.BinaryQuantization; + } + + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// The name of the kind of compression method being configured for use with vector search. + /// 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. + /// 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. + internal BinaryQuantizationCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) + { + Kind = kind; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs deleted file mode 100644 index 5d13697add04e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class CustomNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TokenFilters)) - { - writer.WritePropertyName("tokenFilters"u8); - writer.WriteStartArray(); - foreach (var item in TokenFilters) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CharFilters)) - { - writer.WritePropertyName("charFilters"u8); - writer.WriteStartArray(); - foreach (var item in CharFilters) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static CustomNormalizer DeserializeCustomNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList tokenFilters = default; - IList charFilters = default; - string odataType = default; - string name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tokenFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new TokenFilterName(item.GetString())); - } - tokenFilters = array; - continue; - } - if (property.NameEquals("charFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new CharFilterName(item.GetString())); - } - charFilters = array; - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new CustomNormalizer(odataType, name, tokenFilters ?? new ChangeTrackingList(), charFilters ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomNormalizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs deleted file mode 100644 index df041df222cc6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Allows you to configure normalization for filterable, sortable, and facetable fields, which by default operate with strict matching. This is a user-defined configuration consisting of at least one or more filters, which modify the token that is stored. - public partial class CustomNormalizer : LexicalNormalizer - { - /// Initializes a new instance of . - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// is null. - public CustomNormalizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - TokenFilters = new ChangeTrackingList(); - CharFilters = new ChangeTrackingList(); - ODataType = "#Microsoft.Azure.Search.CustomNormalizer"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// A list of token filters used to filter out or modify the input token. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - /// A list of character filters used to prepare input text before it is processed. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - internal CustomNormalizer(string oDataType, string name, IList tokenFilters, IList charFilters) : base(oDataType, name) - { - TokenFilters = tokenFilters; - CharFilters = charFilters; - ODataType = oDataType ?? "#Microsoft.Azure.Search.CustomNormalizer"; - } - - /// A list of token filters used to filter out or modify the input token. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - public IList TokenFilters { get; } - /// A list of character filters used to prepare input text before it is processed. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - public IList CharFilters { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs deleted file mode 100644 index e0055cc33b97f..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies a user-defined vectorizer for generating the vector embedding of a query string. Integration of an external vectorizer is achieved using the custom Web API interface of a skillset. - public partial class CustomVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public CustomVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.CustomWebApi; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Specifies the properties of the user-defined vectorizer. - internal CustomVectorizer(string name, VectorSearchVectorizerKind kind, CustomWebApiParameters customWebApiParameters) : base(name, kind) - { - CustomWebApiParameters = customWebApiParameters; - Kind = kind; - } - - /// Specifies the properties of the user-defined vectorizer. - public CustomWebApiParameters CustomWebApiParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs index c578cd762c2f0..3975605c802ac 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs @@ -31,7 +31,6 @@ internal static DataDeletionDetectionPolicy DeserializeDataDeletionDetectionPoli { switch (discriminator.GetString()) { - case "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy": return NativeBlobSoftDeleteDeletionDetectionPolicy.DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(element); case "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy": return SoftDeleteColumnDeletionDetectionPolicy.DeserializeSoftDeleteColumnDeletionDetectionPolicy(element); } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs index b586a85a237ee..cf740ada873d1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for data deletion detection policies. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// public partial class DataDeletionDetectionPolicy { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs deleted file mode 100644 index 41cfea5bf6fd2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class DocumentDebugInfo - { - internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SemanticDebugInfo semantic = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("semantic"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - semantic = SemanticDebugInfo.DeserializeSemanticDebugInfo(property.Value); - continue; - } - } - return new DocumentDebugInfo(semantic); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DocumentDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs deleted file mode 100644 index d01ecd031741e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Contains debugging information that can be used to further explore your search results. - public partial class DocumentDebugInfo - { - /// Initializes a new instance of . - internal DocumentDebugInfo() - { - } - - /// Initializes a new instance of . - /// Contains debugging information specific to semantic ranking requests. - internal DocumentDebugInfo(SemanticDebugInfo semantic) - { - Semantic = semantic; - } - - /// Contains debugging information specific to semantic ranking requests. - public SemanticDebugInfo Semantic { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs deleted file mode 100644 index 3f0ce7ae73edd..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// 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. The default value is 'countAllResults'. - public readonly partial struct HybridCountAndFacetMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridCountAndFacetMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountRetrievableResultsValue = "countRetrievableResults"; - private const string CountAllResultsValue = "countAllResults"; - - /// Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'. - public static HybridCountAndFacetMode CountRetrievableResults { get; } = new HybridCountAndFacetMode(CountRetrievableResultsValue); - /// 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. - public static HybridCountAndFacetMode CountAllResults { get; } = new HybridCountAndFacetMode(CountAllResultsValue); - /// Determines if two values are the same. - public static bool operator ==(HybridCountAndFacetMode left, HybridCountAndFacetMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridCountAndFacetMode left, HybridCountAndFacetMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HybridCountAndFacetMode(string value) => new HybridCountAndFacetMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridCountAndFacetMode other && Equals(other); - /// - public bool Equals(HybridCountAndFacetMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs deleted file mode 100644 index 157b1bb82ac08..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class HybridSearch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxTextRecallSize)) - { - writer.WritePropertyName("maxTextRecallSize"u8); - writer.WriteNumberValue(MaxTextRecallSize.Value); - } - if (Optional.IsDefined(CountAndFacetMode)) - { - writer.WritePropertyName("countAndFacetMode"u8); - writer.WriteStringValue(CountAndFacetMode.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static HybridSearch DeserializeHybridSearch(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? maxTextRecallSize = default; - HybridCountAndFacetMode? countAndFacetMode = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxTextRecallSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxTextRecallSize = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("countAndFacetMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - countAndFacetMode = new HybridCountAndFacetMode(property.Value.GetString()); - continue; - } - } - return new HybridSearch(maxTextRecallSize, countAndFacetMode); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static HybridSearch FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHybridSearch(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs deleted file mode 100644 index 94476d1759562..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// TThe query parameters to configure hybrid search behaviors. - public partial class HybridSearch - { - /// Initializes a new instance of . - public HybridSearch() - { - } - - /// Initializes a new instance of . - /// 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. - /// 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. - internal HybridSearch(int? maxTextRecallSize, HybridCountAndFacetMode? countAndFacetMode) - { - MaxTextRecallSize = maxTextRecallSize; - CountAndFacetMode = countAndFacetMode; - } - - /// 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. - public int? MaxTextRecallSize { get; set; } - /// 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. - public HybridCountAndFacetMode? CountAndFacetMode { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs index 5864ef96aae4a..e33511c23fe28 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs @@ -20,8 +20,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle return null; } IndexerExecutionStatus status = default; - IndexerExecutionStatusDetail? statusDetail = default; - IndexerState currentState = default; string errorMessage = default; DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; @@ -38,25 +36,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle status = property.Value.GetString().ToIndexerExecutionStatus(); continue; } - if (property.NameEquals("statusDetail"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - statusDetail = null; - continue; - } - statusDetail = new IndexerExecutionStatusDetail(property.Value.GetString()); - continue; - } - if (property.NameEquals("currentState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - currentState = IndexerState.DeserializeIndexerState(property.Value); - continue; - } if (property.NameEquals("errorMessage"u8)) { errorMessage = property.Value.GetString(); @@ -124,8 +103,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle } return new IndexerExecutionResult( status, - statusDetail, - currentState, errorMessage, startTime, endTime, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs index 16d5530e3ad34..2c30043dc608c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs @@ -31,8 +31,6 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable Initializes a new instance of . /// The outcome of this indexer execution. - /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. /// The error message indicating the top-level error, if any. /// The start time of this indexer execution. /// The end time of this indexer execution, if the execution has already completed. @@ -42,11 +40,9 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable The number of items that failed to be indexed during this indexer execution. /// Change tracking state with which an indexer execution started. /// Change tracking state with which an indexer execution finished. - internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexerState currentState, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) + internal IndexerExecutionResult(IndexerExecutionStatus status, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { Status = status; - StatusDetail = statusDetail; - CurrentState = currentState; ErrorMessage = errorMessage; StartTime = startTime; EndTime = endTime; @@ -60,10 +56,6 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionS /// The outcome of this indexer execution. public IndexerExecutionStatus Status { get; } - /// The outcome of this indexer execution. - public IndexerExecutionStatusDetail? StatusDetail { get; } - /// All of the state that defines and dictates the indexer's current execution. - public IndexerState CurrentState { get; } /// The error message indicating the top-level error, if any. public string ErrorMessage { get; } /// The start time of this indexer execution. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs deleted file mode 100644 index 3897647d7a021..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Details the status of an individual indexer execution. - public readonly partial struct IndexerExecutionStatusDetail : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IndexerExecutionStatusDetail(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ResetDocsValue = "resetDocs"; - - /// Indicates that the reset that occurred was for a call to ResetDocs. - public static IndexerExecutionStatusDetail ResetDocs { get; } = new IndexerExecutionStatusDetail(ResetDocsValue); - /// Determines if two values are the same. - public static bool operator ==(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IndexerExecutionStatusDetail(string value) => new IndexerExecutionStatusDetail(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IndexerExecutionStatusDetail other && Equals(other); - /// - public bool Equals(IndexerExecutionStatusDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs deleted file mode 100644 index 1763bb997cee8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class IndexerState - { - internal static IndexerState DeserializeIndexerState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IndexingMode? mode = default; - string allDocsInitialChangeTrackingState = default; - string allDocsFinalChangeTrackingState = default; - string resetDocsInitialChangeTrackingState = default; - string resetDocsFinalChangeTrackingState = default; - IReadOnlyList resetDocumentKeys = default; - IReadOnlyList resetDatasourceDocumentIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mode = new IndexingMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("allDocsInitialChangeTrackingState"u8)) - { - allDocsInitialChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("allDocsFinalChangeTrackingState"u8)) - { - allDocsFinalChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocsInitialChangeTrackingState"u8)) - { - resetDocsInitialChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocsFinalChangeTrackingState"u8)) - { - resetDocsFinalChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocumentKeys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - resetDocumentKeys = array; - continue; - } - if (property.NameEquals("resetDatasourceDocumentIds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - resetDatasourceDocumentIds = array; - continue; - } - } - return new IndexerState( - mode, - allDocsInitialChangeTrackingState, - allDocsFinalChangeTrackingState, - resetDocsInitialChangeTrackingState, - resetDocsFinalChangeTrackingState, - resetDocumentKeys ?? new ChangeTrackingList(), - resetDatasourceDocumentIds ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static IndexerState FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeIndexerState(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs deleted file mode 100644 index 8047262f3e4f0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents all of the state that defines and dictates the indexer's current execution. - public partial class IndexerState - { - /// Initializes a new instance of . - internal IndexerState() - { - ResetDocumentKeys = new ChangeTrackingList(); - ResetDataSourceDocumentIds = new ChangeTrackingList(); - } - - /// The mode the indexer is running in. - public IndexingMode? Mode { get; } - /// 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. - public IReadOnlyList ResetDocumentKeys { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs deleted file mode 100644 index edef8e49a9f13..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents the mode the indexer is executing in. - public readonly partial struct IndexingMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IndexingMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllDocumentsValue = "indexingAllDocs"; - private const string ResetDocumentsValue = "indexingResetDocs"; - /// Determines if two values are the same. - public static bool operator ==(IndexingMode left, IndexingMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IndexingMode left, IndexingMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IndexingMode(string value) => new IndexingMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IndexingMode other && Equals(other); - /// - public bool Equals(IndexingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs index 1d46ffc6fc1b6..d71817c7b4b58 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs @@ -24,7 +24,7 @@ public IndexingParametersConfiguration() /// Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg" to specifically include those file types. /// For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don't know all the content types (file extensions) in advance. /// For Azure blobs, set to false if you want to continue indexing if a document fails indexing. - /// 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. + /// 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 CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. /// For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, "|"). /// For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. @@ -67,7 +67,7 @@ internal IndexingParametersConfiguration(BlobIndexerParsingMode? parsingMode, st public bool? FailOnUnsupportedContentType { get; set; } /// For Azure blobs, set to false if you want to continue indexing if a document fails indexing. public bool? FailOnUnprocessableDocument { get; set; } - /// 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. + /// 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. public bool? IndexStorageMetadataOnlyForOversizedDocuments { get; set; } /// For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. public string DelimitedTextHeaders { get; set; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs index 2c6e1e3b0627e..07b8d4e0b94ad 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs @@ -25,23 +25,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(item); } writer.WriteEndArray(); - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(Parameters); - } writer.WriteEndObject(); } @@ -53,8 +36,6 @@ internal static KnowledgeStore DeserializeKnowledgeStore(JsonElement element) } string storageConnectionString = default; IList projections = default; - SearchIndexerDataIdentity identity = default; - SearchIndexerKnowledgeStoreParameters parameters = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("storageConnectionString"u8)) @@ -72,27 +53,8 @@ internal static KnowledgeStore DeserializeKnowledgeStore(JsonElement element) projections = array; continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = SearchIndexerKnowledgeStoreParameters.DeserializeSearchIndexerKnowledgeStoreParameters(property.Value); - continue; - } } - return new KnowledgeStore(storageConnectionString, projections, identity, parameters); + return new KnowledgeStore(storageConnectionString, projections); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs index 64d90d0c5341c..8b17e5afc2c7f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs @@ -30,31 +30,15 @@ public KnowledgeStore(string storageConnectionString, IEnumerable Initializes a new instance of . /// The connection string to the storage account projections will be stored in. /// A list of additional projections to perform during indexing. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// 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. - internal KnowledgeStore(string storageConnectionString, IList projections, SearchIndexerDataIdentity identity, SearchIndexerKnowledgeStoreParameters parameters) + internal KnowledgeStore(string storageConnectionString, IList projections) { StorageConnectionString = storageConnectionString; Projections = projections; - Identity = identity; - Parameters = parameters; } /// The connection string to the storage account projections will be stored in. public string StorageConnectionString { get; set; } /// A list of additional projections to perform during indexing. public IList Projections { get; } - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - /// 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. - public SearchIndexerKnowledgeStoreParameters Parameters { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs index 4f3e433895090..2aa9639dfcdf3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs @@ -290,7 +290,7 @@ public LexicalAnalyzerName(string value) public static LexicalAnalyzerName ViMicrosoft { get; } = new LexicalAnalyzerName(ViMicrosoftValue); /// Standard Lucene analyzer. public static LexicalAnalyzerName StandardLucene { get; } = new LexicalAnalyzerName(StandardLuceneValue); - /// Standard ASCII Folding Lucene analyzer. See https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#Analyzers. + /// Standard ASCII Folding Lucene analyzer. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#Analyzers. public static LexicalAnalyzerName StandardAsciiFoldingLucene { get; } = new LexicalAnalyzerName(StandardAsciiFoldingLuceneValue); /// 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. public static LexicalAnalyzerName Keyword { get; } = new LexicalAnalyzerName(KeywordValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs deleted file mode 100644 index 54247fcfd8d17..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Search.Documents.Models; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class LexicalNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static LexicalNormalizer DeserializeLexicalNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("@odata.type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "#Microsoft.Azure.Search.CustomNormalizer": return CustomNormalizer.DeserializeCustomNormalizer(element); - } - } - return UnknownLexicalNormalizer.DeserializeUnknownLexicalNormalizer(element); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static LexicalNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeLexicalNormalizer(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs deleted file mode 100644 index 4f5638a8dc949..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// - /// Base type for normalizers. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public partial class LexicalNormalizer - { - /// Initializes a new instance of . - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// is null. - public LexicalNormalizer(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - internal LexicalNormalizer(string oDataType, string name) - { - ODataType = oDataType; - Name = name; - } - - /// A URI fragment specifying the type of normalizer. - internal string ODataType { get; set; } - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - public string Name { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs deleted file mode 100644 index f53cc8e86d7a0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Defines the names of all text normalizers supported by the search engine. - public readonly partial struct LexicalNormalizerName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LexicalNormalizerName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AsciiFoldingValue = "asciifolding"; - private const string ElisionValue = "elision"; - private const string LowercaseValue = "lowercase"; - private const string StandardValue = "standard"; - private const string UppercaseValue = "uppercase"; - - /// Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html. - public static LexicalNormalizerName AsciiFolding { get; } = new LexicalNormalizerName(AsciiFoldingValue); - /// Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html. - public static LexicalNormalizerName Elision { get; } = new LexicalNormalizerName(ElisionValue); - /// Normalizes token text to lowercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. - public static LexicalNormalizerName Lowercase { get; } = new LexicalNormalizerName(LowercaseValue); - /// Standard normalizer, which consists of lowercase and asciifolding. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html. - public static LexicalNormalizerName Standard { get; } = new LexicalNormalizerName(StandardValue); - /// Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. - public static LexicalNormalizerName Uppercase { get; } = new LexicalNormalizerName(UppercaseValue); - /// Determines if two values are the same. - public static bool operator ==(LexicalNormalizerName left, LexicalNormalizerName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LexicalNormalizerName left, LexicalNormalizerName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LexicalNormalizerName(string value) => new LexicalNormalizerName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LexicalNormalizerName other && Equals(other); - /// - public bool Equals(LexicalNormalizerName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs deleted file mode 100644 index 7cf21b95bd1aa..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Indexes.Models -{ - internal partial class ListAliasesResult - { - internal static ListAliasesResult DeserializeListAliasesResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchAlias.DeserializeSearchAlias(item)); - } - value = array; - continue; - } - } - return new ListAliasesResult(value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ListAliasesResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeListAliasesResult(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs deleted file mode 100644 index fa7098882a440..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Response from a List Aliases request. If successful, it includes the associated index mappings for all aliases. - internal partial class ListAliasesResult - { - /// Initializes a new instance of . - /// The aliases in the Search service. - internal ListAliasesResult(IEnumerable aliases) - { - Aliases = aliases.ToList(); - } - - /// Initializes a new instance of . - /// The aliases in the Search service. - internal ListAliasesResult(IReadOnlyList aliases) - { - Aliases = aliases; - } - - /// The aliases in the Search service. - public IReadOnlyList Aliases { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs deleted file mode 100644 index d5e23e62afb12..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WriteEndObject(); - } - - internal static NativeBlobSoftDeleteDeletionDetectionPolicy DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string odataType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - } - return new NativeBlobSoftDeleteDeletionDetectionPolicy(odataType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new NativeBlobSoftDeleteDeletionDetectionPolicy FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs deleted file mode 100644 index 959cb8a79fcfe..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Defines a data deletion detection policy utilizing Azure Blob Storage's native soft delete feature for deletion detection. - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : DataDeletionDetectionPolicy - { - /// Initializes a new instance of . - public NativeBlobSoftDeleteDeletionDetectionPolicy() - { - ODataType = "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of data deletion detection policy. - internal NativeBlobSoftDeleteDeletionDetectionPolicy(string oDataType) : base(oDataType) - { - ODataType = oDataType ?? "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs similarity index 54% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs index a40f3ae888001..eb96d8eb9f17c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - public readonly partial struct LineEnding : IEquatable + public readonly partial struct OcrLineEnding : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public LineEnding(string value) + public OcrLineEnding(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -28,25 +28,25 @@ public LineEnding(string value) private const string CarriageReturnLineFeedValue = "carriageReturnLineFeed"; /// Lines are separated by a single space character. - public static LineEnding Space { get; } = new LineEnding(SpaceValue); + public static OcrLineEnding Space { get; } = new OcrLineEnding(SpaceValue); /// Lines are separated by a carriage return ('\r') character. - public static LineEnding CarriageReturn { get; } = new LineEnding(CarriageReturnValue); + public static OcrLineEnding CarriageReturn { get; } = new OcrLineEnding(CarriageReturnValue); /// Lines are separated by a single line feed ('\n') character. - public static LineEnding LineFeed { get; } = new LineEnding(LineFeedValue); + public static OcrLineEnding LineFeed { get; } = new OcrLineEnding(LineFeedValue); /// Lines are separated by a carriage return and a line feed ('\r\n') character. - public static LineEnding CarriageReturnLineFeed { get; } = new LineEnding(CarriageReturnLineFeedValue); - /// Determines if two values are the same. - public static bool operator ==(LineEnding left, LineEnding right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LineEnding left, LineEnding right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LineEnding(string value) => new LineEnding(value); + public static OcrLineEnding CarriageReturnLineFeed { get; } = new OcrLineEnding(CarriageReturnLineFeedValue); + /// Determines if two values are the same. + public static bool operator ==(OcrLineEnding left, OcrLineEnding right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OcrLineEnding left, OcrLineEnding right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OcrLineEnding(string value) => new OcrLineEnding(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LineEnding other && Equals(other); + public override bool Equals(object obj) => obj is OcrLineEnding other && Equals(other); /// - public bool Equals(LineEnding other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(OcrLineEnding other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs index 2639b289bedb0..57c38542ff52f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs @@ -87,7 +87,7 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) } OcrSkillLanguage? defaultLanguageCode = default; bool? detectOrientation = default; - LineEnding? lineEnding = default; + OcrLineEnding? lineEnding = default; string odataType = default; string name = default; string description = default; @@ -122,7 +122,7 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) { continue; } - lineEnding = new LineEnding(property.Value.GetString()); + lineEnding = new OcrLineEnding(property.Value.GetString()); continue; } if (property.NameEquals("@odata.type"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs index 752a83cf65354..07a1c82086862 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs @@ -35,7 +35,7 @@ public OcrSkill(IEnumerable inputs, IEnumerable A value indicating which language code to use. Default is `en`. /// A value indicating to turn orientation detection on or not. Default is false. /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - internal OcrSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, OcrSkillLanguage? defaultLanguageCode, bool? shouldDetectOrientation, LineEnding? lineEnding) : base(oDataType, name, description, context, inputs, outputs) + internal OcrSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, OcrSkillLanguage? defaultLanguageCode, bool? shouldDetectOrientation, OcrLineEnding? lineEnding) : base(oDataType, name, description, context, inputs, outputs) { DefaultLanguageCode = defaultLanguageCode; ShouldDetectOrientation = shouldDetectOrientation; @@ -43,6 +43,6 @@ internal OcrSkill(string oDataType, string name, string description, string cont ODataType = oDataType ?? "#Microsoft.Skills.Vision.OcrSkill"; } /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - public LineEnding? LineEnding { get; set; } + public OcrLineEnding? LineEnding { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs index 6df7c9704821d..e87f89ad78b4c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs @@ -9,7 +9,7 @@ namespace Azure.Search.Documents.Models { - /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.. + /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type `semantic`. public partial class QueryCaptionResult { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs deleted file mode 100644 index 4627e6fab6855..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// Enables a debugging tool that can be used to further explore your search results. - public readonly partial struct QueryDebugMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QueryDebugMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DisabledValue = "disabled"; - private const string SemanticValue = "semantic"; - - /// No query debugging information will be returned. - public static QueryDebugMode Disabled { get; } = new QueryDebugMode(DisabledValue); - /// Allows the user to further explore their reranked results. - public static QueryDebugMode Semantic { get; } = new QueryDebugMode(SemanticValue); - /// Determines if two values are the same. - public static bool operator ==(QueryDebugMode left, QueryDebugMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QueryDebugMode left, QueryDebugMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QueryDebugMode(string value) => new QueryDebugMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QueryDebugMode other && Equals(other); - /// - public bool Equals(QueryDebugMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs deleted file mode 100644 index d0b1c58d39254..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The language of the query. - public readonly partial struct QueryLanguage : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QueryLanguage(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string EnUsValue = "en-us"; - private const string EnGbValue = "en-gb"; - private const string EnInValue = "en-in"; - private const string EnCaValue = "en-ca"; - private const string EnAuValue = "en-au"; - private const string FrFrValue = "fr-fr"; - private const string FrCaValue = "fr-ca"; - private const string DeDeValue = "de-de"; - private const string EsEsValue = "es-es"; - private const string EsMxValue = "es-mx"; - private const string ZhCnValue = "zh-cn"; - private const string ZhTwValue = "zh-tw"; - private const string PtBrValue = "pt-br"; - private const string PtPtValue = "pt-pt"; - private const string ItItValue = "it-it"; - private const string JaJpValue = "ja-jp"; - private const string KoKrValue = "ko-kr"; - private const string RuRuValue = "ru-ru"; - private const string CsCzValue = "cs-cz"; - private const string NlBeValue = "nl-be"; - private const string NlNlValue = "nl-nl"; - private const string HuHuValue = "hu-hu"; - private const string PlPlValue = "pl-pl"; - private const string SvSeValue = "sv-se"; - private const string TrTrValue = "tr-tr"; - private const string HiInValue = "hi-in"; - private const string ArSaValue = "ar-sa"; - private const string ArEgValue = "ar-eg"; - private const string ArMaValue = "ar-ma"; - private const string ArKwValue = "ar-kw"; - private const string ArJoValue = "ar-jo"; - private const string DaDkValue = "da-dk"; - private const string NoNoValue = "no-no"; - private const string BgBgValue = "bg-bg"; - private const string HrHrValue = "hr-hr"; - private const string HrBaValue = "hr-ba"; - private const string MsMyValue = "ms-my"; - private const string MsBnValue = "ms-bn"; - private const string SlSlValue = "sl-sl"; - private const string TaInValue = "ta-in"; - private const string ViVnValue = "vi-vn"; - private const string ElGrValue = "el-gr"; - private const string RoRoValue = "ro-ro"; - private const string IsIsValue = "is-is"; - private const string IdIdValue = "id-id"; - private const string ThThValue = "th-th"; - private const string LtLtValue = "lt-lt"; - private const string UkUaValue = "uk-ua"; - private const string LvLvValue = "lv-lv"; - private const string EtEeValue = "et-ee"; - private const string CaEsValue = "ca-es"; - private const string FiFiValue = "fi-fi"; - private const string SrBaValue = "sr-ba"; - private const string SrMeValue = "sr-me"; - private const string SrRsValue = "sr-rs"; - private const string SkSkValue = "sk-sk"; - private const string NbNoValue = "nb-no"; - private const string HyAmValue = "hy-am"; - private const string BnInValue = "bn-in"; - private const string EuEsValue = "eu-es"; - private const string GlEsValue = "gl-es"; - private const string GuInValue = "gu-in"; - private const string HeIlValue = "he-il"; - private const string GaIeValue = "ga-ie"; - private const string KnInValue = "kn-in"; - private const string MlInValue = "ml-in"; - private const string MrInValue = "mr-in"; - private const string FaAeValue = "fa-ae"; - private const string PaInValue = "pa-in"; - private const string TeInValue = "te-in"; - private const string UrPkValue = "ur-pk"; - - /// Query language not specified. - public static QueryLanguage None { get; } = new QueryLanguage(NoneValue); - /// Query language value for English (United States). - public static QueryLanguage EnUs { get; } = new QueryLanguage(EnUsValue); - /// Query language value for English (Great Britain). - public static QueryLanguage EnGb { get; } = new QueryLanguage(EnGbValue); - /// Query language value for English (India). - public static QueryLanguage EnIn { get; } = new QueryLanguage(EnInValue); - /// Query language value for English (Canada). - public static QueryLanguage EnCa { get; } = new QueryLanguage(EnCaValue); - /// Query language value for English (Australia). - public static QueryLanguage EnAu { get; } = new QueryLanguage(EnAuValue); - /// Query language value for French (France). - public static QueryLanguage FrFr { get; } = new QueryLanguage(FrFrValue); - /// Query language value for French (Canada). - public static QueryLanguage FrCa { get; } = new QueryLanguage(FrCaValue); - /// Query language value for German (Germany). - public static QueryLanguage DeDe { get; } = new QueryLanguage(DeDeValue); - /// Query language value for Spanish (Spain). - public static QueryLanguage EsEs { get; } = new QueryLanguage(EsEsValue); - /// Query language value for Spanish (Mexico). - public static QueryLanguage EsMx { get; } = new QueryLanguage(EsMxValue); - /// Query language value for Chinese (China). - public static QueryLanguage ZhCn { get; } = new QueryLanguage(ZhCnValue); - /// Query language value for Chinese (Taiwan). - public static QueryLanguage ZhTw { get; } = new QueryLanguage(ZhTwValue); - /// Query language value for Portuguese (Brazil). - public static QueryLanguage PtBr { get; } = new QueryLanguage(PtBrValue); - /// Query language value for Portuguese (Portugal). - public static QueryLanguage PtPt { get; } = new QueryLanguage(PtPtValue); - /// Query language value for Italian (Italy). - public static QueryLanguage ItIt { get; } = new QueryLanguage(ItItValue); - /// Query language value for Japanese (Japan). - public static QueryLanguage JaJp { get; } = new QueryLanguage(JaJpValue); - /// Query language value for Korean (Korea). - public static QueryLanguage KoKr { get; } = new QueryLanguage(KoKrValue); - /// Query language value for Russian (Russia). - public static QueryLanguage RuRu { get; } = new QueryLanguage(RuRuValue); - /// Query language value for Czech (Czech Republic). - public static QueryLanguage CsCz { get; } = new QueryLanguage(CsCzValue); - /// Query language value for Dutch (Belgium). - public static QueryLanguage NlBe { get; } = new QueryLanguage(NlBeValue); - /// Query language value for Dutch (Netherlands). - public static QueryLanguage NlNl { get; } = new QueryLanguage(NlNlValue); - /// Query language value for Hungarian (Hungary). - public static QueryLanguage HuHu { get; } = new QueryLanguage(HuHuValue); - /// Query language value for Polish (Poland). - public static QueryLanguage PlPl { get; } = new QueryLanguage(PlPlValue); - /// Query language value for Swedish (Sweden). - public static QueryLanguage SvSe { get; } = new QueryLanguage(SvSeValue); - /// Query language value for Turkish (Turkey). - public static QueryLanguage TrTr { get; } = new QueryLanguage(TrTrValue); - /// Query language value for Hindi (India). - public static QueryLanguage HiIn { get; } = new QueryLanguage(HiInValue); - /// Query language value for Arabic (Saudi Arabia). - public static QueryLanguage ArSa { get; } = new QueryLanguage(ArSaValue); - /// Query language value for Arabic (Egypt). - public static QueryLanguage ArEg { get; } = new QueryLanguage(ArEgValue); - /// Query language value for Arabic (Morocco). - public static QueryLanguage ArMa { get; } = new QueryLanguage(ArMaValue); - /// Query language value for Arabic (Kuwait). - public static QueryLanguage ArKw { get; } = new QueryLanguage(ArKwValue); - /// Query language value for Arabic (Jordan). - public static QueryLanguage ArJo { get; } = new QueryLanguage(ArJoValue); - /// Query language value for Danish (Denmark). - public static QueryLanguage DaDk { get; } = new QueryLanguage(DaDkValue); - /// Query language value for Norwegian (Norway). - public static QueryLanguage NoNo { get; } = new QueryLanguage(NoNoValue); - /// Query language value for Bulgarian (Bulgaria). - public static QueryLanguage BgBg { get; } = new QueryLanguage(BgBgValue); - /// Query language value for Croatian (Croatia). - public static QueryLanguage HrHr { get; } = new QueryLanguage(HrHrValue); - /// Query language value for Croatian (Bosnia and Herzegovina). - public static QueryLanguage HrBa { get; } = new QueryLanguage(HrBaValue); - /// Query language value for Malay (Malaysia). - public static QueryLanguage MsMy { get; } = new QueryLanguage(MsMyValue); - /// Query language value for Malay (Brunei Darussalam). - public static QueryLanguage MsBn { get; } = new QueryLanguage(MsBnValue); - /// Query language value for Slovenian (Slovenia). - public static QueryLanguage SlSl { get; } = new QueryLanguage(SlSlValue); - /// Query language value for Tamil (India). - public static QueryLanguage TaIn { get; } = new QueryLanguage(TaInValue); - /// Query language value for Vietnamese (Viet Nam). - public static QueryLanguage ViVn { get; } = new QueryLanguage(ViVnValue); - /// Query language value for Greek (Greece). - public static QueryLanguage ElGr { get; } = new QueryLanguage(ElGrValue); - /// Query language value for Romanian (Romania). - public static QueryLanguage RoRo { get; } = new QueryLanguage(RoRoValue); - /// Query language value for Icelandic (Iceland). - public static QueryLanguage IsIs { get; } = new QueryLanguage(IsIsValue); - /// Query language value for Indonesian (Indonesia). - public static QueryLanguage IdId { get; } = new QueryLanguage(IdIdValue); - /// Query language value for Thai (Thailand). - public static QueryLanguage ThTh { get; } = new QueryLanguage(ThThValue); - /// Query language value for Lithuanian (Lithuania). - public static QueryLanguage LtLt { get; } = new QueryLanguage(LtLtValue); - /// Query language value for Ukrainian (Ukraine). - public static QueryLanguage UkUa { get; } = new QueryLanguage(UkUaValue); - /// Query language value for Latvian (Latvia). - public static QueryLanguage LvLv { get; } = new QueryLanguage(LvLvValue); - /// Query language value for Estonian (Estonia). - public static QueryLanguage EtEe { get; } = new QueryLanguage(EtEeValue); - /// Query language value for Catalan. - public static QueryLanguage CaEs { get; } = new QueryLanguage(CaEsValue); - /// Query language value for Finnish (Finland). - public static QueryLanguage FiFi { get; } = new QueryLanguage(FiFiValue); - /// Query language value for Serbian (Bosnia and Herzegovina). - public static QueryLanguage SrBa { get; } = new QueryLanguage(SrBaValue); - /// Query language value for Serbian (Montenegro). - public static QueryLanguage SrMe { get; } = new QueryLanguage(SrMeValue); - /// Query language value for Serbian (Serbia). - public static QueryLanguage SrRs { get; } = new QueryLanguage(SrRsValue); - /// Query language value for Slovak (Slovakia). - public static QueryLanguage SkSk { get; } = new QueryLanguage(SkSkValue); - /// Query language value for Norwegian (Norway). - public static QueryLanguage NbNo { get; } = new QueryLanguage(NbNoValue); - /// Query language value for Armenian (Armenia). - public static QueryLanguage HyAm { get; } = new QueryLanguage(HyAmValue); - /// Query language value for Bengali (India). - public static QueryLanguage BnIn { get; } = new QueryLanguage(BnInValue); - /// Query language value for Basque. - public static QueryLanguage EuEs { get; } = new QueryLanguage(EuEsValue); - /// Query language value for Galician. - public static QueryLanguage GlEs { get; } = new QueryLanguage(GlEsValue); - /// Query language value for Gujarati (India). - public static QueryLanguage GuIn { get; } = new QueryLanguage(GuInValue); - /// Query language value for Hebrew (Israel). - public static QueryLanguage HeIl { get; } = new QueryLanguage(HeIlValue); - /// Query language value for Irish (Ireland). - public static QueryLanguage GaIe { get; } = new QueryLanguage(GaIeValue); - /// Query language value for Kannada (India). - public static QueryLanguage KnIn { get; } = new QueryLanguage(KnInValue); - /// Query language value for Malayalam (India). - public static QueryLanguage MlIn { get; } = new QueryLanguage(MlInValue); - /// Query language value for Marathi (India). - public static QueryLanguage MrIn { get; } = new QueryLanguage(MrInValue); - /// Query language value for Persian (U.A.E.). - public static QueryLanguage FaAe { get; } = new QueryLanguage(FaAeValue); - /// Query language value for Punjabi (India). - public static QueryLanguage PaIn { get; } = new QueryLanguage(PaInValue); - /// Query language value for Telugu (India). - public static QueryLanguage TeIn { get; } = new QueryLanguage(TeInValue); - /// Query language value for Urdu (Pakistan). - public static QueryLanguage UrPk { get; } = new QueryLanguage(UrPkValue); - /// Determines if two values are the same. - public static bool operator ==(QueryLanguage left, QueryLanguage right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QueryLanguage left, QueryLanguage right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QueryLanguage(string value) => new QueryLanguage(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QueryLanguage other && Equals(other); - /// - public bool Equals(QueryLanguage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs deleted file mode 100644 index 4959fde95be97..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class QueryResultDocumentRerankerInput - { - internal static QueryResultDocumentRerankerInput DeserializeQueryResultDocumentRerankerInput(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string title = default; - string content = default; - string keywords = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("title"u8)) - { - title = property.Value.GetString(); - continue; - } - if (property.NameEquals("content"u8)) - { - content = property.Value.GetString(); - continue; - } - if (property.NameEquals("keywords"u8)) - { - keywords = property.Value.GetString(); - continue; - } - } - return new QueryResultDocumentRerankerInput(title, content, keywords); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryResultDocumentRerankerInput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryResultDocumentRerankerInput(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs deleted file mode 100644 index 2980704e7d3cc..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The raw concatenated strings that were sent to the semantic enrichment process. - public partial class QueryResultDocumentRerankerInput - { - /// Initializes a new instance of . - internal QueryResultDocumentRerankerInput() - { - } - - /// Initializes a new instance of . - /// The raw string for the title field that was used for semantic enrichment. - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - internal QueryResultDocumentRerankerInput(string title, string content, string keywords) - { - Title = title; - Content = content; - Keywords = keywords; - } - - /// The raw string for the title field that was used for semantic enrichment. - public string Title { get; } - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - public string Content { get; } - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - public string Keywords { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs deleted file mode 100644 index 31b3746ce65de..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class QueryResultDocumentSemanticField - { - internal static QueryResultDocumentSemanticField DeserializeQueryResultDocumentSemanticField(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - SemanticFieldState? state = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new SemanticFieldState(property.Value.GetString()); - continue; - } - } - return new QueryResultDocumentSemanticField(name, state); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryResultDocumentSemanticField FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryResultDocumentSemanticField(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs deleted file mode 100644 index 6d05204a9fc26..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Description of fields that were sent to the semantic enrichment process, as well as how they were used. - public partial class QueryResultDocumentSemanticField - { - /// Initializes a new instance of . - internal QueryResultDocumentSemanticField() - { - } - - /// Initializes a new instance of . - /// The name of the field that was sent to the semantic enrichment process. - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - internal QueryResultDocumentSemanticField(string name, SemanticFieldState? state) - { - Name = name; - State = state; - } - - /// The name of the field that was sent to the semantic enrichment process. - public string Name { get; } - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - public SemanticFieldState? State { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs deleted file mode 100644 index 686b19c1d7175..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// Improve search recall by spell-correcting individual search query terms. - public readonly partial struct QuerySpellerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QuerySpellerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string LexiconValue = "lexicon"; - - /// Speller not enabled. - public static QuerySpellerType None { get; } = new QuerySpellerType(NoneValue); - /// Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. - public static QuerySpellerType Lexicon { get; } = new QuerySpellerType(LexiconValue); - /// Determines if two values are the same. - public static bool operator ==(QuerySpellerType left, QuerySpellerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QuerySpellerType left, QuerySpellerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QuerySpellerType(string value) => new QuerySpellerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QuerySpellerType other && Equals(other); - /// - public bool Equals(QuerySpellerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs deleted file mode 100644 index d80cf96ab34ae..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class ResetDocumentOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(DocumentKeys)) - { - writer.WritePropertyName("documentKeys"u8); - writer.WriteStartArray(); - foreach (var item in DocumentKeys) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DataSourceDocumentIds)) - { - writer.WritePropertyName("datasourceDocumentIds"u8); - writer.WriteStartArray(); - foreach (var item in DataSourceDocumentIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs deleted file mode 100644 index dbd74a1ae1f4e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The DocumentKeysOrIds. - public partial class ResetDocumentOptions - { - /// Initializes a new instance of . - public ResetDocumentOptions() - { - DocumentKeys = new ChangeTrackingList(); - DataSourceDocumentIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// document keys to be reset. - /// datasource document identifiers to be reset. - internal ResetDocumentOptions(IList documentKeys, IList dataSourceDocumentIds) - { - DocumentKeys = documentKeys; - DataSourceDocumentIds = dataSourceDocumentIds; - } - - /// document keys to be reset. - public IList DocumentKeys { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs deleted file mode 100644 index defcd28822f04..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class ResetSkillsOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(SkillNames)) - { - writer.WritePropertyName("skillNames"u8); - writer.WriteStartArray(); - foreach (var item in SkillNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs deleted file mode 100644 index 3cfade9e4f976..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The SkillNames. - public partial class ResetSkillsOptions - { - /// Initializes a new instance of . - public ResetSkillsOptions() - { - SkillNames = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// the names of skills to be reset. - internal ResetSkillsOptions(IList skillNames) - { - SkillNames = skillNames; - } - - /// the names of skills to be reset. - public IList SkillNames { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs similarity index 86% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs index 56f6115126e8b..f8c17f5097195 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class ScalarQuantizationCompressionConfiguration : IUtf8JsonSerializable + public partial class ScalarQuantizationCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,7 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -44,7 +44,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ScalarQuantizationCompressionConfiguration DeserializeScalarQuantizationCompressionConfiguration(JsonElement element) + internal static ScalarQuantizationCompression DeserializeScalarQuantizationCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -96,15 +96,15 @@ internal static ScalarQuantizationCompressionConfiguration DeserializeScalarQuan continue; } } - return new ScalarQuantizationCompressionConfiguration(name, kind, rerankWithOriginalVectors, defaultOversampling, scalarQuantizationParameters); + return new ScalarQuantizationCompression(name, kind, rerankWithOriginalVectors, defaultOversampling, scalarQuantizationParameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ScalarQuantizationCompressionConfiguration FromResponse(Response response) + internal static new ScalarQuantizationCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeScalarQuantizationCompressionConfiguration(document.RootElement); + return DeserializeScalarQuantizationCompression(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs index 36e37f02d0b6b..ffc036d4c1cd0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs @@ -10,25 +10,25 @@ namespace Azure.Search.Documents.Indexes.Models { /// Contains configuration options specific to the scalar quantization compression method used during indexing and querying. - public partial class ScalarQuantizationCompressionConfiguration : VectorSearchCompressionConfiguration + public partial class ScalarQuantizationCompression : VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. - /// is null. - public ScalarQuantizationCompressionConfiguration(string name) : base(name) + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + public ScalarQuantizationCompression(string compressionName) : base(compressionName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(compressionName, nameof(compressionName)); Kind = VectorSearchCompressionKind.ScalarQuantization; } - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// 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. /// 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. /// Contains the parameters specific to Scalar Quantization. - internal ScalarQuantizationCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling, ScalarQuantizationParameters parameters) : base(name, kind, rerankWithOriginalVectors, defaultOversampling) + internal ScalarQuantizationCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling, ScalarQuantizationParameters parameters) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) { Parameters = parameters; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs index 182678bef1be3..95c46db2dfae8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs @@ -36,7 +36,7 @@ internal static ScalarQuantizationParameters DeserializeScalarQuantizationParame { return null; } - VectorSearchCompressionTargetDataType? quantizedDataType = default; + VectorSearchCompressionTarget? quantizedDataType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("quantizedDataType"u8)) @@ -46,7 +46,7 @@ internal static ScalarQuantizationParameters DeserializeScalarQuantizationParame quantizedDataType = null; continue; } - quantizedDataType = new VectorSearchCompressionTargetDataType(property.Value.GetString()); + quantizedDataType = new VectorSearchCompressionTarget(property.Value.GetString()); continue; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs index 15a76a620c23f..c687a6d3994d8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs @@ -17,12 +17,12 @@ public ScalarQuantizationParameters() /// Initializes a new instance of . /// The quantized data type of compressed vector values. - internal ScalarQuantizationParameters(VectorSearchCompressionTargetDataType? quantizedDataType) + internal ScalarQuantizationParameters(VectorSearchCompressionTarget? quantizedDataType) { QuantizedDataType = quantizedDataType; } /// The quantized data type of compressed vector values. - public VectorSearchCompressionTargetDataType? QuantizedDataType { get; set; } + public VectorSearchCompressionTarget? QuantizedDataType { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs deleted file mode 100644 index 1f708f5b26c4d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchAlias : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("indexes"u8); - writer.WriteStartArray(); - foreach (var item in Indexes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(_etag)) - { - writer.WritePropertyName("@odata.etag"u8); - writer.WriteStringValue(_etag); - } - writer.WriteEndObject(); - } - - internal static SearchAlias DeserializeSearchAlias(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - IList indexes = default; - string odataEtag = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("indexes"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - indexes = array; - continue; - } - if (property.NameEquals("@odata.etag"u8)) - { - odataEtag = property.Value.GetString(); - continue; - } - } - return new SearchAlias(name, indexes, odataEtag); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchAlias FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchAlias(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs deleted file mode 100644 index d0d00e756de96..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// 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. - public partial class SearchAlias - { - /// Initializes a new instance of . - /// The name of the alias. - /// The name of the index this alias maps to. Only one index name may be specified. - /// or is null. - public SearchAlias(string name, IEnumerable indexes) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(indexes, nameof(indexes)); - - Name = name; - Indexes = indexes.ToList(); - } - - /// Initializes a new instance of . - /// The name of the alias. - /// The name of the index this alias maps to. Only one index name may be specified. - /// The ETag of the alias. - internal SearchAlias(string name, IList indexes, string etag) - { - Name = name; - Indexes = indexes; - _etag = etag; - } - - /// The name of the alias. - public string Name { get; set; } - /// The name of the index this alias maps to. Only one index name may be specified. - public IList Indexes { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs index 940a3b5e92f08..7c024b5354900 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs @@ -23,10 +23,10 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme IReadOnlyDictionary> searchFacets = default; IReadOnlyList searchAnswers = default; SearchOptions searchNextPageParameters = default; - SemanticErrorReason? searchSemanticPartialResponseReason = default; - SemanticSearchResultsType? searchSemanticPartialResponseType = default; IReadOnlyList value = default; string odataNextLink = default; + SemanticErrorReason? searchSemanticPartialResponseReason = default; + SemanticSearchResultsType? searchSemanticPartialResponseType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@odata.count"u8)) @@ -97,6 +97,21 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchNextPageParameters = SearchOptions.DeserializeSearchOptions(property.Value); continue; } + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchResult.DeserializeSearchResult(item)); + } + value = array; + continue; + } + if (property.NameEquals("@odata.nextLink"u8)) + { + odataNextLink = property.Value.GetString(); + continue; + } if (property.NameEquals("@search.semanticPartialResponseReason"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -115,21 +130,6 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchSemanticPartialResponseType = new SemanticSearchResultsType(property.Value.GetString()); continue; } - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchResult.DeserializeSearchResult(item)); - } - value = array; - continue; - } - if (property.NameEquals("@odata.nextLink"u8)) - { - odataNextLink = property.Value.GetString(); - continue; - } } return new SearchDocumentsResult( odataCount, @@ -137,10 +137,10 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchFacets ?? new ChangeTrackingDictionary>(), searchAnswers ?? new ChangeTrackingList(), searchNextPageParameters, - searchSemanticPartialResponseReason, - searchSemanticPartialResponseType, value, - odataNextLink); + odataNextLink, + searchSemanticPartialResponseReason, + searchSemanticPartialResponseType); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs index e7d7732c831a0..dd01afb9b5564 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs @@ -28,21 +28,21 @@ internal SearchDocumentsResult(IEnumerable results) /// The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions. /// The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'. /// Continuation JSON payload returned when the query can't return all the requested results in a single response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the search response. - /// Reason that a partial response was returned for a semantic ranking request. - /// Type of partial response that was returned for a semantic ranking request. /// The sequence of results returned by the query. /// Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response. - internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType, IReadOnlyList results, string nextLink) + /// Reason that a partial response was returned for a semantic ranking request. + /// Type of partial response that was returned for a semantic ranking request. + internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, IReadOnlyList results, string nextLink, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType) { Count = count; Coverage = coverage; Facets = facets; Answers = answers; NextPageParameters = nextPageParameters; - SemanticPartialResponseReason = semanticPartialResponseReason; - SemanticPartialResponseType = semanticPartialResponseType; Results = results; NextLink = nextLink; + SemanticPartialResponseReason = semanticPartialResponseReason; + SemanticPartialResponseType = semanticPartialResponseType; } /// The total count of results found by the search operation, or null if the count was not requested. If present, the count may be greater than the number of results in this response. This can happen if you use the $top or $skip parameters, or if the query can't return all the requested documents in a single response. @@ -55,13 +55,13 @@ internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionar public IReadOnlyList Answers { get; } /// Continuation JSON payload returned when the query can't return all the requested results in a single response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the search response. public SearchOptions NextPageParameters { get; } - /// Reason that a partial response was returned for a semantic ranking request. - public SemanticErrorReason? SemanticPartialResponseReason { get; } - /// Type of partial response that was returned for a semantic ranking request. - public SemanticSearchResultsType? SemanticPartialResponseType { get; } /// The sequence of results returned by the query. public IReadOnlyList Results { get; } /// Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response. public string NextLink { get; } + /// Reason that a partial response was returned for a semantic ranking request. + public SemanticErrorReason? SemanticPartialResponseReason { get; } + /// Type of partial response that was returned for a semantic ranking request. + public SemanticSearchResultsType? SemanticPartialResponseType { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs index e819df4548b63..443ba9279fb82 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs @@ -91,18 +91,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("indexAnalyzer"); } } - if (Optional.IsDefined(NormalizerName)) - { - if (NormalizerName != null) - { - writer.WritePropertyName("normalizer"u8); - writer.WriteStringValue(NormalizerName.Value.ToString()); - } - else - { - writer.WriteNull("normalizer"); - } - } if (Optional.IsDefined(VectorSearchDimensions)) { if (VectorSearchDimensions != null) @@ -180,7 +168,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) LexicalAnalyzerName? analyzer = default; LexicalAnalyzerName? searchAnalyzer = default; LexicalAnalyzerName? indexAnalyzer = default; - LexicalNormalizerName? normalizer = default; int? dimensions = default; string vectorSearchProfile = default; VectorEncodingFormat? vectorEncoding = default; @@ -291,16 +278,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) indexAnalyzer = new LexicalAnalyzerName(property.Value.GetString()); continue; } - if (property.NameEquals("normalizer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - normalizer = null; - continue; - } - normalizer = new LexicalNormalizerName(property.Value.GetString()); - continue; - } if (property.NameEquals("dimensions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -373,7 +350,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) analyzer, searchAnalyzer, indexAnalyzer, - normalizer, dimensions, vectorSearchProfile, vectorEncoding, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs index 4bbad7499be62..84373ab1c2d14 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs @@ -26,13 +26,12 @@ public partial class SearchField /// 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. Must be null for complex fields. /// 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 indexAnalyzer and it cannot be set 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. This analyzer can be updated on an existing field. Must be null for complex fields. /// 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 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. Must be null for complex fields. - /// 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. /// The dimensionality of the vector field. /// The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field. /// The encoding format to interpret the field contents. /// 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. Must be null or an empty collection for complex fields. /// A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) + internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) { Name = name; Type = type; @@ -46,7 +45,6 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i AnalyzerName = analyzerName; SearchAnalyzerName = searchAnalyzerName; IndexAnalyzerName = indexAnalyzerName; - NormalizerName = normalizerName; VectorSearchDimensions = vectorSearchDimensions; VectorSearchProfileName = vectorSearchProfileName; VectorEncodingFormat = vectorEncodingFormat; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs index 8417ab52413fa..9bfe7bde639f5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs @@ -102,16 +102,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Normalizers)) - { - writer.WritePropertyName("normalizers"u8); - writer.WriteStartArray(); - foreach (var item in Normalizers) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(EncryptionKey)) { if (EncryptionKey != null) @@ -177,7 +167,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) IList tokenizers = default; IList tokenFilters = default; IList charFilters = default; - IList normalizers = default; SearchResourceEncryptionKey encryptionKey = default; SimilarityAlgorithm similarity = default; SemanticSearch semantic = default; @@ -299,20 +288,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) charFilters = array; continue; } - if (property.NameEquals("normalizers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LexicalNormalizer.DeserializeLexicalNormalizer(item)); - } - normalizers = array; - continue; - } if (property.NameEquals("encryptionKey"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -369,7 +344,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) tokenizers ?? new ChangeTrackingList(), tokenFilters ?? new ChangeTrackingList(), charFilters ?? new ChangeTrackingList(), - normalizers ?? new ChangeTrackingList(), encryptionKey, similarity, semantic, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs index dfaafc2d25533..b8d1928fa3ffe 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs @@ -41,11 +41,6 @@ public partial class SearchIndex /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// - /// The normalizers for the index. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// /// 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 that no one, not even Microsoft, can decrypt your data. Once you have encrypted your data, 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 data 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. /// /// The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. @@ -55,7 +50,7 @@ public partial class SearchIndex /// Defines parameters for a search index that influence semantic capabilities. /// Contains configuration options related to vector search. /// The ETag of the index. - internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) + internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) { Name = name; _fields = fields; @@ -67,7 +62,6 @@ internal SearchIndex(string name, IList fields, IList(), disabled, odataEtag, - encryptionKey, - cache); + encryptionKey); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs index 2d851fc20771f..6c5887698ed92 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs @@ -44,8 +44,7 @@ public SearchIndexer(string name, string dataSourceName, string targetIndexName) /// A value indicating whether the indexer is disabled. Default is false. /// The ETag of the indexer. /// 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. - /// Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. - internal SearchIndexer(string name, string description, string dataSourceName, string skillsetName, string targetIndexName, IndexingSchedule schedule, IndexingParameters parameters, IList fieldMappings, IList outputFieldMappings, bool? isDisabled, string etag, SearchResourceEncryptionKey encryptionKey, SearchIndexerCache cache) + internal SearchIndexer(string name, string description, string dataSourceName, string skillsetName, string targetIndexName, IndexingSchedule schedule, IndexingParameters parameters, IList fieldMappings, IList outputFieldMappings, bool? isDisabled, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; @@ -59,7 +58,6 @@ internal SearchIndexer(string name, string description, string dataSourceName, s IsDisabled = isDisabled; _etag = etag; EncryptionKey = encryptionKey; - Cache = cache; } /// The name of the indexer. @@ -80,7 +78,5 @@ internal SearchIndexer(string name, string description, string dataSourceName, s public bool? IsDisabled { get; set; } /// 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. public SearchResourceEncryptionKey EncryptionKey { get; set; } - /// Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. - public SearchIndexerCache Cache { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs deleted file mode 100644 index c6b2927aa0e29..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerCache : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StorageConnectionString)) - { - writer.WritePropertyName("storageConnectionString"u8); - writer.WriteStringValue(StorageConnectionString); - } - if (Optional.IsDefined(EnableReprocessing)) - { - if (EnableReprocessing != null) - { - writer.WritePropertyName("enableReprocessing"u8); - writer.WriteBooleanValue(EnableReprocessing.Value); - } - else - { - writer.WriteNull("enableReprocessing"); - } - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - writer.WriteEndObject(); - } - - internal static SearchIndexerCache DeserializeSearchIndexerCache(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string storageConnectionString = default; - bool? enableReprocessing = default; - SearchIndexerDataIdentity identity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storageConnectionString"u8)) - { - storageConnectionString = property.Value.GetString(); - continue; - } - if (property.NameEquals("enableReprocessing"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - enableReprocessing = null; - continue; - } - enableReprocessing = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - } - return new SearchIndexerCache(storageConnectionString, enableReprocessing, identity); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchIndexerCache FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerCache(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs deleted file mode 100644 index bddd36fa0a5a3..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Indexes.Models -{ - /// The SearchIndexerCache. - public partial class SearchIndexerCache - { - /// Initializes a new instance of . - public SearchIndexerCache() - { - } - - /// Initializes a new instance of . - /// The connection string to the storage account where the cache data will be persisted. - /// Specifies whether incremental reprocessing is enabled. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal SearchIndexerCache(string storageConnectionString, bool? enableReprocessing, SearchIndexerDataIdentity identity) - { - StorageConnectionString = storageConnectionString; - EnableReprocessing = enableReprocessing; - Identity = identity; - } - /// Specifies whether incremental reprocessing is enabled. - public bool? EnableReprocessing { get; set; } - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs index 30705c4422419..6c603e3cca010 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs @@ -28,18 +28,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(CredentialsInternal); writer.WritePropertyName("container"u8); writer.WriteObjectValue(Container); - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } if (Optional.IsDefined(DataChangeDetectionPolicy)) { if (DataChangeDetectionPolicy != null) @@ -95,7 +83,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo SearchIndexerDataSourceType type = default; DataSourceCredentials credentials = default; SearchIndexerDataContainer container = default; - SearchIndexerDataIdentity identity = default; DataChangeDetectionPolicy dataChangeDetectionPolicy = default; DataDeletionDetectionPolicy dataDeletionDetectionPolicy = default; string odataEtag = default; @@ -127,16 +114,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo container = SearchIndexerDataContainer.DeserializeSearchIndexerDataContainer(property.Value); continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } if (property.NameEquals("dataChangeDetectionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -179,7 +156,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo type, credentials, container, - identity, dataChangeDetectionPolicy, dataDeletionDetectionPolicy, odataEtag, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs index 675a4a69a7bf4..2ade373a02d46 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs @@ -18,11 +18,6 @@ public partial class SearchIndexerDataSourceConnection /// The type of the datasource. /// Credentials for the datasource. /// The data container for the datasource. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -31,18 +26,17 @@ public partial class SearchIndexerDataSourceConnection /// /// The data deletion detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// /// The ETag of the data source. /// 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 datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source 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 datasource definition 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. - internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; Type = type; CredentialsInternal = credentialsInternal; Container = container; - Identity = identity; DataChangeDetectionPolicy = dataChangeDetectionPolicy; DataDeletionDetectionPolicy = dataDeletionDetectionPolicy; _etag = etag; @@ -58,12 +52,6 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// The data container for the datasource. public SearchIndexerDataContainer Container { get; set; } /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . @@ -72,7 +60,7 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// /// The data deletion detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// public DataDeletionDetectionPolicy DataDeletionDetectionPolicy { get; set; } /// 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 datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source 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 datasource definition 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. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs index 304f7115735d2..d26fcef065b66 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs @@ -28,7 +28,6 @@ public SearchIndexerDataSourceType(string value) private const string AzureTableValue = "azuretable"; private const string MySqlValue = "mysql"; private const string AdlsGen2Value = "adlsgen2"; - private const string OneLakeValue = "onelake"; /// Indicates an Azure SQL datasource. public static SearchIndexerDataSourceType AzureSql { get; } = new SearchIndexerDataSourceType(AzureSqlValue); @@ -42,8 +41,6 @@ public SearchIndexerDataSourceType(string value) public static SearchIndexerDataSourceType MySql { get; } = new SearchIndexerDataSourceType(MySqlValue); /// Indicates an ADLS Gen2 datasource. public static SearchIndexerDataSourceType AdlsGen2 { get; } = new SearchIndexerDataSourceType(AdlsGen2Value); - /// Indicates a Microsoft Fabric OneLake datasource. - public static SearchIndexerDataSourceType OneLake { get; } = new SearchIndexerDataSourceType(OneLakeValue); /// Determines if two values are the same. public static bool operator ==(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs index 37073e1fbe7ef..d369f328ed298 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs @@ -28,13 +28,13 @@ internal static SearchIndexerDataUserAssignedIdentity DeserializeSearchIndexerDa { return null; } - string userAssignedIdentity = default; + ResourceIdentifier userAssignedIdentity = default; string odataType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("userAssignedIdentity"u8)) { - userAssignedIdentity = property.Value.GetString(); + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("@odata.type"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs index 6a23cd5538cba..e1d03e6a8fa3b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { @@ -15,7 +16,7 @@ public partial class SearchIndexerDataUserAssignedIdentity : SearchIndexerDataId /// Initializes a new instance of . /// 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. /// is null. - public SearchIndexerDataUserAssignedIdentity(string userAssignedIdentity) + public SearchIndexerDataUserAssignedIdentity(ResourceIdentifier userAssignedIdentity) { Argument.AssertNotNull(userAssignedIdentity, nameof(userAssignedIdentity)); @@ -26,13 +27,13 @@ public SearchIndexerDataUserAssignedIdentity(string userAssignedIdentity) /// Initializes a new instance of . /// A URI fragment specifying the type of identity. /// 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. - internal SearchIndexerDataUserAssignedIdentity(string oDataType, string userAssignedIdentity) : base(oDataType) + internal SearchIndexerDataUserAssignedIdentity(string oDataType, ResourceIdentifier userAssignedIdentity) : base(oDataType) { UserAssignedIdentity = userAssignedIdentity; ODataType = 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. - public string UserAssignedIdentity { get; set; } + public ResourceIdentifier UserAssignedIdentity { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs similarity index 86% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs index f94b7a1bc3427..4c27085191bce 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class SearchIndexerIndexProjections : IUtf8JsonSerializable + public partial class SearchIndexerIndexProjection : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -31,7 +31,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static SearchIndexerIndexProjections DeserializeSearchIndexerIndexProjections(JsonElement element) + internal static SearchIndexerIndexProjection DeserializeSearchIndexerIndexProjection(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -61,15 +61,15 @@ internal static SearchIndexerIndexProjections DeserializeSearchIndexerIndexProje continue; } } - return new SearchIndexerIndexProjections(selectors, parameters); + return new SearchIndexerIndexProjection(selectors, parameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static SearchIndexerIndexProjections FromResponse(Response response) + internal static SearchIndexerIndexProjection FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerIndexProjections(document.RootElement); + return DeserializeSearchIndexerIndexProjection(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs similarity index 80% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs index b96026d5e0520..3ce3c39f5fe1b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs @@ -12,22 +12,22 @@ namespace Azure.Search.Documents.Indexes.Models { /// Definition of additional projections to secondary search indexes. - public partial class SearchIndexerIndexProjections + public partial class SearchIndexerIndexProjection { - /// Initializes a new instance of . + /// Initializes a new instance of . /// A list of projections to be performed to secondary search indexes. /// is null. - public SearchIndexerIndexProjections(IEnumerable selectors) + public SearchIndexerIndexProjection(IEnumerable selectors) { Argument.AssertNotNull(selectors, nameof(selectors)); Selectors = selectors.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// A list of projections to be performed to secondary search indexes. /// A dictionary of index projection-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - internal SearchIndexerIndexProjections(IList selectors, SearchIndexerIndexProjectionsParameters parameters) + internal SearchIndexerIndexProjection(IList selectors, SearchIndexerIndexProjectionsParameters parameters) { Selectors = selectors; Parameters = parameters; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs deleted file mode 100644 index 7d406a2aaeebb..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerKnowledgeStoreParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SynthesizeGeneratedKeyName)) - { - writer.WritePropertyName("synthesizeGeneratedKeyName"u8); - writer.WriteBooleanValue(SynthesizeGeneratedKeyName.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - - internal static SearchIndexerKnowledgeStoreParameters DeserializeSearchIndexerKnowledgeStoreParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? synthesizeGeneratedKeyName = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("synthesizeGeneratedKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - synthesizeGeneratedKeyName = property.Value.GetBoolean(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); - } - additionalProperties = additionalPropertiesDictionary; - return new SearchIndexerKnowledgeStoreParameters(synthesizeGeneratedKeyName, additionalProperties); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchIndexerKnowledgeStoreParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerKnowledgeStoreParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs index 6c30d9beacdd6..20cb27b57f4b4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs @@ -10,10 +10,10 @@ namespace Azure.Search.Documents.Indexes.Models { /// 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. - public partial class SearchIndexerKnowledgeStoreParameters + internal partial class SearchIndexerKnowledgeStoreParameters { /// Initializes a new instance of . - public SearchIndexerKnowledgeStoreParameters() + internal SearchIndexerKnowledgeStoreParameters() { AdditionalProperties = new ChangeTrackingDictionary(); } @@ -21,15 +21,15 @@ public SearchIndexerKnowledgeStoreParameters() /// Initializes a new instance of . /// Whether or not projections should synthesize a generated key name if one isn't already present. /// Additional Properties. - internal SearchIndexerKnowledgeStoreParameters(bool? synthesizeGeneratedKeyName, IDictionary additionalProperties) + internal SearchIndexerKnowledgeStoreParameters(bool? synthesizeGeneratedKeyName, IReadOnlyDictionary additionalProperties) { SynthesizeGeneratedKeyName = synthesizeGeneratedKeyName; AdditionalProperties = additionalProperties; } /// Whether or not projections should synthesize a generated key name if one isn't already present. - public bool? SynthesizeGeneratedKeyName { get; set; } + public bool? SynthesizeGeneratedKeyName { get; } /// Additional Properties. - public IDictionary AdditionalProperties { get; } + public IReadOnlyDictionary AdditionalProperties { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index ab55a8bad84a8..7f8370507a332 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -60,7 +60,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele { switch (discriminator.GetString()) { - case "#Microsoft.Skills.Custom.AmlSkill": return AzureMachineLearningSkill.DeserializeAzureMachineLearningSkill(element); case "#Microsoft.Skills.Custom.WebApiSkill": return WebApiSkill.DeserializeWebApiSkill(element); case "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": return AzureOpenAIEmbeddingSkill.DeserializeAzureOpenAIEmbeddingSkill(element); case "#Microsoft.Skills.Text.CustomEntityLookupSkill": return CustomEntityLookupSkill.DeserializeCustomEntityLookupSkill(element); @@ -80,7 +79,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele case "#Microsoft.Skills.Util.ShaperSkill": return ShaperSkill.DeserializeShaperSkill(element); case "#Microsoft.Skills.Vision.ImageAnalysisSkill": return ImageAnalysisSkill.DeserializeImageAnalysisSkill(element); case "#Microsoft.Skills.Vision.OcrSkill": return OcrSkill.DeserializeOcrSkill(element); - case "#Microsoft.Skills.Vision.VectorizeSkill": return VisionVectorizeSkill.DeserializeVisionVectorizeSkill(element); } } return UnknownSearchIndexerSkill.DeserializeUnknownSearchIndexerSkill(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs index 654052bfd6d70..c32248d2910a2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs @@ -14,7 +14,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for skills. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// public partial class SearchIndexerSkill { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs index a79815a3a4a6b..8e95a7268c463 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs @@ -40,10 +40,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("knowledgeStore"u8); writer.WriteObjectValue(KnowledgeStore); } - if (Optional.IsDefined(IndexProjections)) + if (Optional.IsDefined(IndexProjection)) { writer.WritePropertyName("indexProjections"u8); - writer.WriteObjectValue(IndexProjections); + writer.WriteObjectValue(IndexProjection); } if (Optional.IsDefined(_etag)) { @@ -76,7 +76,7 @@ internal static SearchIndexerSkillset DeserializeSearchIndexerSkillset(JsonEleme IList skills = default; CognitiveServicesAccount cognitiveServices = default; KnowledgeStore knowledgeStore = default; - SearchIndexerIndexProjections indexProjections = default; + SearchIndexerIndexProjection indexProjections = default; string odataEtag = default; SearchResourceEncryptionKey encryptionKey = default; foreach (var property in element.EnumerateObject()) @@ -125,7 +125,7 @@ internal static SearchIndexerSkillset DeserializeSearchIndexerSkillset(JsonEleme { continue; } - indexProjections = SearchIndexerIndexProjections.DeserializeSearchIndexerIndexProjections(property.Value); + indexProjections = SearchIndexerIndexProjection.DeserializeSearchIndexerIndexProjection(property.Value); continue; } if (property.NameEquals("@odata.etag"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs index 0b7116b2981c7..e62f84e717be2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs @@ -19,7 +19,7 @@ public partial class SearchIndexerSkillset /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// /// or is null. public SearchIndexerSkillset(string name, IEnumerable skills) @@ -37,7 +37,7 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// /// /// Details about the Azure AI service to be used when running skills. @@ -45,17 +45,17 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// The available derived classes include and . /// /// Definition of additional projections to Azure blob, table, or files, of enriched data. - /// Definition of additional projections to secondary search index(es). + /// Definition of additional projections to secondary search index(es). /// The ETag of the skillset. /// 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 skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition. Once you have encrypted your skillset 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 skillset definition 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. - internal SearchIndexerSkillset(string name, string description, IList skills, CognitiveServicesAccount cognitiveServicesAccount, KnowledgeStore knowledgeStore, SearchIndexerIndexProjections indexProjections, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerSkillset(string name, string description, IList skills, CognitiveServicesAccount cognitiveServicesAccount, KnowledgeStore knowledgeStore, SearchIndexerIndexProjection indexProjection, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; Skills = skills; CognitiveServicesAccount = cognitiveServicesAccount; KnowledgeStore = knowledgeStore; - IndexProjections = indexProjections; + IndexProjection = indexProjection; _etag = etag; EncryptionKey = encryptionKey; } @@ -73,7 +73,7 @@ internal SearchIndexerSkillset(string name, string description, IList Definition of additional projections to Azure blob, table, or files, of enriched data. public KnowledgeStore KnowledgeStore { get; set; } /// Definition of additional projections to secondary search index(es). - public SearchIndexerIndexProjections IndexProjections { get; set; } + public SearchIndexerIndexProjection IndexProjection { get; set; } /// 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 skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition. Once you have encrypted your skillset 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 skillset definition 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. public SearchResourceEncryptionKey EncryptionKey { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs index 2b34ce6289fbc..fdad8d3756b40 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs @@ -92,10 +92,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("scoringProfile"u8); writer.WriteStringValue(ScoringProfile); } - if (Optional.IsDefined(SemanticQuery)) + if (Optional.IsDefined(SearchText)) { - writer.WritePropertyName("semanticQuery"u8); - writer.WriteStringValue(SemanticQuery); + writer.WritePropertyName("search"u8); + writer.WriteStringValue(SearchText); + } + if (Optional.IsDefined(SearchFieldsRaw)) + { + writer.WritePropertyName("searchFields"u8); + writer.WriteStringValue(SearchFieldsRaw); + } + if (Optional.IsDefined(SearchMode)) + { + writer.WritePropertyName("searchMode"u8); + writer.WriteStringValue(SearchMode.Value.ToSerialString()); + } + if (Optional.IsDefined(SelectRaw)) + { + writer.WritePropertyName("select"u8); + writer.WriteStringValue(SelectRaw); + } + if (Optional.IsDefined(Skip)) + { + writer.WritePropertyName("skip"u8); + writer.WriteNumberValue(Skip.Value); + } + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("top"u8); + writer.WriteNumberValue(Size.Value); } if (Optional.IsDefined(SemanticConfigurationName)) { @@ -119,66 +144,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("semanticMaxWaitInMilliseconds"); } } - if (Optional.IsDefined(Debug)) - { - writer.WritePropertyName("debug"u8); - writer.WriteStringValue(Debug.Value.ToString()); - } - if (Optional.IsDefined(SearchText)) - { - writer.WritePropertyName("search"u8); - writer.WriteStringValue(SearchText); - } - if (Optional.IsDefined(SearchFieldsRaw)) - { - writer.WritePropertyName("searchFields"u8); - writer.WriteStringValue(SearchFieldsRaw); - } - if (Optional.IsDefined(SearchMode)) - { - writer.WritePropertyName("searchMode"u8); - writer.WriteStringValue(SearchMode.Value.ToSerialString()); - } - if (Optional.IsDefined(QueryLanguage)) - { - writer.WritePropertyName("queryLanguage"u8); - writer.WriteStringValue(QueryLanguage.Value.ToString()); - } - if (Optional.IsDefined(QuerySpeller)) + if (Optional.IsDefined(SemanticQuery)) { - writer.WritePropertyName("speller"u8); - writer.WriteStringValue(QuerySpeller.Value.ToString()); + writer.WritePropertyName("semanticQuery"u8); + writer.WriteStringValue(SemanticQuery); } if (Optional.IsDefined(QueryAnswerRaw)) { writer.WritePropertyName("answers"u8); writer.WriteStringValue(QueryAnswerRaw); } - if (Optional.IsDefined(SelectRaw)) - { - writer.WritePropertyName("select"u8); - writer.WriteStringValue(SelectRaw); - } - if (Optional.IsDefined(Skip)) - { - writer.WritePropertyName("skip"u8); - writer.WriteNumberValue(Skip.Value); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("top"u8); - writer.WriteNumberValue(Size.Value); - } if (Optional.IsDefined(QueryCaptionRaw)) { writer.WritePropertyName("captions"u8); writer.WriteStringValue(QueryCaptionRaw); } - if (Optional.IsDefined(SemanticFieldsRaw)) - { - writer.WritePropertyName("semanticFields"u8); - writer.WriteStringValue(SemanticFieldsRaw); - } if (Optional.IsCollectionDefined(VectorQueries)) { writer.WritePropertyName("vectorQueries"u8); @@ -194,11 +174,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("vectorFilterMode"u8); writer.WriteStringValue(FilterMode.Value.ToString()); } - if (Optional.IsDefined(HybridSearch)) - { - writer.WritePropertyName("hybridSearch"u8); - writer.WriteObjectValue(HybridSearch); - } writer.WriteEndObject(); } @@ -221,25 +196,20 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) string sessionId = default; IList scoringParameters = default; string scoringProfile = default; - string semanticQuery = default; - string semanticConfiguration = default; - SemanticErrorMode? semanticErrorHandling = default; - int? semanticMaxWaitInMilliseconds = default; - QueryDebugMode? debug = default; string search = default; string searchFields = default; SearchMode? searchMode = default; - QueryLanguage? queryLanguage = default; - QuerySpellerType? speller = default; - string answers = default; string select = default; int? skip = default; int? top = default; + string semanticConfiguration = default; + SemanticErrorMode? semanticErrorHandling = default; + int? semanticMaxWaitInMilliseconds = default; + string semanticQuery = default; + string answers = default; string captions = default; - string semanticFields = default; IList vectorQueries = default; VectorFilterMode? vectorFilterMode = default; - HybridSearch hybridSearch = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("count"u8)) @@ -341,79 +311,75 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) scoringProfile = property.Value.GetString(); continue; } - if (property.NameEquals("semanticQuery"u8)) + if (property.NameEquals("search"u8)) { - semanticQuery = property.Value.GetString(); + search = property.Value.GetString(); continue; } - if (property.NameEquals("semanticConfiguration"u8)) + if (property.NameEquals("searchFields"u8)) { - semanticConfiguration = property.Value.GetString(); + searchFields = property.Value.GetString(); continue; } - if (property.NameEquals("semanticErrorHandling"u8)) + if (property.NameEquals("searchMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - semanticErrorHandling = new SemanticErrorMode(property.Value.GetString()); + searchMode = property.Value.GetString().ToSearchMode(); continue; } - if (property.NameEquals("semanticMaxWaitInMilliseconds"u8)) + if (property.NameEquals("select"u8)) + { + select = property.Value.GetString(); + continue; + } + if (property.NameEquals("skip"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - semanticMaxWaitInMilliseconds = null; continue; } - semanticMaxWaitInMilliseconds = property.Value.GetInt32(); + skip = property.Value.GetInt32(); continue; } - if (property.NameEquals("debug"u8)) + if (property.NameEquals("top"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - debug = new QueryDebugMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("search"u8)) - { - search = property.Value.GetString(); + top = property.Value.GetInt32(); continue; } - if (property.NameEquals("searchFields"u8)) + if (property.NameEquals("semanticConfiguration"u8)) { - searchFields = property.Value.GetString(); + semanticConfiguration = property.Value.GetString(); continue; } - if (property.NameEquals("searchMode"u8)) + if (property.NameEquals("semanticErrorHandling"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - searchMode = property.Value.GetString().ToSearchMode(); + semanticErrorHandling = new SemanticErrorMode(property.Value.GetString()); continue; } - if (property.NameEquals("queryLanguage"u8)) + if (property.NameEquals("semanticMaxWaitInMilliseconds"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + semanticMaxWaitInMilliseconds = null; continue; } - queryLanguage = new QueryLanguage(property.Value.GetString()); + semanticMaxWaitInMilliseconds = property.Value.GetInt32(); continue; } - if (property.NameEquals("speller"u8)) + if (property.NameEquals("semanticQuery"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - speller = new QuerySpellerType(property.Value.GetString()); + semanticQuery = property.Value.GetString(); continue; } if (property.NameEquals("answers"u8)) @@ -421,39 +387,11 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) answers = property.Value.GetString(); continue; } - if (property.NameEquals("select"u8)) - { - select = property.Value.GetString(); - continue; - } - if (property.NameEquals("skip"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skip = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("top"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - top = property.Value.GetInt32(); - continue; - } if (property.NameEquals("captions"u8)) { captions = property.Value.GetString(); continue; } - if (property.NameEquals("semanticFields"u8)) - { - semanticFields = property.Value.GetString(); - continue; - } if (property.NameEquals("vectorQueries"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -477,15 +415,6 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) vectorFilterMode = new VectorFilterMode(property.Value.GetString()); continue; } - if (property.NameEquals("hybridSearch"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hybridSearch = HybridSearch.DeserializeHybridSearch(property.Value); - continue; - } } return new SearchOptions( count, @@ -501,25 +430,20 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) sessionId, scoringParameters ?? new ChangeTrackingList(), scoringProfile, - semanticQuery, - semanticConfiguration, - semanticErrorHandling, - semanticMaxWaitInMilliseconds, - debug, search, searchFields, searchMode, - queryLanguage, - speller, - answers, select, skip, top, + semanticConfiguration, + semanticErrorHandling, + semanticMaxWaitInMilliseconds, + semanticQuery, + answers, captions, - semanticFields, vectorQueries ?? new ChangeTrackingList(), - vectorFilterMode, - hybridSearch); + vectorFilterMode); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs index 658a7d2f4873b..ae9139b8aac7e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs @@ -38,7 +38,5 @@ public SearchOptions() public SearchMode? SearchMode { get; set; } /// 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. public int? Skip { get; set; } - /// The query parameters to configure hybrid search behaviors. - public HybridSearch HybridSearch { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs index 6f1eb715d6d60..02d9ffbf383fc 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs @@ -26,18 +26,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("accessCredentials"u8); writer.WriteObjectValue(AccessCredentialsInternal); } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } writer.WriteEndObject(); } @@ -51,7 +39,6 @@ internal static SearchResourceEncryptionKey DeserializeSearchResourceEncryptionK string keyVaultKeyVersion = default; string keyVaultUri = default; AzureActiveDirectoryApplicationCredentials accessCredentials = default; - SearchIndexerDataIdentity identity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("keyVaultKeyName"u8)) @@ -78,18 +65,8 @@ internal static SearchResourceEncryptionKey DeserializeSearchResourceEncryptionK accessCredentials = AzureActiveDirectoryApplicationCredentials.DeserializeAzureActiveDirectoryApplicationCredentials(property.Value); continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } } - return new SearchResourceEncryptionKey(keyVaultKeyName, keyVaultKeyVersion, keyVaultUri, accessCredentials, identity); + return new SearchResourceEncryptionKey(keyVaultKeyName, keyVaultKeyVersion, keyVaultUri, accessCredentials); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs index bbb9e6c17fa17..3a51a4463def6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs @@ -17,24 +17,12 @@ public partial class SearchResourceEncryptionKey /// The version of your Azure Key Vault key to be used to encrypt your data at rest. /// The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be `https://my-keyvault-name.vault.azure.net`. /// Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal SearchResourceEncryptionKey(string keyName, string keyVersion, string vaultUri, AzureActiveDirectoryApplicationCredentials accessCredentialsInternal, SearchIndexerDataIdentity identity) + internal SearchResourceEncryptionKey(string keyName, string keyVersion, string vaultUri, AzureActiveDirectoryApplicationCredentials accessCredentialsInternal) { KeyName = keyName; KeyVersion = keyVersion; _vaultUri = vaultUri; AccessCredentialsInternal = accessCredentialsInternal; - Identity = identity; } - /// - /// 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. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs index c9b3b6dd852a6..48e14dfe0c398 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs @@ -22,7 +22,6 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) double? searchRerankerScore = default; IReadOnlyDictionary> searchHighlights = default; IReadOnlyList searchCaptions = default; - IReadOnlyList searchDocumentDebugInfo = default; IReadOnlyDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -83,31 +82,10 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) searchCaptions = array; continue; } - if (property.NameEquals("@search.documentDebugInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - searchDocumentDebugInfo = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Models.DocumentDebugInfo.DeserializeDocumentDebugInfo(item)); - } - searchDocumentDebugInfo = array; - continue; - } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SearchResult( - searchScore, - searchRerankerScore, - searchHighlights ?? new ChangeTrackingDictionary>(), - searchCaptions ?? new ChangeTrackingList(), - searchDocumentDebugInfo ?? new ChangeTrackingList(), - additionalProperties); + return new SearchResult(searchScore, searchRerankerScore, searchHighlights ?? new ChangeTrackingDictionary>(), searchCaptions ?? new ChangeTrackingList(), additionalProperties); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs index 57fab92fcd80c..981acaed0624c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs @@ -19,7 +19,6 @@ internal SearchResult(double score) Score = score; Highlights = new ChangeTrackingDictionary>(); Captions = new ChangeTrackingList(); - DocumentDebugInfo = new ChangeTrackingList(); AdditionalProperties = new ChangeTrackingDictionary(); } @@ -28,15 +27,13 @@ internal SearchResult(double score) /// The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. /// 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. /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. - /// Contains debugging information that can be used to further explore your search results. /// Additional Properties. - internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, IReadOnlyList documentDebugInfo, IReadOnlyDictionary additionalProperties) + internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, IReadOnlyDictionary additionalProperties) { Score = score; RerankerScore = rerankerScore; Highlights = highlights; Captions = captions; - DocumentDebugInfo = documentDebugInfo; AdditionalProperties = additionalProperties; } @@ -48,8 +45,6 @@ internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> Highlights { get; } /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. public IReadOnlyList Captions { get; } - /// Contains debugging information that can be used to further explore your search results. - public IReadOnlyList DocumentDebugInfo { get; } /// Additional Properties. public IReadOnlyDictionary AdditionalProperties { get; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs deleted file mode 100644 index f2b5a82bbdb06..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class SearchScoreThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Value); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static SearchScoreThreshold DeserializeSearchScoreThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - double value = default; - VectorThresholdKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new SearchScoreThreshold(kind, value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SearchScoreThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchScoreThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs deleted file mode 100644 index c4187e5820ae2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// 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. - public partial class SearchScoreThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// 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. - public SearchScoreThreshold(double value) - { - Value = value; - Kind = VectorThresholdKind.SearchScore; - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - /// 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. - internal SearchScoreThreshold(VectorThresholdKind kind, double value) : base(kind) - { - Value = value; - Kind = kind; - } - - /// 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. - public double Value { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs index 16a4c2345a078..47b2b352e890d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs @@ -17,7 +17,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme { return null; } - SearchResourceCounter aliasesCount = default; SearchResourceCounter documentCount = default; SearchResourceCounter indexesCount = default; SearchResourceCounter indexersCount = default; @@ -28,11 +27,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme SearchResourceCounter vectorIndexSize = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("aliasesCount"u8)) - { - aliasesCount = SearchResourceCounter.DeserializeSearchResourceCounter(property.Value); - continue; - } if (property.NameEquals("documentCount"u8)) { documentCount = SearchResourceCounter.DeserializeSearchResourceCounter(property.Value); @@ -75,7 +69,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme } } return new SearchServiceCounters( - aliasesCount, documentCount, indexesCount, indexersCount, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs index c63049576a303..043299a1a217e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Indexes.Models public partial class SearchServiceCounters { /// Initializes a new instance of . - /// Total number of aliases. /// Total number of documents across all indexes in the service. /// Total number of indexes. /// Total number of indexers. @@ -22,10 +21,9 @@ public partial class SearchServiceCounters /// Total number of synonym maps. /// Total number of skillsets. /// Total memory consumption of all vector indexes within the service, in bytes. - /// , , , , , , , or is null. - internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourceCounter documentCounter, SearchResourceCounter indexCounter, SearchResourceCounter indexerCounter, SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter, SearchResourceCounter vectorIndexSizeCounter) + /// , , , , , , or is null. + internal SearchServiceCounters(SearchResourceCounter documentCounter, SearchResourceCounter indexCounter, SearchResourceCounter indexerCounter, SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter, SearchResourceCounter vectorIndexSizeCounter) { - Argument.AssertNotNull(aliasCounter, nameof(aliasCounter)); Argument.AssertNotNull(documentCounter, nameof(documentCounter)); Argument.AssertNotNull(indexCounter, nameof(indexCounter)); Argument.AssertNotNull(indexerCounter, nameof(indexerCounter)); @@ -35,7 +33,6 @@ internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourc Argument.AssertNotNull(skillsetCounter, nameof(skillsetCounter)); Argument.AssertNotNull(vectorIndexSizeCounter, nameof(vectorIndexSizeCounter)); - AliasCounter = aliasCounter; DocumentCounter = documentCounter; IndexCounter = indexCounter; IndexerCounter = indexerCounter; @@ -46,8 +43,6 @@ internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourc VectorIndexSizeCounter = vectorIndexSizeCounter; } - /// Total number of aliases. - public SearchResourceCounter AliasCounter { get; } /// Total number of documents across all indexes in the service. public SearchResourceCounter DocumentCounter { get; } /// Total number of indexes. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs deleted file mode 100644 index d7d08f89a1423..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class SemanticDebugInfo - { - internal static SemanticDebugInfo DeserializeSemanticDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - QueryResultDocumentSemanticField titleField = default; - IReadOnlyList contentFields = default; - IReadOnlyList keywordFields = default; - QueryResultDocumentRerankerInput rerankerInput = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("titleField"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - titleField = QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(property.Value); - continue; - } - if (property.NameEquals("contentFields"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(item)); - } - contentFields = array; - continue; - } - if (property.NameEquals("keywordFields"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(item)); - } - keywordFields = array; - continue; - } - if (property.NameEquals("rerankerInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rerankerInput = QueryResultDocumentRerankerInput.DeserializeQueryResultDocumentRerankerInput(property.Value); - continue; - } - } - return new SemanticDebugInfo(titleField, contentFields ?? new ChangeTrackingList(), keywordFields ?? new ChangeTrackingList(), rerankerInput); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SemanticDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSemanticDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs deleted file mode 100644 index 6f15066b9bbe3..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The SemanticDebugInfo. - public partial class SemanticDebugInfo - { - /// Initializes a new instance of . - internal SemanticDebugInfo() - { - ContentFields = new ChangeTrackingList(); - KeywordFields = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - /// The raw concatenated strings that were sent to the semantic enrichment process. - internal SemanticDebugInfo(QueryResultDocumentSemanticField titleField, IReadOnlyList contentFields, IReadOnlyList keywordFields, QueryResultDocumentRerankerInput rerankerInput) - { - TitleField = titleField; - ContentFields = contentFields; - KeywordFields = keywordFields; - RerankerInput = rerankerInput; - } - - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - public QueryResultDocumentSemanticField TitleField { get; } - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - public IReadOnlyList ContentFields { get; } - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - public IReadOnlyList KeywordFields { get; } - /// The raw concatenated strings that were sent to the semantic enrichment process. - public QueryResultDocumentRerankerInput RerankerInput { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs index f0a283b4620b0..6a52eed89efeb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs @@ -26,7 +26,7 @@ public SemanticErrorReason(string value) private const string CapacityOverloadedValue = "capacityOverloaded"; private const string TransientValue = "transient"; - /// If 'semanticMaxWaitInMilliseconds' was set and the semantic processing duration exceeded that value. Only the base results were returned. + /// If `semanticMaxWaitInMilliseconds` was set and the semantic processing duration exceeded that value. Only the base results were returned. public static SemanticErrorReason MaxWaitExceeded { get; } = new SemanticErrorReason(MaxWaitExceededValue); /// The request was throttled. Only the base results were returned. public static SemanticErrorReason CapacityOverloaded { get; } = new SemanticErrorReason(CapacityOverloadedValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs deleted file mode 100644 index ee41326df8cd1..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The way the field was used for the semantic enrichment process. - public readonly partial struct SemanticFieldState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SemanticFieldState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UsedValue = "used"; - private const string UnusedValue = "unused"; - private const string PartialValue = "partial"; - - /// The field was fully used for semantic enrichment. - public static SemanticFieldState Used { get; } = new SemanticFieldState(UsedValue); - /// The field was not used for semantic enrichment. - public static SemanticFieldState Unused { get; } = new SemanticFieldState(UnusedValue); - /// The field was partially used for semantic enrichment. - public static SemanticFieldState Partial { get; } = new SemanticFieldState(PartialValue); - /// Determines if two values are the same. - public static bool operator ==(SemanticFieldState left, SemanticFieldState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SemanticFieldState left, SemanticFieldState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SemanticFieldState(string value) => new SemanticFieldState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SemanticFieldState other && Equals(other); - /// - public bool Equals(SemanticFieldState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs index 37823872aef5f..2c7101eb58515 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs @@ -111,7 +111,7 @@ public TokenFilterName(string value) public static TokenFilterName Snowball { get; } = new TokenFilterName(SnowballValue); /// Normalizes the Unicode representation of Sorani text. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ckb/SoraniNormalizationFilter.html. public static TokenFilterName SoraniNormalization { get; } = new TokenFilterName(SoraniNormalizationValue); - /// Language specific stemming filter. See https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters. + /// Language specific stemming filter. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters. public static TokenFilterName Stemmer { get; } = new TokenFilterName(StemmerValue); /// Removes stop words from a token stream. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html. public static TokenFilterName Stopwords { get; } = new TokenFilterName(StopwordsValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs deleted file mode 100644 index baf969295278f..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Models -{ - internal partial class UnknownLexicalNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static UnknownLexicalNormalizer DeserializeUnknownLexicalNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string odataType = "Unknown"; - string name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new UnknownLexicalNormalizer(odataType, name); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new UnknownLexicalNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownLexicalNormalizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs deleted file mode 100644 index 0805ebc85bc69..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Models -{ - /// Unknown version of LexicalNormalizer. - internal partial class UnknownLexicalNormalizer : LexicalNormalizer - { - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - internal UnknownLexicalNormalizer(string oDataType, string name) : base(oDataType, name) - { - ODataType = oDataType ?? "Unknown"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs index f394363037e4e..8f161f311fa7d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs @@ -42,11 +42,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -62,7 +57,6 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -111,15 +105,6 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new UnknownVectorQuery( kind, @@ -127,8 +112,7 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele fields, exhaustive, oversampling, - weight, - threshold); + weight); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs index ce63d0fc11e48..d87adc7730008 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs @@ -17,12 +17,7 @@ internal partial class UnknownVectorQuery : VectorQuery /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs similarity index 84% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs index 51a79283ac888..735c75b9e7b59 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Models { - internal partial class UnknownVectorSearchCompressionConfiguration : IUtf8JsonSerializable + internal partial class UnknownVectorSearchCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -40,7 +40,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UnknownVectorSearchCompressionConfiguration DeserializeUnknownVectorSearchCompressionConfiguration(JsonElement element) + internal static UnknownVectorSearchCompression DeserializeUnknownVectorSearchCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -82,22 +82,22 @@ internal static UnknownVectorSearchCompressionConfiguration DeserializeUnknownVe continue; } } - return new UnknownVectorSearchCompressionConfiguration(name, kind, rerankWithOriginalVectors, defaultOversampling); + return new UnknownVectorSearchCompression(name, kind, rerankWithOriginalVectors, defaultOversampling); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownVectorSearchCompressionConfiguration FromResponse(Response response) + internal static new UnknownVectorSearchCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownVectorSearchCompressionConfiguration(document.RootElement); + return DeserializeUnknownVectorSearchCompression(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); + content.JsonWriter.WriteObjectValue(this); return content; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs index 9e3887fe2c428..125ebc32210f2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs @@ -9,15 +9,15 @@ namespace Azure.Search.Documents.Models { - /// Unknown version of VectorSearchCompressionConfiguration. - internal partial class UnknownVectorSearchCompressionConfiguration : VectorSearchCompressionConfiguration + /// Unknown version of VectorSearchCompression. + internal partial class UnknownVectorSearchCompression : VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// 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. /// 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. - internal UnknownVectorSearchCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(name, kind, rerankWithOriginalVectors, defaultOversampling) + internal UnknownVectorSearchCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs index 2b29b5c1be05e..9a7df0125f35a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs @@ -17,7 +17,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs index cb62ff9d0943b..6ade9464f87f5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs @@ -13,9 +13,9 @@ namespace Azure.Search.Documents.Models internal partial class UnknownVectorSearchVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - internal UnknownVectorSearchVectorizer(string name, VectorSearchVectorizerKind kind) : base(name, kind) + internal UnknownVectorSearchVectorizer(string vectorizerName, VectorSearchVectorizerKind kind) : base(vectorizerName, kind) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs deleted file mode 100644 index bb1cdede2881c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - internal partial class UnknownVectorThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static UnknownVectorThreshold DeserializeUnknownVectorThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorThresholdKind kind = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new UnknownVectorThreshold(kind); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new UnknownVectorThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownVectorThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs deleted file mode 100644 index d67082e14caee..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Unknown version of VectorThreshold. - internal partial class UnknownVectorThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - internal UnknownVectorThreshold(VectorThresholdKind kind) : base(kind) - { - Kind = kind; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs index 2265d14e8c85c..5704b0c652937 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs @@ -42,11 +42,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -60,8 +55,6 @@ internal static VectorQuery DeserializeVectorQuery(JsonElement element) { switch (discriminator.GetString()) { - case "imageBinary": return VectorizableImageBinaryQuery.DeserializeVectorizableImageBinaryQuery(element); - case "imageUrl": return VectorizableImageUrlQuery.DeserializeVectorizableImageUrlQuery(element); case "text": return VectorizableTextQuery.DeserializeVectorizableTextQuery(element); case "vector": return VectorizedQuery.DeserializeVectorizedQuery(element); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs index 01b0892527f50..bff7655efbe5c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Models /// /// The query parameters for vector and hybrid search queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public abstract partial class VectorQuery { @@ -26,12 +26,7 @@ protected VectorQuery() /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold) + internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight) { Kind = kind; KNearestNeighborsCount = kNearestNeighborsCount; @@ -39,7 +34,6 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f Exhaustive = exhaustive; Oversampling = oversampling; Weight = weight; - Threshold = threshold; } /// The kind of vector query being performed. @@ -52,11 +46,5 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f public double? Oversampling { get; set; } /// 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. public float? Weight { get; set; } - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public VectorThreshold Threshold { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs index 7033d26cddae1..8a071216cd4e9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs @@ -24,17 +24,11 @@ public VectorQueryKind(string value) private const string VectorValue = "vector"; private const string TextValue = "text"; - private const string ImageUrlValue = "imageUrl"; - private const string ImageBinaryValue = "imageBinary"; /// Vector query where a raw vector value is provided. public static VectorQueryKind Vector { get; } = new VectorQueryKind(VectorValue); /// Vector query where a text value that needs to be vectorized is provided. public static VectorQueryKind Text { get; } = new VectorQueryKind(TextValue); - /// Vector query where an url that represents an image value that needs to be vectorized is provided. - public static VectorQueryKind ImageUrl { get; } = new VectorQueryKind(ImageUrlValue); - /// Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. - public static VectorQueryKind ImageBinary { get; } = new VectorQueryKind(ImageBinaryValue); /// Determines if two values are the same. public static bool operator ==(VectorQueryKind left, VectorQueryKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs index 149b155125ced..90d91d0a2e861 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs @@ -68,7 +68,7 @@ internal static VectorSearch DeserializeVectorSearch(JsonElement element) IList profiles = default; IList algorithms = default; IList vectorizers = default; - IList compressions = default; + IList compressions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("profiles"u8)) @@ -119,16 +119,16 @@ internal static VectorSearch DeserializeVectorSearch(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VectorSearchCompressionConfiguration.DeserializeVectorSearchCompressionConfiguration(item)); + array.Add(VectorSearchCompression.DeserializeVectorSearchCompression(item)); } compressions = array; continue; } } - return new VectorSearch(profiles ?? new ChangeTrackingList(), algorithms ?? new ChangeTrackingList(), vectorizers ?? new ChangeTrackingList(), compressions ?? new ChangeTrackingList()); + return new VectorSearch(profiles ?? new ChangeTrackingList(), algorithms ?? new ChangeTrackingList(), vectorizers ?? new ChangeTrackingList(), compressions ?? new ChangeTrackingList()); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs index 6cfca8afaf890..d7012eb5bcb12 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs @@ -18,7 +18,7 @@ public VectorSearch() Profiles = new ChangeTrackingList(); Algorithms = new ChangeTrackingList(); Vectorizers = new ChangeTrackingList(); - Compressions = new ChangeTrackingList(); + Compressions = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -31,14 +31,14 @@ public VectorSearch() /// /// Contains configuration options on how to vectorize text vector queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - internal VectorSearch(IList profiles, IList algorithms, IList vectorizers, IList compressions) + internal VectorSearch(IList profiles, IList algorithms, IList vectorizers, IList compressions) { Profiles = profiles; Algorithms = algorithms; @@ -57,14 +57,14 @@ internal VectorSearch(IList profiles, IList /// Contains configuration options on how to vectorize text vector queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public IList Vectorizers { get; } /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - public IList Compressions { get; } + public IList Compressions { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs similarity index 76% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs index 26cb1600482e7..ef82bd90736bf 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class VectorSearchCompressionConfiguration : IUtf8JsonSerializable + public partial class VectorSearchCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -40,7 +40,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VectorSearchCompressionConfiguration DeserializeVectorSearchCompressionConfiguration(JsonElement element) + internal static VectorSearchCompression DeserializeVectorSearchCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -50,18 +50,19 @@ internal static VectorSearchCompressionConfiguration DeserializeVectorSearchComp { switch (discriminator.GetString()) { - case "scalarQuantization": return ScalarQuantizationCompressionConfiguration.DeserializeScalarQuantizationCompressionConfiguration(element); + case "binaryQuantization": return BinaryQuantizationCompression.DeserializeBinaryQuantizationCompression(element); + case "scalarQuantization": return ScalarQuantizationCompression.DeserializeScalarQuantizationCompression(element); } } - return UnknownVectorSearchCompressionConfiguration.DeserializeUnknownVectorSearchCompressionConfiguration(element); + return UnknownVectorSearchCompression.DeserializeUnknownVectorSearchCompression(element); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static VectorSearchCompressionConfiguration FromResponse(Response response) + internal static VectorSearchCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorSearchCompressionConfiguration(document.RootElement); + return DeserializeVectorSearchCompression(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs index 46ceca3206d40..d76881b85ec77 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs @@ -11,36 +11,33 @@ namespace Azure.Search.Documents.Indexes.Models { /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - public abstract partial class VectorSearchCompressionConfiguration + public abstract partial class VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. - /// is null. - protected VectorSearchCompressionConfiguration(string name) + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + protected VectorSearchCompression(string compressionName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(compressionName, nameof(compressionName)); - Name = name; + CompressionName = compressionName; } - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// 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. /// 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. - internal VectorSearchCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) + internal VectorSearchCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) { - Name = name; + CompressionName = compressionName; Kind = kind; RerankWithOriginalVectors = rerankWithOriginalVectors; DefaultOversampling = defaultOversampling; } - - /// The name to associate with this particular configuration. - public string Name { get; set; } /// The name of the kind of compression method being configured for use with vector search. internal VectorSearchCompressionKind Kind { get; set; } /// 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. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs index bd50e15c46263..efb6bba29a1f2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs @@ -23,9 +23,12 @@ public VectorSearchCompressionKind(string value) } private const string ScalarQuantizationValue = "scalarQuantization"; + private const string BinaryQuantizationValue = "binaryQuantization"; /// Scalar Quantization, a type of compression method. In scalar quantization, the original vectors values are compressed to a narrower type by discretizing and representing each component of a vector using a reduced set of quantized values, thereby reducing the overall data size. public static VectorSearchCompressionKind ScalarQuantization { get; } = new VectorSearchCompressionKind(ScalarQuantizationValue); + /// Binary Quantization, a type of compression method. In binary quantization, the original vectors values are compressed to the narrower binary type by discretizing and representing each component of a vector using binary values, thereby reducing the overall data size. + public static VectorSearchCompressionKind BinaryQuantization { get; } = new VectorSearchCompressionKind(BinaryQuantizationValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchCompressionKind left, VectorSearchCompressionKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs similarity index 63% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs index e454ced254051..88b24e9db1232 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { /// The quantized data type of compressed vector values. - public readonly partial struct VectorSearchCompressionTargetDataType : IEquatable + public readonly partial struct VectorSearchCompressionTarget : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public VectorSearchCompressionTargetDataType(string value) + public VectorSearchCompressionTarget(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -25,19 +25,19 @@ public VectorSearchCompressionTargetDataType(string value) private const string Int8Value = "int8"; /// int8. - public static VectorSearchCompressionTargetDataType Int8 { get; } = new VectorSearchCompressionTargetDataType(Int8Value); - /// Determines if two values are the same. - public static bool operator ==(VectorSearchCompressionTargetDataType left, VectorSearchCompressionTargetDataType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorSearchCompressionTargetDataType left, VectorSearchCompressionTargetDataType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VectorSearchCompressionTargetDataType(string value) => new VectorSearchCompressionTargetDataType(value); + public static VectorSearchCompressionTarget Int8 { get; } = new VectorSearchCompressionTarget(Int8Value); + /// Determines if two values are the same. + public static bool operator ==(VectorSearchCompressionTarget left, VectorSearchCompressionTarget right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VectorSearchCompressionTarget left, VectorSearchCompressionTarget right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VectorSearchCompressionTarget(string value) => new VectorSearchCompressionTarget(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorSearchCompressionTargetDataType other && Equals(other); + public override bool Equals(object obj) => obj is VectorSearchCompressionTarget other && Equals(other); /// - public bool Equals(VectorSearchCompressionTargetDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(VectorSearchCompressionTarget other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs index 00dd429a8897b..d883e50ce6547 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs @@ -19,15 +19,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Name); writer.WritePropertyName("algorithm"u8); writer.WriteStringValue(AlgorithmConfigurationName); - if (Optional.IsDefined(Vectorizer)) + if (Optional.IsDefined(VectorizerName)) { writer.WritePropertyName("vectorizer"u8); - writer.WriteStringValue(Vectorizer); + writer.WriteStringValue(VectorizerName); } - if (Optional.IsDefined(CompressionConfigurationName)) + if (Optional.IsDefined(CompressionName)) { writer.WritePropertyName("compression"u8); - writer.WriteStringValue(CompressionConfigurationName); + writer.WriteStringValue(CompressionName); } writer.WriteEndObject(); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs index 53859ee27e2a1..fc545f7077ba1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs @@ -28,23 +28,23 @@ public VectorSearchProfile(string name, string algorithmConfigurationName) /// Initializes a new instance of . /// The name to associate with this particular vector search profile. /// The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. - /// The name of the kind of vectorization method being configured for use with vector search. - /// The name of the compression method configuration that specifies the compression method and optional parameters. - internal VectorSearchProfile(string name, string algorithmConfigurationName, string vectorizer, string compressionConfigurationName) + /// The name of the vectorization being configured for use with vector search. + /// The name of the compression method configuration that specifies the compression method and optional parameters. + internal VectorSearchProfile(string name, string algorithmConfigurationName, string vectorizerName, string compressionName) { Name = name; AlgorithmConfigurationName = algorithmConfigurationName; - Vectorizer = vectorizer; - CompressionConfigurationName = compressionConfigurationName; + VectorizerName = vectorizerName; + CompressionName = compressionName; } /// The name to associate with this particular vector search profile. public string Name { get; set; } /// The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. public string AlgorithmConfigurationName { get; set; } - /// The name of the kind of vectorization method being configured for use with vector search. - public string Vectorizer { get; set; } + /// The name of the vectorization being configured for use with vector search. + public string VectorizerName { get; set; } /// The name of the compression method configuration that specifies the compression method and optional parameters. - public string CompressionConfigurationName { get; set; } + public string CompressionName { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs index e384ae6de8ec5..576c0c26b04b3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs @@ -17,7 +17,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); @@ -33,10 +33,8 @@ internal static VectorSearchVectorizer DeserializeVectorSearchVectorizer(JsonEle { switch (discriminator.GetString()) { - case "aiServicesVision": return AIServicesVisionVectorizer.DeserializeAIServicesVisionVectorizer(element); - case "aml": return AzureMachineLearningVectorizer.DeserializeAzureMachineLearningVectorizer(element); case "azureOpenAI": return AzureOpenAIVectorizer.DeserializeAzureOpenAIVectorizer(element); - case "customWebApi": return CustomVectorizer.DeserializeCustomVectorizer(element); + case "customWebApi": return WebApiVectorizer.DeserializeWebApiVectorizer(element); } } return UnknownVectorSearchVectorizer.DeserializeUnknownVectorSearchVectorizer(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs index 1baabeb601ec4..a5b227d68b2db 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs @@ -12,31 +12,28 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Specifies the vectorization method to be used during query time. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public abstract partial class VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - protected VectorSearchVectorizer(string name) + /// The name to associate with this particular vectorization method. + /// is null. + protected VectorSearchVectorizer(string vectorizerName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); - Name = name; + VectorizerName = vectorizerName; } /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - internal VectorSearchVectorizer(string name, VectorSearchVectorizerKind kind) + internal VectorSearchVectorizer(string vectorizerName, VectorSearchVectorizerKind kind) { - Name = name; + VectorizerName = vectorizerName; Kind = kind; } - - /// The name to associate with this particular vectorization method. - public string Name { get; set; } /// The name of the kind of vectorization method being configured for use with vector search. internal VectorSearchVectorizerKind Kind { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs index a49caa1396a2f..493e5dc0a0b71 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs @@ -24,17 +24,11 @@ public VectorSearchVectorizerKind(string value) private const string AzureOpenAIValue = "azureOpenAI"; private const string CustomWebApiValue = "customWebApi"; - private const string AIServicesVisionValue = "aiServicesVision"; - private const string AMLValue = "aml"; /// Generate embeddings using an Azure OpenAI resource at query time. public static VectorSearchVectorizerKind AzureOpenAI { get; } = new VectorSearchVectorizerKind(AzureOpenAIValue); /// Generate embeddings using a custom web endpoint at query time. public static VectorSearchVectorizerKind CustomWebApi { get; } = new VectorSearchVectorizerKind(CustomWebApiValue); - /// Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. - public static VectorSearchVectorizerKind AIServicesVision { get; } = new VectorSearchVectorizerKind(AIServicesVisionValue); - /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog at query time. - public static VectorSearchVectorizerKind AML { get; } = new VectorSearchVectorizerKind(AMLValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchVectorizerKind left, VectorSearchVectorizerKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs deleted file mode 100644 index 7fbc15968ada8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorSimilarityThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Value); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static VectorSimilarityThreshold DeserializeVectorSimilarityThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - double value = default; - VectorThresholdKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new VectorSimilarityThreshold(kind, value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorSimilarityThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorSimilarityThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs deleted file mode 100644 index 404a47badb0ad..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// 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. - public partial class VectorSimilarityThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// 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. - public VectorSimilarityThreshold(double value) - { - Value = value; - Kind = VectorThresholdKind.VectorSimilarity; - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - /// 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. - internal VectorSimilarityThreshold(VectorThresholdKind kind, double value) : base(kind) - { - Value = value; - Kind = kind; - } - - /// 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. - public double Value { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs deleted file mode 100644 index 887e095c02b5d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static VectorThreshold DeserializeVectorThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "searchScore": return SearchScoreThreshold.DeserializeSearchScoreThreshold(element); - case "vectorSimilarity": return VectorSimilarityThreshold.DeserializeVectorSimilarityThreshold(element); - } - } - return UnknownVectorThreshold.DeserializeUnknownVectorThreshold(element); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static VectorThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorThreshold(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs deleted file mode 100644 index d02a782f340ca..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// - /// The threshold used for vector queries. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class VectorThreshold - { - /// Initializes a new instance of . - protected VectorThreshold() - { - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - internal VectorThreshold(VectorThresholdKind kind) - { - Kind = kind; - } - - /// The kind of threshold used to filter vector queries. - internal VectorThresholdKind Kind { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs deleted file mode 100644 index 1992982d3e175..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The kind of vector query being performed. - internal readonly partial struct VectorThresholdKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorThresholdKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorSimilarityValue = "vectorSimilarity"; - private const string SearchScoreValue = "searchScore"; - - /// 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. - public static VectorThresholdKind VectorSimilarity { get; } = new VectorThresholdKind(VectorSimilarityValue); - /// 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. - public static VectorThresholdKind SearchScore { get; } = new VectorThresholdKind(SearchScoreValue); - /// Determines if two values are the same. - public static bool operator ==(VectorThresholdKind left, VectorThresholdKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorThresholdKind left, VectorThresholdKind right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VectorThresholdKind(string value) => new VectorThresholdKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorThresholdKind other && Equals(other); - /// - public bool Equals(VectorThresholdKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs deleted file mode 100644 index 403e02db994b0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorizableImageBinaryQuery : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Base64Image)) - { - writer.WritePropertyName("base64Image"u8); - writer.WriteStringValue(Base64Image); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(KNearestNeighborsCount)) - { - writer.WritePropertyName("k"u8); - writer.WriteNumberValue(KNearestNeighborsCount.Value); - } - if (Optional.IsDefined(FieldsRaw)) - { - writer.WritePropertyName("fields"u8); - writer.WriteStringValue(FieldsRaw); - } - if (Optional.IsDefined(Exhaustive)) - { - writer.WritePropertyName("exhaustive"u8); - writer.WriteBooleanValue(Exhaustive.Value); - } - if (Optional.IsDefined(Oversampling)) - { - writer.WritePropertyName("oversampling"u8); - writer.WriteNumberValue(Oversampling.Value); - } - if (Optional.IsDefined(Weight)) - { - writer.WritePropertyName("weight"u8); - writer.WriteNumberValue(Weight.Value); - } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } - writer.WriteEndObject(); - } - - internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQuery(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string base64Image = default; - VectorQueryKind kind = default; - int? k = default; - string fields = default; - bool? exhaustive = default; - double? oversampling = default; - float? weight = default; - VectorThreshold threshold = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("base64Image"u8)) - { - base64Image = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorQueryKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("k"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - k = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("fields"u8)) - { - fields = property.Value.GetString(); - continue; - } - if (property.NameEquals("exhaustive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exhaustive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("oversampling"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oversampling = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weight"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - weight = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } - } - return new VectorizableImageBinaryQuery( - kind, - k, - fields, - exhaustive, - oversampling, - weight, - threshold, - base64Image); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorizableImageBinaryQuery FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorizableImageBinaryQuery(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs deleted file mode 100644 index 3e5721dcbe581..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided. - public partial class VectorizableImageBinaryQuery : VectorQuery - { - /// Initializes a new instance of . - public VectorizableImageBinaryQuery() - { - Kind = VectorQueryKind.ImageBinary; - } - - /// Initializes a new instance of . - /// The kind of vector query being performed. - /// Number of nearest neighbors to return as top hits. - /// Vector Fields of type Collection(Edm.Single) to be included in the vector searched. - /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. - /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. - /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) - { - Base64Image = base64Image; - Kind = kind; - } - - /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - public string Base64Image { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs deleted file mode 100644 index c662215000b19..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorizableImageUrlQuery : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Url)) - { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(KNearestNeighborsCount)) - { - writer.WritePropertyName("k"u8); - writer.WriteNumberValue(KNearestNeighborsCount.Value); - } - if (Optional.IsDefined(FieldsRaw)) - { - writer.WritePropertyName("fields"u8); - writer.WriteStringValue(FieldsRaw); - } - if (Optional.IsDefined(Exhaustive)) - { - writer.WritePropertyName("exhaustive"u8); - writer.WriteBooleanValue(Exhaustive.Value); - } - if (Optional.IsDefined(Oversampling)) - { - writer.WritePropertyName("oversampling"u8); - writer.WriteNumberValue(Oversampling.Value); - } - if (Optional.IsDefined(Weight)) - { - writer.WritePropertyName("weight"u8); - writer.WriteNumberValue(Weight.Value); - } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } - writer.WriteEndObject(); - } - - internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri url = default; - VectorQueryKind kind = default; - int? k = default; - string fields = default; - bool? exhaustive = default; - double? oversampling = default; - float? weight = default; - VectorThreshold threshold = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - url = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorQueryKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("k"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - k = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("fields"u8)) - { - fields = property.Value.GetString(); - continue; - } - if (property.NameEquals("exhaustive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exhaustive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("oversampling"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oversampling = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weight"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - weight = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } - } - return new VectorizableImageUrlQuery( - kind, - k, - fields, - exhaustive, - oversampling, - weight, - threshold, - url); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorizableImageUrlQuery FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorizableImageUrlQuery(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs deleted file mode 100644 index 25292f74bdb33..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Models -{ - /// The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided. - public partial class VectorizableImageUrlQuery : VectorQuery - { - /// Initializes a new instance of . - public VectorizableImageUrlQuery() - { - Kind = VectorQueryKind.ImageUrl; - } - - /// Initializes a new instance of . - /// The kind of vector query being performed. - /// Number of nearest neighbors to return as top hits. - /// Vector Fields of type Collection(Edm.Single) to be included in the vector searched. - /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. - /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. - /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The URL of an image to be vectorized to perform a vector search query. - internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) - { - Url = url; - Kind = kind; - } - - /// The URL of an image to be vectorized to perform a vector search query. - public Uri Url { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs index 7401b079d9bb6..ce5672d165c05 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs @@ -44,11 +44,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -65,7 +60,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -119,15 +113,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new VectorizableTextQuery( kind, @@ -136,7 +121,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme exhaustive, oversampling, weight, - threshold, text); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs index d7e68f00f1a50..98f5d63a1dab5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs @@ -30,13 +30,8 @@ public VectorizableTextQuery(string text) /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// The text to be vectorized to perform a vector search query. - internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string text) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, string text) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Text = text; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs index 04114875e98d8..305a3b8749cd1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs @@ -50,11 +50,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -71,7 +66,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vector"u8)) @@ -136,15 +130,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new VectorizedQuery( kind, @@ -153,7 +138,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) exhaustive, oversampling, weight, - threshold, vector); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs index 8ff651c36b4ba..144935b8c0111 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs @@ -27,13 +27,8 @@ public VectorizedQuery(ReadOnlyMemory vector) /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// 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. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// The vector representation of a search query. - internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Vector = vector; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs deleted file mode 100644 index 92b359ec244f1..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class VisionVectorizeSkill : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ModelVersion != null) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - else - { - writer.WriteNull("modelVersion"); - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Context)) - { - writer.WritePropertyName("context"u8); - writer.WriteStringValue(Context); - } - writer.WritePropertyName("inputs"u8); - writer.WriteStartArray(); - foreach (var item in Inputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static VisionVectorizeSkill DeserializeVisionVectorizeSkill(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - string odataType = default; - string name = default; - string description = default; - string context = default; - IList inputs = default; - IList outputs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelVersion = null; - continue; - } - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("context"u8)) - { - context = property.Value.GetString(); - continue; - } - if (property.NameEquals("inputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); - } - inputs = array; - continue; - } - if (property.NameEquals("outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); - } - outputs = array; - continue; - } - } - return new VisionVectorizeSkill( - odataType, - name, - description, - context, - inputs, - outputs, - modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VisionVectorizeSkill FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVisionVectorizeSkill(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs deleted file mode 100644 index 18d17e3a7e810..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Allows you to generate a vector embedding for a given image or text input using the Azure AI Services Vision Vectorize API. - public partial class VisionVectorizeSkill : SearchIndexerSkill - { - /// Initializes a new instance of . - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// or is null. - public VisionVectorizeSkill(IEnumerable inputs, IEnumerable outputs, string modelVersion) : base(inputs, outputs) - { - Argument.AssertNotNull(inputs, nameof(inputs)); - Argument.AssertNotNull(outputs, nameof(outputs)); - - ModelVersion = modelVersion; - ODataType = "#Microsoft.Skills.Vision.VectorizeSkill"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of skill. - /// 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 '#'. - /// The description of the skill which describes the inputs, outputs, and usage of the skill. - /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - internal VisionVectorizeSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string modelVersion) : base(oDataType, name, description, context, inputs, outputs) - { - ModelVersion = modelVersion; - ODataType = 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. - public string ModelVersion { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs index 4da54c3053bc9..9ef70f34f5db2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs @@ -17,43 +17,6 @@ public partial class WebApiSkill : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri); - if (Optional.IsCollectionDefined(HttpHeaders)) - { - if (HttpHeaders != null) - { - writer.WritePropertyName("httpHeaders"u8); - writer.WriteStartObject(); - foreach (var item in HttpHeaders) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("httpHeaders"); - } - } - if (Optional.IsDefined(HttpMethod)) - { - writer.WritePropertyName("httpMethod"u8); - writer.WriteStringValue(HttpMethod); - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } if (Optional.IsDefined(BatchSize)) { if (BatchSize != null) @@ -78,6 +41,32 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("degreeOfParallelism"); } } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsCollectionDefined(HttpHeaders)) + { + writer.WritePropertyName("httpHeaders"u8); + writer.WriteStartObject(); + foreach (var item in HttpHeaders) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(HttpMethod)) + { + writer.WritePropertyName("httpMethod"u8); + writer.WriteStringValue(HttpMethod); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); + } if (Optional.IsDefined(AuthResourceId)) { if (AuthResourceId != null) @@ -142,12 +131,12 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { return null; } + int? batchSize = default; + int? degreeOfParallelism = default; string uri = default; IDictionary httpHeaders = default; string httpMethod = default; TimeSpan? timeout = default; - int? batchSize = default; - int? degreeOfParallelism = default; ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; string odataType = default; @@ -158,6 +147,26 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) IList outputs = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("batchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + batchSize = null; + continue; + } + batchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("degreeOfParallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + degreeOfParallelism = null; + continue; + } + degreeOfParallelism = property.Value.GetInt32(); + continue; + } if (property.NameEquals("uri"u8)) { uri = property.Value.GetString(); @@ -167,7 +176,6 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { if (property.Value.ValueKind == JsonValueKind.Null) { - httpHeaders = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,32 +195,11 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { if (property.Value.ValueKind == JsonValueKind.Null) { - timeout = null; continue; } timeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - batchSize = null; - continue; - } - batchSize = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("degreeOfParallelism"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - degreeOfParallelism = null; - continue; - } - degreeOfParallelism = property.Value.GetInt32(); - continue; - } if (property.NameEquals("authResourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -281,12 +268,12 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) context, inputs, outputs, + batchSize, + degreeOfParallelism, uri, httpHeaders ?? new ChangeTrackingDictionary(), httpMethod, timeout, - batchSize, - degreeOfParallelism, authResourceId, authIdentity); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs index 19550ceaac938..894a0823224ee 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs @@ -14,22 +14,6 @@ namespace Azure.Search.Documents.Indexes.Models /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. public partial class WebApiSkill : SearchIndexerSkill { - /// Initializes a new instance of . - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The url for the Web API. - /// , or is null. - public WebApiSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs) - { - Argument.AssertNotNull(inputs, nameof(inputs)); - Argument.AssertNotNull(outputs, nameof(outputs)); - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - HttpHeaders = new ChangeTrackingDictionary(); - ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; - } - /// Initializes a new instance of . /// A URI fragment specifying the type of skill. /// 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 '#'. @@ -37,42 +21,40 @@ public WebApiSkill(IEnumerable inputs, IEnumerable Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The url for the Web API. - /// The headers required to make the http request. - /// The method for the http request. - /// The desired timeout for the request. Default is 30 seconds. /// The desired batch size which indicates number of documents. /// If set, the number of parallel calls that can be made to the Web API. - /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// The URI of the Web API providing the vectorizer. + /// The headers required to make the HTTP request. + /// The method for the HTTP request. + /// The desired timeout for the request. Default is 30 seconds. + /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. /// /// 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 indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal WebApiSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, int? batchSize, int? degreeOfParallelism, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) : base(oDataType, name, description, context, inputs, outputs) + internal WebApiSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? batchSize, int? degreeOfParallelism, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) : base(oDataType, name, description, context, inputs, outputs) { + BatchSize = batchSize; + DegreeOfParallelism = degreeOfParallelism; Uri = uri; HttpHeaders = httpHeaders; HttpMethod = httpMethod; Timeout = timeout; - BatchSize = batchSize; - DegreeOfParallelism = degreeOfParallelism; AuthResourceId = authResourceId; AuthIdentity = authIdentity; ODataType = oDataType ?? "#Microsoft.Skills.Custom.WebApiSkill"; } - /// The url for the Web API. - public string Uri { get; set; } - /// The method for the http request. - public string HttpMethod { get; set; } - /// The desired timeout for the request. Default is 30 seconds. - public TimeSpan? Timeout { get; set; } /// The desired batch size which indicates number of documents. public int? BatchSize { get; set; } /// If set, the number of parallel calls that can be made to the Web API. public int? DegreeOfParallelism { get; set; } - /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// The method for the HTTP request. + public string HttpMethod { get; set; } + /// The desired timeout for the request. Default is 30 seconds. + public TimeSpan? Timeout { get; set; } + /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. public ResourceIdentifier AuthResourceId { get; set; } /// /// 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 indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs similarity index 76% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs index 138283607f04f..4cb76a9c9cc08 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs @@ -10,30 +10,30 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class CustomVectorizer : IUtf8JsonSerializable + public partial class WebApiVectorizer : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(CustomWebApiParameters)) + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("customWebApiParameters"u8); - writer.WriteObjectValue(CustomWebApiParameters); + writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element) + internal static WebApiVectorizer DeserializeWebApiVectorizer(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - CustomWebApiParameters customWebApiParameters = default; + WebApiVectorizerParameters customWebApiParameters = default; string name = default; VectorSearchVectorizerKind kind = default; foreach (var property in element.EnumerateObject()) @@ -44,7 +44,7 @@ internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element { continue; } - customWebApiParameters = CustomWebApiParameters.DeserializeCustomWebApiParameters(property.Value); + customWebApiParameters = WebApiVectorizerParameters.DeserializeWebApiVectorizerParameters(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -58,15 +58,15 @@ internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element continue; } } - return new CustomVectorizer(name, kind, customWebApiParameters); + return new WebApiVectorizer(name, kind, customWebApiParameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomVectorizer FromResponse(Response response) + internal static new WebApiVectorizer FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomVectorizer(document.RootElement); + return DeserializeWebApiVectorizer(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs new file mode 100644 index 0000000000000..e605e98da9a73 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Specifies a user-defined vectorizer for generating the vector embedding of a query string. Integration of an external vectorizer is achieved using the custom Web API interface of a skillset. + public partial class WebApiVectorizer : VectorSearchVectorizer + { + /// Initializes a new instance of . + /// The name to associate with this particular vectorization method. + /// is null. + public WebApiVectorizer(string vectorizerName) : base(vectorizerName) + { + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); + + Kind = VectorSearchVectorizerKind.CustomWebApi; + } + + /// Initializes a new instance of . + /// The name to associate with this particular vectorization method. + /// The name of the kind of vectorization method being configured for use with vector search. + /// Specifies the properties of the user-defined vectorizer. + internal WebApiVectorizer(string vectorizerName, VectorSearchVectorizerKind kind, WebApiVectorizerParameters parameters) : base(vectorizerName, kind) + { + Parameters = parameters; + Kind = kind; + } + + /// Specifies the properties of the user-defined vectorizer. + public WebApiVectorizerParameters Parameters { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs similarity index 91% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs index 784a2059b4f49..f2902ca14629d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class CustomWebApiParameters : IUtf8JsonSerializable + public partial class WebApiVectorizerParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -70,7 +70,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonElement element) + internal static WebApiVectorizerParameters DeserializeWebApiVectorizerParameters(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -80,7 +80,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle IDictionary httpHeaders = default; string httpMethod = default; TimeSpan? timeout = default; - string authResourceId = default; + ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; foreach (var property in element.EnumerateObject()) { @@ -128,7 +128,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle authResourceId = null; continue; } - authResourceId = property.Value.GetString(); + authResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("authIdentity"u8)) @@ -142,7 +142,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle continue; } } - return new CustomWebApiParameters( + return new WebApiVectorizerParameters( uri, httpHeaders ?? new ChangeTrackingDictionary(), httpMethod, @@ -153,10 +153,10 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomWebApiParameters FromResponse(Response response) + internal static WebApiVectorizerParameters FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomWebApiParameters(document.RootElement); + return DeserializeWebApiVectorizerParameters(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs similarity index 87% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs index 8e645e442ca95..8290bcf426749 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs @@ -7,19 +7,20 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { /// Specifies the properties for connecting to a user-defined vectorizer. - public partial class CustomWebApiParameters + public partial class WebApiVectorizerParameters { - /// Initializes a new instance of . - public CustomWebApiParameters() + /// Initializes a new instance of . + public WebApiVectorizerParameters() { HttpHeaders = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The URI of the Web API providing the vectorizer. /// The headers required to make the HTTP request. /// The method for the HTTP request. @@ -30,7 +31,7 @@ public CustomWebApiParameters() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal CustomWebApiParameters(Uri uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, string authResourceId, SearchIndexerDataIdentity authIdentity) + internal WebApiVectorizerParameters(Uri uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) { Uri = uri; HttpHeaders = httpHeaders; @@ -49,7 +50,7 @@ internal CustomWebApiParameters(Uri uri, IDictionary httpHeaders /// The desired timeout for the request. Default is 30 seconds. public TimeSpan? Timeout { get; set; } /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. - public string AuthResourceId { get; set; } + public ResourceIdentifier AuthResourceId { get; set; } /// /// 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 indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs index 5627feb7fbce2..6949f97f9c093 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs @@ -41,47 +41,6 @@ public static QueryCaptionResult QueryCaptionResult(string text = null, string h return new QueryCaptionResult(text, highlights, additionalProperties); } - /// Initializes a new instance of . - /// Contains debugging information specific to semantic ranking requests. - /// A new instance for mocking. - public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null) - { - return new DocumentDebugInfo(semantic); - } - - /// Initializes a new instance of . - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - /// The raw concatenated strings that were sent to the semantic enrichment process. - /// A new instance for mocking. - public static SemanticDebugInfo SemanticDebugInfo(QueryResultDocumentSemanticField titleField = null, IEnumerable contentFields = null, IEnumerable keywordFields = null, QueryResultDocumentRerankerInput rerankerInput = null) - { - contentFields ??= new List(); - keywordFields ??= new List(); - - return new SemanticDebugInfo(titleField, contentFields?.ToList(), keywordFields?.ToList(), rerankerInput); - } - - /// Initializes a new instance of . - /// The name of the field that was sent to the semantic enrichment process. - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - /// A new instance for mocking. - public static QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, SemanticFieldState? state = null) - { - return new QueryResultDocumentSemanticField(name, state); - } - - /// Initializes a new instance of . - /// The raw string for the title field that was used for semantic enrichment. - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - /// A new instance for mocking. - public static QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) - { - return new QueryResultDocumentRerankerInput(title, content, keywords); - } - /// Initializes a new instance of . /// A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request. /// The list of returned Autocompleted items. @@ -106,40 +65,6 @@ public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = def return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits); } - /// Initializes a new instance of . - /// The outcome of this indexer execution. - /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. - /// The error message indicating the top-level error, if any. - /// The start time of this indexer execution. - /// The end time of this indexer execution, if the execution has already completed. - /// The item-level indexing errors. - /// The item-level indexing warnings. - /// The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. - /// The number of items that failed to be indexed during this indexer execution. - /// Change tracking state with which an indexer execution started. - /// Change tracking state with which an indexer execution finished. - /// A new instance for mocking. - public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexerState currentState = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) - { - errors ??= new List(); - warnings ??= new List(); - - return new IndexerExecutionResult( - status, - statusDetail, - currentState, - errorMessage, - startTime, - endTime, - errors?.ToList(), - warnings?.ToList(), - itemCount, - failedItemCount, - initialTrackingState, - finalTrackingState); - } - /// Initializes a new instance of . /// The number of documents in the index. /// The amount of storage in bytes consumed by the index. @@ -151,7 +76,6 @@ public static SearchIndexStatistics SearchIndexStatistics(long documentCount = d } /// Initializes a new instance of . - /// Total number of aliases. /// Total number of documents across all indexes in the service. /// Total number of indexes. /// Total number of indexers. @@ -160,14 +84,10 @@ public static SearchIndexStatistics SearchIndexStatistics(long documentCount = d /// Total number of synonym maps. /// Total number of skillsets. /// Total memory consumption of all vector indexes within the service, in bytes. - /// , , , , , , , or is null. + /// , , , , , , or is null. /// A new instance for mocking. - public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter aliasCounter = null, SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) + public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) { - if (aliasCounter == null) - { - throw new ArgumentNullException(nameof(aliasCounter)); - } if (documentCounter == null) { throw new ArgumentNullException(nameof(documentCounter)); @@ -202,7 +122,6 @@ public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter } return new SearchServiceCounters( - aliasCounter, documentCounter, indexCounter, indexerCounter, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs index 403c486ff89cd..6f23aac2a79e3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs @@ -32,7 +32,7 @@ internal partial class SearchServiceRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs index 2cbb5a7f66d5c..d1d928d398212 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.Search.Documents.Indexes.Models; -using Azure.Search.Documents.Models; namespace Azure.Search.Documents { @@ -33,7 +32,7 @@ internal partial class SkillsetsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -42,7 +41,7 @@ public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchIndexerSkillset skillset, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache, bool? disableCacheReprocessingChangeDetection) + internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchIndexerSkillset skillset, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -53,14 +52,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchInde uri.AppendPath(skillsetName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } - if (disableCacheReprocessingChangeDetection != null) - { - uri.AppendQuery("disableCacheReprocessingChangeDetection", disableCacheReprocessingChangeDetection.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -84,11 +75,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchInde /// The skillset containing one or more skills to create or update in a search service. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -99,7 +88,7 @@ public async Task> CreateOrUpdateAsync(string sk throw new ArgumentNullException(nameof(skillset)); } - using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -121,11 +110,9 @@ public async Task> CreateOrUpdateAsync(string sk /// The skillset containing one or more skills to create or update in a search service. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -136,7 +123,7 @@ public Response CreateOrUpdate(string skillsetName, Searc throw new ArgumentNullException(nameof(skillset)); } - using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -428,79 +415,5 @@ public Response Create(SearchIndexerSkillset skillset, Ca throw new RequestFailedException(message.Response); } } - - internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOptions resetSkillsOptions) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/skillsets('", false); - uri.AppendPath(skillsetName, true); - uri.AppendPath("')/search.resetskills", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(resetSkillsOptions); - request.Content = content; - return message; - } - - /// Reset an existing skillset in a search service. - /// The name of the skillset to reset. - /// The names of skills to reset. - /// The cancellation token to use. - /// or is null. - public async Task ResetSkillsAsync(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) - { - if (skillsetName == null) - { - throw new ArgumentNullException(nameof(skillsetName)); - } - if (resetSkillsOptions == null) - { - throw new ArgumentNullException(nameof(resetSkillsOptions)); - } - - using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Reset an existing skillset in a search service. - /// The name of the skillset to reset. - /// The names of skills to reset. - /// The cancellation token to use. - /// or is null. - public Response ResetSkills(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) - { - if (skillsetName == null) - { - throw new ArgumentNullException(nameof(skillsetName)); - } - if (resetSkillsOptions == null) - { - throw new ArgumentNullException(nameof(resetSkillsOptions)); - } - - using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs index 489d8451bf0af..2b99ecca311b0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs @@ -32,7 +32,7 @@ internal partial class SynonymMapsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs index b986eb0279453..fb022a4810767 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs @@ -28,15 +28,6 @@ public AnalyzeTextOptions(string text, LexicalAnalyzerName analyzerName) : this( public AnalyzeTextOptions(string text, LexicalTokenizerName tokenizerName) : this(text) => TokenizerName = tokenizerName; - /// - /// Initializes a new instance of AnalyzeRequest. - /// - /// Required text to break into tokens. - /// The name of the tokenizer to use to break the given . - /// is null. - public AnalyzeTextOptions(string text, LexicalNormalizerName normalizerName) : this(text) - => NormalizerName = normalizerName; - /// The name of the analyzer to use to break the given text. [CodeGenMember("Analyzer")] public LexicalAnalyzerName? AnalyzerName { get; } @@ -45,10 +36,6 @@ public AnalyzeTextOptions(string text, LexicalNormalizerName normalizerName) : t [CodeGenMember("Tokenizer")] public LexicalTokenizerName? TokenizerName { get; } - /// The name of the normalizer to use to normalize the given text. - [CodeGenMember("Normalizer")] - public LexicalNormalizerName? NormalizerName { get; } - /// An optional list of token filters to use when breaking the given text. public IList TokenFilters { get; } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs deleted file mode 100644 index 588fd76cd4cc2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// - /// AzureMachineLearningSkill 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. - /// - public partial class AzureMachineLearningSkill - { - /// The key for the Azure Machine Learning service. This is required for key-based authentication. - [CodeGenMember("AuthenticationKey")] - public string AuthenticationKey { get; } - - /// The scoring URI of the Azure Machine Learning service to which the JSON payload will be sent. - /// This is required when using no authentication or key-based authentication. - /// Only the https URI scheme is allowed. - /// - [CodeGenMember("ScoringUri")] - public Uri ScoringUri { get; } - - [CodeGenMember("ResourceId")] - internal string RawResourceId - { - get => ResourceId?.ToString(); - set => ResourceId = (value == null) ? null : new ResourceIdentifier(value); - } - - /// The Azure Resource Manager resource ID of the Azure Machine Learning service. - /// This is required for token-based authentication. - /// It should be in the format "subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}". - /// - public ResourceIdentifier ResourceId { get; private set; } - - [CodeGenMember("Region")] - internal string RawLocation - { - get => Location?.ToString(); - set => Location = (value == null) ? default : new AzureLocation(value); - } - - /// The region the Azure Machine Learning service is deployed in. - /// This is optional for token-based authentication. - /// - public AzureLocation? Location { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The key for the AML service. - /// The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - public AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs, Uri scoringUri, string authenticationKey = default) : - this(inputs, outputs) - { - ScoringUri = scoringUri ?? throw new ArgumentNullException(nameof(scoringUri)); - AuthenticationKey = authenticationKey; - } - - /// - /// Initializes a new instance of the class. - /// - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// 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}. - /// The region the AML service is deployed in. - public AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs, ResourceIdentifier resourceId, AzureLocation? location = default) : - this(inputs, outputs) - { - ResourceId = resourceId ?? throw new ArgumentNullException(nameof(resourceId)); - Location = location; - } - - /// Initializes a new instance of AmlSkill. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// or is null. - internal AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) - { - if (inputs == null) - { - throw new ArgumentNullException(nameof(inputs)); - } - if (outputs == null) - { - throw new ArgumentNullException(nameof(outputs)); - } - - ODataType = "#Microsoft.Skills.Custom.AmlSkill"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs deleted file mode 100644 index 3a4506b3114d6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents the change tracking state during an indexer's execution. - public class IndexerChangeTrackingState - { - /// - /// Initializes a new instance of the class. - /// - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - internal IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) - { - AllDocumentsInitialState = allDocumentsInitialState; - AllDocumentsFinalState = allDocumentsFinalState; - ResetDocumentsInitialState = resetDocumentsInitialState; - ResetDocumentsFinalState = resetDocumentsFinalState; - } - - /// Change tracking state used when indexing starts on all documents in the datasource. - public string AllDocumentsInitialState { get; } - - /// Change tracking state value when indexing finishes on all documents in the datasource. - public string AllDocumentsFinalState { get; } - - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - public string ResetDocumentsInitialState { get; } - - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - public string ResetDocumentsFinalState { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs deleted file mode 100644 index 0c23b3955f35b..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents all of the state that defines and dictates the indexer's current execution. - [CodeGenModel("IndexerCurrentState")] - public partial class IndexerState - { - /// Change tracking state used when indexing starts on all documents in the datasource. - internal string AllDocsInitialChangeTrackingState => ChangeTrackingState.AllDocumentsInitialState; - - /// Change tracking state value when indexing finishes on all documents in the datasource. - internal string AllDocsFinalChangeTrackingState => ChangeTrackingState.AllDocumentsFinalState; - - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - internal string ResetDocsInitialChangeTrackingState => ChangeTrackingState.ResetDocumentsInitialState ; - - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - internal string ResetDocsFinalChangeTrackingState => ChangeTrackingState.ResetDocumentsFinalState ; - - /// - /// Change tracking state for an indexer's execution. - /// - public IndexerChangeTrackingState ChangeTrackingState { get; } - - /// 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. - [CodeGenMember("ResetDatasourceDocumentIds")] - public IReadOnlyList ResetDataSourceDocumentIds { get; } - - /// Initializes a new instance of IndexerState. - /// The mode the indexer is running in. - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - /// 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. - /// 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. - internal IndexerState(IndexingMode? mode, string allDocumentsInitialChangeTrackingState, string allDocumentsFinalChangeTrackingState, string resetDocumentsInitialChangeTrackingState, string resetDocumentsFinalChangeTrackingState, IReadOnlyList resetDocumentKeys, IReadOnlyList resetDataSourceDocumentIds) - { - Mode = mode; - ResetDocumentKeys = resetDocumentKeys; - ResetDataSourceDocumentIds = resetDataSourceDocumentIds; - - ChangeTrackingState = new IndexerChangeTrackingState(allDocumentsInitialChangeTrackingState, allDocumentsFinalChangeTrackingState, resetDocumentsInitialChangeTrackingState, resetDocumentsFinalChangeTrackingState); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs deleted file mode 100644 index 50261a3647314..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public readonly partial struct IndexingMode - { - /// The indexer is indexing all documents in the datasource. - [CodeGenMember("IndexingAllDocs")] - public static IndexingMode AllDocuments { get; } = new IndexingMode(AllDocumentsValue); - - /// The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status. - [CodeGenMember("IndexingResetDocs")] - public static IndexingMode ResetDocuments { get; } = new IndexingMode(ResetDocumentsValue); - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs deleted file mode 100644 index 53d593d695414..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Search.Documents.Indexes.Models -{ - public readonly partial struct LexicalNormalizerName - { -#pragma warning disable CA1034 // Nested types should not be visible - /// - /// The values of all declared properties as string constants. - /// These can be used in , and anywhere else constants are required. - /// - public static class Values - { - /// Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html. - public const string AsciiFolding = LexicalNormalizerName.AsciiFoldingValue; - /// Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html. - public const string Elision = LexicalNormalizerName.ElisionValue; - /// Normalizes token text to lowercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. - public const string Lowercase = LexicalNormalizerName.LowercaseValue; - /// Standard normalizer, which consists of lowercase and asciifolding. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html. - public const string Standard = LexicalNormalizerName.StandardValue; - /// Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. - public const string Uppercase = LexicalNormalizerName.UppercaseValue; - } -#pragma warning restore CA1034 // Nested types should not be visible - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs deleted file mode 100644 index 934e1d03d0102..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - /// - /// The skills to reset. - /// - [CodeGenModel("SkillNames")] - public partial class ResetSkillsOptions - { - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs deleted file mode 100644 index b37dac4798184..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchAlias - { - [CodeGenMember("ETag")] - private readonly string _etag; - - /// - /// The of the . - /// - public ETag? ETag - { - get => _etag is null ? null : new ETag(_etag); - } - - /// Initializes a new instance of SearchAlias. - /// The name of the alias. - /// The name of the index this alias maps to. - /// or is null. - public SearchAlias(string name, string index) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Indexes = (index != null) ? new List { index } : throw new ArgumentNullException(nameof(index)); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs index 75eb3b69aaa69..a0b829879c3e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs @@ -185,15 +185,6 @@ public bool? IsHidden [CodeGenMember("IndexAnalyzer")] public LexicalAnalyzerName? IndexAnalyzerName { get; set; } - /// - /// 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. - /// - [CodeGenMember("Normalizer")] - public LexicalNormalizerName? NormalizerName { get; set; } - // TODO: Remove "overrides" for collection properties when https://github.com/Azure/autorest.csharp/issues/521 is fixed. /// diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs index dc237860abfb4..77da7d674e294 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs @@ -49,7 +49,6 @@ public SearchIndex(string name, IEnumerable fields) Suggesters = new ChangeTrackingList(); TokenFilters = new ChangeTrackingList(); Tokenizers = new ChangeTrackingList(); - Normalizers = new ChangeTrackingList(); } /// @@ -149,11 +148,6 @@ public IList Fields /// public IList Tokenizers { get; } - /// - /// Gets the normalizers for the index. - /// - public IList Normalizers { get; } - /// /// The of the . /// diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs deleted file mode 100644 index a2c30b9af532d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerCache - { - /// The connection string to the storage account where the cache data will be persisted. - private string StorageConnectionString { get; set; } - - /// - /// Sets the for the Search indexer cache. - /// - /// The storage connection string. - public void SetStorageConnectionString(string storageConnectionString) - { - StorageConnectionString = storageConnectionString; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs index ac21207612546..158e1c687cd51 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs @@ -59,13 +59,6 @@ public SimpleField(string name, SearchFieldDataType type) : base(name, type) /// public bool IsSortable { get; set; } - /// - /// 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. - /// - public LexicalNormalizerName? NormalizerName { get; set; } - /// private protected override void Save(SearchField field) { @@ -74,7 +67,6 @@ private protected override void Save(SearchField field) field.IsFilterable = IsFilterable; field.IsFacetable = IsFacetable; field.IsSortable = IsSortable; - field.NormalizerName = NormalizerName; // Use a SearchableField instead, which will override this property. // The service will return Searchable == false for all non-searchable simple types. diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs new file mode 100644 index 0000000000000..89aba1520093c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Search.Documents.Indexes.Models +{ + public abstract partial class VectorSearchCompression + { + /// Gets the name associated with this particular configuration. + public string CompressionName { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs new file mode 100644 index 0000000000000..4e3e99e73167e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Search.Documents.Indexes.Models +{ + public abstract partial class VectorSearchVectorizer + { + /// Gets the name associated with this particular vectorization method. + public string VectorizerName { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs index 394a5b29129ce..9045264b98575 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs @@ -1,14 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { public partial class WebApiSkill { + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// , or is null. + public WebApiSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + HttpHeaders = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; + } + + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// or is null. + internal WebApiSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + + HttpHeaders = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; + } + /// The headers required to make the http request. public IDictionary HttpHeaders { get; } + + /// The URI of the Web API providing the vectorizer. + [CodeGenMember("Url")] + public string Uri { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs deleted file mode 100644 index 50c64738d7fe9..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Indexes -{ - /// - /// Azure Cognitive Search client that can be used to manage indexes on a Search service. - /// - public partial class SearchIndexClient - { - private AliasesRestClient _aliasesRestClient; - - /// - /// Gets the generated to make requests. - /// - private AliasesRestClient AliasesClient => LazyInitializer.EnsureInitialized(ref _aliasesRestClient, () => new AliasesRestClient( - _clientDiagnostics, - _pipeline, - Endpoint.AbsoluteUri, - null, - _version.ToVersionString()) - ); - - /// - /// Creates a new search alias. - /// - /// The definition of the alias to create. - /// Optional to propagate notifications that the operation should be canceled. - /// created by the service. - public virtual Response CreateAlias(SearchAlias alias, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateAlias)}"); - scope.Start(); - try - { - return AliasesClient.Create(alias, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias. - /// - /// The definition of the alias to create. - /// Optional to propagate notifications that the operation should be canceled. - /// created by the service. - public virtual async Task> CreateAliasAsync(SearchAlias alias, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateAlias)}"); - scope.Start(); - try - { - return await AliasesClient.CreateAsync(alias, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias or updates an alias if it already exists. - /// - /// The name of the alias to create or update. - /// The definition of the alias to create or update. - /// - /// True to throw a if the does not match the current alias version; - /// otherwise, the current version will be overwritten. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual Response CreateOrUpdateAlias(string aliasName, SearchAlias alias, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateAlias)}"); - scope.Start(); - try - { - return AliasesClient.CreateOrUpdate(aliasName, alias, onlyIfUnchanged ? alias.ETag?.ToString() : null, null, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias or updates an alias if it already exists. - /// - /// The name of the alias to create or update. - /// The definition of the alias to create or update. - /// - /// True to throw a if the does not match the current alias version; - /// otherwise, the current version will be overwritten. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual async Task> CreateOrUpdateAliasAsync(string aliasName, SearchAlias alias, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateAlias)}"); - scope.Start(); - try - { - return await AliasesClient.CreateOrUpdateAsync(aliasName, alias, onlyIfUnchanged ? alias.ETag?.ToString() : null, null, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// 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. - /// - /// The name of the alias to delete. - /// Optional to propagate notifications that the operation should be canceled. - /// from the service. - public virtual Response DeleteAlias(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteAlias)}"); - scope.Start(); - try - { - return AliasesClient.Delete(aliasName, null, null, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// 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. - /// - /// The name of the alias to delete. - /// Optional to propagate notifications that the operation should be canceled. - /// from the service. - public virtual async Task DeleteAliasAsync(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteAlias)}"); - scope.Start(); - try - { - return await AliasesClient.DeleteAsync(aliasName, null, null, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Retrieves an alias definition. - /// - /// The name of the alias to retrieve. - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual Response GetAlias(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAlias)}"); - scope.Start(); - try - { - return AliasesClient.Get(aliasName, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Retrieves an alias definition. - /// - /// The name of the alias to retrieve. - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual async Task> GetAliasAsync(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAlias)}"); - scope.Start(); - try - { - return await AliasesClient.GetAsync(aliasName, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Gets a list of all alias definitions available for a search service. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// The from the server containing a list of objects. - /// Thrown when a failure is returned by the Search service. - public virtual Pageable GetAliases(CancellationToken cancellationToken = default) - { - return PageResponseEnumerator.CreateEnumerable((continuationToken) => - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAliases)}"); - scope.Start(); - try - { - if (continuationToken != null) - { - throw new NotSupportedException("A continuation token is unsupported."); - } - - Response result = AliasesClient.List(cancellationToken); - - return Page.FromValues(result.Value.Aliases, null, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - }); - } - - /// - /// Gets a list of all alias definitions available for a search service. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// The from the server containing a list of objects. - /// Thrown when a failure is returned by the Search service. - public virtual AsyncPageable GetAliasesAsync(CancellationToken cancellationToken = default) - { - return PageResponseEnumerator.CreateAsyncEnumerable(async (continuationToken) => - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAliases)}"); - scope.Start(); - try - { - if (continuationToken != null) - { - throw new NotSupportedException("A continuation token is unsupported."); - } - - Response result = await AliasesClient.ListAsync(cancellationToken).ConfigureAwait(false); - - return Page.FromValues(result.Value.Aliases, null, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - }); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs index 561c0b27e8585..15d93bf7ae011 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs @@ -115,38 +115,9 @@ public virtual async Task> CreateDat /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateDataSourceConnection( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerDataSourceConnection dataSourceConnection, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateDataSourceConnection( - dataSourceConnection, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - cancellationToken); - - /// - /// Creates a new data source or updates an existing data source connection. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// True if the cache reset requirements should be ignored. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateDataSourceConnection( SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -161,7 +132,6 @@ public virtual Response CreateOrUpdateDataSou dataSourceConnection, onlyIfUnchanged ? dataSourceConnection?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, cancellationToken); } catch (Exception ex) @@ -186,39 +156,9 @@ public virtual Response CreateOrUpdateDataSou /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateDataSourceConnectionAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerDataSourceConnection dataSourceConnection, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateDataSourceConnectionAsync( - dataSourceConnection, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - cancellationToken) - .ConfigureAwait(false); - - /// - /// Creates a new data source or updates an existing data source connection. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// True if the cache reset requirements should be ignored. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateDataSourceConnectionAsync( SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -233,7 +173,6 @@ public virtual async Task> CreateOrU dataSourceConnection, onlyIfUnchanged ? dataSourceConnection?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, cancellationToken) .ConfigureAwait(false); } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs index 2edc48d0345a1..e7d94a9906f8e 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs @@ -110,73 +110,9 @@ public virtual async Task> CreateSkillsetAsync( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateSkillset( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateSkillset( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateSkillset( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => CreateOrUpdateSkillset( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateSkillset( SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -191,8 +127,6 @@ public virtual Response CreateOrUpdateSkillset( skillset, onlyIfUnchanged ? skillset?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken); } catch (Exception ex) @@ -217,74 +151,9 @@ public virtual Response CreateOrUpdateSkillset( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateSkillsetAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateSkillsetAsync( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken). - ConfigureAwait(false); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateSkillsetAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => await CreateOrUpdateSkillsetAsync( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken).ConfigureAwait(false); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateSkillsetAsync( SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -299,8 +168,6 @@ public virtual async Task> CreateOrUpdateSkillse skillset, onlyIfUnchanged ? skillset?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken) .ConfigureAwait(false); } @@ -620,55 +487,5 @@ public virtual async Task>> GetSkillsetNamesAsync throw; } } - - /// - /// Resets skills in an existing skillset in a search service. - /// - /// The name of the skillset to reset. - /// Options for the reset skills operation. - /// Optional to propagate notifications that the operation should be canceled. - /// A indicating the status of the operation. - public virtual Response ResetSkills( - string skillsetName, - ResetSkillsOptions resetSkillsOptions, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetSkills)}"); - scope.Start(); - try - { - return SkillsetsClient.ResetSkills(skillsetName, resetSkillsOptions, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Resets skills in an existing skillset in a search service. - /// - /// The name of the skillset to reset. - /// Options for the reset skills operation. - /// Optional to propagate notifications that the operation should be canceled. - /// A indicating the status of the operation. - public virtual async Task ResetSkillsAsync( - string skillsetName, - ResetSkillsOptions resetSkillsOptions, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetSkills)}"); - scope.Start(); - try - { - return await SkillsetsClient.ResetSkillsAsync(skillsetName, resetSkillsOptions, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs index ca68395ea1a5c..3e2d460d368f3 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs @@ -222,73 +222,9 @@ public virtual async Task> CreateIndexerAsync( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateIndexer( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateIndexer( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateIndexer( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => CreateOrUpdateIndexer( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateIndexer( SearchIndexer indexer, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -303,8 +239,6 @@ public virtual Response CreateOrUpdateIndexer( indexer, onlyIfUnchanged ? indexer?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken); } catch (Exception ex) @@ -329,74 +263,9 @@ public virtual Response CreateOrUpdateIndexer( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateIndexerAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateIndexerAsync( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken). - ConfigureAwait(false); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateIndexerAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => await CreateOrUpdateIndexerAsync( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken).ConfigureAwait(false); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateIndexerAsync( SearchIndexer indexer, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -411,8 +280,6 @@ public virtual async Task> CreateOrUpdateIndexerAsync( indexer, onlyIfUnchanged ? indexer?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken) .ConfigureAwait(false); } @@ -897,68 +764,5 @@ public virtual async Task RunIndexerAsync( throw; } } - - /// - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// - /// The name of the indexer to reset documents for. - /// 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. - /// The reset options to use. - /// Optional to propagate notifications that the operation should be canceled. - /// A representing the result of the asynchronous operation. - public virtual Response ResetDocuments( - string indexerName, - bool? overwrite = null, - ResetDocumentOptions resetDocumentOptions = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetDocuments)}"); - scope.Start(); - try - { - return IndexersClient.ResetDocs( - indexerName, - overwrite, - resetDocumentOptions, - cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// - /// The name of the indexer to reset documents for. - /// 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. - /// The reset options to use. - /// Optional to propagate notifications that the operation should be canceled. - /// A representing the result of the asynchronous operation. - public virtual async Task ResetDocumentsAsync( - string indexerName, - bool? overwrite = null, - ResetDocumentOptions resetDocumentOptions = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetDocuments)}"); - scope.Start(); - try - { - return await IndexersClient.ResetDocsAsync( - indexerName, - overwrite, - resetDocumentOptions, - cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs index eb9ba4d387fba..d48c027de2b49 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs @@ -50,14 +50,6 @@ public class SimpleFieldAttribute : Attribute, ISearchFieldAttribute /// public bool IsSortable { get; set; } - /// - /// 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. - /// - /// String values from LexicalAnalyzerName. - public string NormalizerName { get; set; } - /// void ISearchFieldAttribute.SetField(SearchField field) => SetField(field); @@ -76,11 +68,6 @@ private protected void SetField(SearchField field) // The service will return Searchable == false for all non-searchable simple types. field.IsSearchable = false; } - - if (NormalizerName != null) - { - field.NormalizerName = NormalizerName; - } } } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs b/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs deleted file mode 100644 index dc9ae0af7d33c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - [CodeGenModel("DocumentKeysOrIds")] - public partial class ResetDocumentOptions - { - /// DataSource document identifiers to be reset. - [CodeGenMember("DatasourceDocumentIds")] - public IList DataSourceDocumentIds { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs index 5facdd630f772..00f2b57daccc1 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs @@ -82,7 +82,7 @@ public static IndexerExecutionResult IndexerExecutionResult( int failedItemCount, string initialTrackingState, string finalTrackingState) => - new IndexerExecutionResult(status, null, null, errorMessage, startTime, endTime, errors, warnings, itemCount, failedItemCount, initialTrackingState, finalTrackingState); + new IndexerExecutionResult(status, errorMessage, startTime, endTime, errors, warnings, itemCount, failedItemCount, initialTrackingState, finalTrackingState); /// Initializes a new instance of IndexerExecutionResult. /// The outcome of this indexer execution. @@ -112,7 +112,7 @@ public static IndexerExecutionResult IndexerExecutionResult( errors ??= new List(); warnings ??= new List(); - return new IndexerExecutionResult(status, null, null, errorMessage, startTime, endTime, errors?.ToList(), warnings?.ToList(), itemCount, failedItemCount, initialTrackingState, finalTrackingState); + return new IndexerExecutionResult(status, errorMessage, startTime, endTime, errors?.ToList(), warnings?.ToList(), itemCount, failedItemCount, initialTrackingState, finalTrackingState); } /// Initializes a new instance of LexicalAnalyzer. @@ -251,7 +251,7 @@ public static SearchServiceCounters SearchServiceCounters( SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter: null, null); + new SearchServiceCounters(documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter: null, null); /// Initializes a new instance of SearchServiceCounters. /// Total number of documents across all indexes in the service. @@ -271,29 +271,7 @@ public static SearchServiceCounters SearchServiceCounters( SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, null); - - // Initializes a new instance of SearchServiceCounters. - /// Total number of documents across all indexes in the service. - /// Total number of indexes. - /// Total number of indexers. - /// Total number of data sources. - /// Total size of used storage in bytes. - /// Total number of synonym maps. - /// Total number of skillsets. - /// Total memory consumption of all vector indexes within the service, in bytes. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static SearchServiceCounters SearchServiceCounters( - SearchResourceCounter documentCounter = null, - SearchResourceCounter indexCounter = null, - SearchResourceCounter indexerCounter = null, - SearchResourceCounter dataSourceCounter = null, - SearchResourceCounter storageSizeCounter = null, - SearchResourceCounter synonymMapCounter = null, - SearchResourceCounter skillsetCounter = null, - SearchResourceCounter vectorIndexSizeCounter = null) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, vectorIndexSizeCounter); + new SearchServiceCounters(documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, null); /// Initializes a new instance of SearchServiceLimits. /// The maximum allowed fields per index. @@ -397,54 +375,5 @@ public static IndexingResult IndexingResult( bool succeeded, int status) => new IndexingResult(key, errorMessage, succeeded, status); - - /// Initializes a new instance of IndexerState. - /// The mode the indexer is running in. - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - /// 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. - /// 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. - /// A new instance for mocking. - public static IndexerState IndexerState( - IndexingMode? mode = null, - string allDocumentsInitialChangeTrackingState = null, - string allDocumentsFinalChangeTrackingState = null, - string resetDocumentsInitialChangeTrackingState = null, - string resetDocumentsFinalChangeTrackingState = null, - IEnumerable resetDocumentKeys = null, - IEnumerable resetDataSourceDocumentIds = null) - { - resetDocumentKeys ??= new List(); - resetDataSourceDocumentIds ??= new List(); - - return new IndexerState( - mode, - allDocumentsInitialChangeTrackingState, - allDocumentsFinalChangeTrackingState, - resetDocumentsInitialChangeTrackingState, - resetDocumentsFinalChangeTrackingState, - resetDocumentKeys?.ToList(), - resetDataSourceDocumentIds?.ToList()); - } - - /// - /// Initializes a new instance of the class. - /// - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - public static IndexerChangeTrackingState IndexerChangeTrackingState( - string allDocumentsInitialState, - string allDocumentsFinalState, - string resetDocumentsInitialState, - string resetDocumentsFinalState) => - new IndexerChangeTrackingState( - allDocumentsInitialState, - allDocumentsFinalState, - resetDocumentsInitialState, - resetDocumentsFinalState); } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs index 22a85a0fb242c..ac57a07b7d8bb 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs @@ -46,11 +46,6 @@ public class SearchResult /// public SemanticSearchResult SemanticSearch { get; internal set; } - /// - /// Contains debugging information that can be used to further explore your search results. - /// - public IList DocumentDebugInfo { get; internal set; } - /// /// The document found by the search query. /// @@ -124,16 +119,6 @@ internal static async Task> DeserializeAsync( } result.SemanticSearch.Captions = captionResults; } - else if (prop.NameEquals(Constants.SearchDocumentDebugInfoKeyJson.EncodedUtf8Bytes) && - prop.Value.ValueKind != JsonValueKind.Null) - { - result.DocumentDebugInfo = new List(); - - foreach (JsonElement documentDebugInfoValue in prop.Value.EnumerateArray()) - { - result.DocumentDebugInfo.Add(Models.DocumentDebugInfo.DeserializeDocumentDebugInfo(documentDebugInfoValue)); - } - } } // Deserialize the model diff --git a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs index 805bb24b1898d..468911de3f93f 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs @@ -33,30 +33,25 @@ public partial class SearchOptions /// A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. /// The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). /// The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - /// 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. - /// The name of a semantic configuration that will be used when processing documents for queries of type semantic. - /// Allows the user to choose whether a semantic call should fail completely, or to return partial results (default). - /// 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. - /// Enables a debugging tool that can be used to further explore your reranked results. /// A full-text search query expression; Use "*" or omit this parameter to match all documents. /// The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. /// A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. - /// A value that specifies the language of the search query. - /// A value that specified the type of the speller to use to spell-correct individual search query terms. - /// A value that specifies whether answers should be returned as part of the search response. /// The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. /// 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. /// The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. + /// The name of a semantic configuration that will be used when processing documents for queries of type semantic. + /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. + /// 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. + /// 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. + /// A value that specifies whether answers should be returned as part of the search response. /// A value that specifies whether captions should be returned as part of the search response. - /// The comma-separated list of field names used for semantic ranking. /// /// The query parameters for vector and hybrid search queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// - /// Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter'. - /// The query parameters to configure hybrid search behaviors. - internal SearchOptions(bool? includeTotalCount, IList facets, string filter, string highlightFieldsRaw, string highlightPostTag, string highlightPreTag, double? minimumCoverage, string orderByRaw, SearchQueryType? queryType, ScoringStatistics? scoringStatistics, string sessionId, IList scoringParameters, string scoringProfile, string semanticQuery, string semanticConfigurationName, SemanticErrorMode? semanticErrorMode, int? semanticMaxWaitInMilliseconds, QueryDebugMode? debug, string searchText, string searchFieldsRaw, SearchMode? searchMode, QueryLanguage? queryLanguage, QuerySpellerType? querySpeller, string queryAnswerRaw, string selectRaw, int? skip, int? size, string queryCaptionRaw, string semanticFieldsRaw, IList vectorQueries, VectorFilterMode? filterMode, HybridSearch hybridSearch) + /// Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. + internal SearchOptions(bool? includeTotalCount, IList facets, string filter, string highlightFieldsRaw, string highlightPostTag, string highlightPreTag, double? minimumCoverage, string orderByRaw, SearchQueryType? queryType, ScoringStatistics? scoringStatistics, string sessionId, IList scoringParameters, string scoringProfile, string searchText, string searchFieldsRaw, SearchMode? searchMode, string selectRaw, int? skip, int? size, string semanticConfigurationName, SemanticErrorMode? semanticErrorMode, int? semanticMaxWaitInMilliseconds, string semanticQuery, string queryAnswerRaw, string queryCaptionRaw, IList vectorQueries, VectorFilterMode? filterMode) { IncludeTotalCount = includeTotalCount; Facets = facets; @@ -77,10 +72,8 @@ internal SearchOptions(bool? includeTotalCount, IList facets, string fil SelectRaw = selectRaw; Skip = skip; Size = size; - QueryLanguage = queryLanguage; - QuerySpeller = querySpeller; - SemanticSearch = (semanticConfigurationName != null || semanticErrorMode != null || semanticMaxWaitInMilliseconds != null || queryAnswerRaw != null || queryCaptionRaw != null || semanticQuery != null || semanticFieldsRaw != null || debug != null) ? new SemanticSearchOptions() : null; + SemanticSearch = (semanticConfigurationName != null || semanticErrorMode != null || semanticMaxWaitInMilliseconds != null || queryAnswerRaw != null || queryCaptionRaw != null || semanticQuery != null) ? new SemanticSearchOptions() : null; if (SemanticSearch != null) { SemanticSearch.QueryAnswer = queryAnswerRaw != null ? new QueryAnswer() : null; @@ -92,13 +85,10 @@ internal SearchOptions(bool? includeTotalCount, IList facets, string fil QueryAnswerRaw = queryAnswerRaw; QueryCaptionRaw = queryCaptionRaw; SemanticQuery = semanticQuery; - SemanticFieldsRaw = semanticFieldsRaw; - Debug = debug; VectorSearch = (vectorQueries != null || filterMode != null) ? new VectorSearchOptions() : null; VectorQueries = vectorQueries; FilterMode = filterMode; - HybridSearch = hybridSearch; } /// @@ -240,14 +230,6 @@ internal string OrderByRaw [CodeGenMember("ScoringParameters")] public IList ScoringParameters { get; internal set; } = new List(); - /// A value that specifies the language of the search query. - [CodeGenMember("QueryLanguage")] - public QueryLanguage? QueryLanguage { get; set; } - - /// A value that specifies the type of the speller to use to spell-correct individual search query terms. - [CodeGenMember("Speller")] - public QuerySpellerType? QuerySpeller { get; set; } - /// Options for performing Semantic Search. public SemanticSearchOptions SemanticSearch { get; set; } @@ -296,20 +278,6 @@ private string QueryCaptionRaw } } - /// The comma-separated list of field names used for semantic ranking. - [CodeGenMember("SemanticFields")] - private string SemanticFieldsRaw - { - get { return SemanticSearch?.SemanticFieldsRaw; } - set - { - if (SemanticSearch != null) - { - SemanticSearch.SemanticFieldsRaw = value; - } - } - } - /// 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. [CodeGenMember("SemanticQuery")] private string SemanticQuery @@ -324,20 +292,6 @@ private string SemanticQuery } } - /// Enables a debugging tool that can be used to further explore your reranked results. - [CodeGenMember("Debug")] - private QueryDebugMode? Debug - { - get { return SemanticSearch?.Debug; } - set - { - if (SemanticSearch != null) - { - SemanticSearch.Debug = value; - } - } - } - /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. [CodeGenMember("SemanticErrorHandling")] private SemanticErrorMode? SemanticErrorMode @@ -424,8 +378,6 @@ private static void Copy(SearchOptions source, SearchOptions destination) destination.SessionId = source.SessionId; destination.Size = source.Size; destination.Skip = source.Skip; - destination.QueryLanguage = source.QueryLanguage; - destination.QuerySpeller = source.QuerySpeller; destination.SemanticSearch = source.SemanticSearch; destination.VectorSearch = source.VectorSearch; } diff --git a/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs index 58950ebd7bf95..bdcde49c97ec3 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs @@ -31,22 +31,9 @@ public partial class SemanticSearchOptions /// public QueryCaption QueryCaption { get; set; } - /// The list of field names used for semantic search. - public IList SemanticFields { get; internal set; } = new List(); - - /// Join SemanticFields so it can be sent as a comma-separated string. - internal string SemanticFieldsRaw - { - get => SemanticFields.CommaJoin(); - set => SemanticFields = SearchExtensions.CommaSplit(value); - } - /// 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. public string SemanticQuery { get; set; } - /// Enables a debugging tool that can be used to further explore your reranked results. - public QueryDebugMode? Debug { get; set; } - /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. public SemanticErrorMode? ErrorMode { get; set; } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs index f7638a9de0cf2..307727734f5cf 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs @@ -105,5 +105,48 @@ public static IAzureClientBuilder AddSea TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration => builder.RegisterClientFactory(configuration); + + /// + /// Registers a instance with the + /// provided and . + /// + /// Type of the client factory builder. + /// The client factory builder. + /// + /// Required. The URI endpoint of the Search Service. This is likely + /// to be similar to "https://{search_service}.search.windows.net". + /// The URI must use HTTPS. + /// + /// + /// Required. The API key credential used to authenticate requests + /// against the search service. You need to use an admin key to + /// modify the documents in a Search Index. See + /// Create and manage api-keys for an Azure Cognitive Search service + /// for more information about API keys in Azure Cognitive Search. + /// + /// An Azure client builder. + public static IAzureClientBuilder AddSearchIndexerClient( + this TBuilder builder, + Uri endpoint, + AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder => + builder.RegisterClientFactory( + options => new SearchIndexerClient(endpoint, credential, options)); + + /// + /// Registers a instance with connection + /// options loaded from the provided + /// instance. + /// + /// Type of the client factory builder. + /// Type of the configuration. + /// The client factory builder. + /// The client configuration. + /// An Azure client builder. + public static IAzureClientBuilder AddSearchIndexerClient( + this TBuilder builder, + TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration => + builder.RegisterClientFactory(configuration); } } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs index 8443de3765e50..0c831e73c7c99 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs @@ -27,26 +27,26 @@ public enum ServiceVersion { #pragma warning disable CA1707 // Identifiers should not contain underscores /// - /// The 2020_06_30 version of the Azure Cognitive Search service. + /// The 2020-06-30 version of the Azure Cognitive Search service. /// V2020_06_30 = 1, /// - /// The 2023_11_01 version of the Azure Cognitive Search service. + /// The 2023-11-01 version of the Azure Cognitive Search service. /// V2023_11_01 = 2, /// - /// The 2024_05_01_preview version of the Azure Cognitive Search service. + /// The 2024-07-01 version of the Azure Cognitive Search service. /// - V2024_05_01_Preview = 3, + V2024_07_01 = 3, #pragma warning restore CA1707 } /// /// The Latest service version supported by this client library. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V2024_05_01_Preview; + internal const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01; /// /// The service version to use when creating continuation tokens that @@ -200,7 +200,7 @@ public static SearchClientOptions.ServiceVersion Validate(this SearchClientOptio { SearchClientOptions.ServiceVersion.V2020_06_30 => version, SearchClientOptions.ServiceVersion.V2023_11_01 => version, - SearchClientOptions.ServiceVersion.V2024_05_01_Preview => version, + SearchClientOptions.ServiceVersion.V2024_07_01 => version, _ => throw CreateInvalidVersionException(version) }; @@ -224,7 +224,7 @@ public static string ToVersionString(this SearchClientOptions.ServiceVersion ver { SearchClientOptions.ServiceVersion.V2020_06_30 => "2020-06-30", SearchClientOptions.ServiceVersion.V2023_11_01 => "2023-11-01", - SearchClientOptions.ServiceVersion.V2024_05_01_Preview => "2024-05-01-preview", + SearchClientOptions.ServiceVersion.V2024_07_01 => "2024-07-01", _ => throw CreateInvalidVersionException(version) }; diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs index 2248966f2278b..1b7b4f7f2f04e 100644 --- a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs +++ b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs @@ -96,11 +96,6 @@ internal static class Constants /// public static readonly JsonEncodedText SearchCaptionsKeyJson = JsonEncodedText.Encode("@search.captions"); - /// - /// The @search.captions key. - /// - public static readonly JsonEncodedText SearchDocumentDebugInfoKeyJson = JsonEncodedText.Encode("@search.documentDebugInfo"); - /// /// The @search.action key. /// diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index fd26a59f9434b..266b5d2ebaab2 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -11,8 +11,8 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo ```yaml title: SearchServiceClient input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/5a1fe448805429403c38a2637ee32c82ba755530/specification/search/data-plane/Azure.Search/preview/2024-05-01-preview/searchindex.json - - https://github.com/Azure/azure-rest-api-specs/blob/5a1fe448805429403c38a2637ee32c82ba755530/specification/search/data-plane/Azure.Search/preview/2024-05-01-preview/searchservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/dc27f9b32787533cd4d07fe0de5245f2f8354dbe/specification/search/data-plane/Azure.Search/stable/2024-07-01/searchindex.json + - https://github.com/Azure/azure-rest-api-specs/blob/dc27f9b32787533cd4d07fe0de5245f2f8354dbe/specification/search/data-plane/Azure.Search/stable/2024-07-01/searchservice.json generation1-convenience-client: true deserialize-null-collection-as-null-value: true ``` @@ -81,6 +81,41 @@ directive: $.additionalProperties = true; ``` +### Archboard feedback for 2024-07-01 + +```yaml +directive: +- from: "searchservice.json" + where: $.definitions + transform: > + $.AzureOpenAIParameters["x-ms-client-name"] = "AzureOpenAIVectorizerParameters"; + $.AzureOpenAIParameters.properties.authIdentity["x-ms-client-name"] = "AuthenticationIdentity"; + $.AzureOpenAIParameters.properties.resourceUri["x-ms-client-name"] = "resourceUri"; + + $.VectorSearchVectorizer.properties.name["x-ms-client-name"] = "VectorizerName"; + $.AzureOpenAIVectorizer.properties.azureOpenAIParameters["x-ms-client-name"] = "Parameters"; + + $.ScalarQuantizationVectorSearchCompressionConfiguration["x-ms-client-name"] = "ScalarQuantizationCompression"; + $.BinaryQuantizationVectorSearchCompressionConfiguration["x-ms-client-name"] = "BinaryQuantizationCompression"; + $.VectorSearchCompressionConfiguration["x-ms-client-name"] = "VectorSearchCompression"; + $.VectorSearchCompressionConfiguration.properties.name["x-ms-client-name"] = "CompressionName"; + $.VectorSearchProfile.properties.compression["x-ms-client-name"] = "CompressionName"; + + $.OcrSkillLineEnding["x-ms-client-name"] = "OcrLineEnding"; + $.OcrSkillLineEnding["x-ms-enum"].name = "OcrLineEnding"; + + $.SearchIndexerDataUserAssignedIdentity.properties.userAssignedIdentity["x-ms-format"] = "arm-id"; + $.SearchIndexerIndexProjections["x-ms-client-name"] = "SearchIndexerIndexProjection"; + $.SearchIndexerSkillset.properties.indexProjections["x-ms-client-name"] = "indexProjection"; + + $.VectorSearchCompressionTargetDataType["x-ms-client-name"] = "VectorSearchCompressionTarget"; + $.VectorSearchCompressionTargetDataType["x-ms-enum"].name = "VectorSearchCompressionTarget"; + + $.WebApiVectorizer.properties.customWebApiParameters["x-ms-client-name"] = "Parameters"; + $.WebApiParameters["x-ms-client-name"] = "WebApiVectorizerParameters"; + $.WebApiParameters.properties.uri["x-ms-client-name"] = "uri"; +``` + ### Change VectorizableImageUrlQuery.Url type to Uri ```yaml diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs index f12f7aa34d9b4..9d298c507f863 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs @@ -237,23 +237,6 @@ await AssertKeysEqual( "1", "5"); } - [Test] - public async Task TestNormalizer() - { - await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); - Response> response = - await resources.GetQueryClient().SearchAsync( - null, - new SearchOptions - { - Filter = "address/city eq 'New york'" - }); - await AssertKeysEqual( - response, - h => h.Document.HotelId, - "5", "9"); - } - [Test] public async Task HitHighlighting() { diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs index add1a5626c76a..b6c0900f25bb6 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchTests : SearchTestBase { public VectorSearchTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -103,7 +102,6 @@ await AssertKeysEqual( } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] [PlaybackOnly("The availability of Semantic Search is limited to specific regions, as indicated in the list provided here: https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=search. Due to this limitation, the deployment of resources for weekly test pipeline for setting the \"semanticSearch\": \"free\" fails in the UsGov and China cloud regions.")] public async Task SemanticHybridSearch() { @@ -129,7 +127,6 @@ public async Task SemanticHybridSearch() }, QueryType = SearchQueryType.Semantic, Select = { "hotelId", "hotelName", "description", "category" }, - QueryLanguage = QueryLanguage.EnUs }); Assert.NotNull(response.SemanticSearch.Answers); @@ -239,7 +236,6 @@ public async Task UpdateExistingIndexToAddVectorFields() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task UpdatingVectorProfileNameThrows() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -316,7 +312,6 @@ public async Task CanContinueWithNextPage() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldNotStoredNotHiddenThrows() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -354,7 +349,6 @@ public async Task VectorFieldNotStoredNotHiddenThrows() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldStoredNotHidden() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -391,7 +385,6 @@ public async Task VectorFieldStoredNotHidden() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldStoredAndHidden() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -428,7 +421,6 @@ public async Task VectorFieldStoredAndHidden() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CannotUpdateIsStoredAfterIndexCreation() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -472,7 +464,6 @@ public async Task CannotUpdateIsStoredAfterIndexCreation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CanUpdateIsHiddenAfterIndexCreation() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -513,7 +504,6 @@ public async Task CanUpdateIsHiddenAfterIndexCreation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CreateIndexUsingFieldBuilder() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); diff --git a/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs b/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs index 8f9b2408ec83c..bd3a647b1e08b 100644 --- a/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs @@ -232,7 +232,6 @@ public void ReportsIsSearchableOnlyOnPropertiesWithIsSearchableAttribute(Type mo fields.OnlyTrueFor( field => field.IsSearchable.GetValueOrDefault(false), nameof(ReflectableModel.Text), - nameof(ReflectableModel.TextWithNormalizer), nameof(ReflectableModel.MoreText), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Name), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City), @@ -264,7 +263,6 @@ public void IsFilterableOnlyOnPropertiesWithIsFilterableAttribute(Type modelType fields.OnlyTrueFor( field => field.IsFilterable.GetValueOrDefault(false), nameof(ReflectableModel.FilterableText), - nameof(ReflectableModel.TextWithNormalizer), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Rating), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country), nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Rating), @@ -345,15 +343,6 @@ public void IndexAnalyzerSetOnlyOnPropertiesWithIndexAnalyzerAttribute(Type mode nameof(ReflectableModel.TextWithIndexAnalyzer)); } - [TestCaseSource(nameof(TestModelTypeTestData))] - public void NormalizerSetOnlyOnPropertiesWithNormalizerAttribute(Type modelType) - { - var fields = new FieldMap(BuildForType(modelType)); - fields.OnlyTrueFor( - field => field.NormalizerName == LexicalNormalizerName.Lowercase, - nameof(ReflectableModel.TextWithNormalizer)); - } - [TestCaseSource(nameof(TestModelTypeTestData))] public void SynonymMapsSetOnlyOnPropertiesWithSynonymMapsAttribute(Type modelType) { diff --git a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs index 37d687c9f8b9f..5edcbc97f2bd7 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs @@ -13,7 +13,7 @@ public class DataSourceTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, null, value, null); + SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, value, null); Assert.AreEqual(expected, sut.ETag?.ToString()); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs b/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs index 86192ebbac9c0..bf68a4154f556 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs @@ -99,9 +99,6 @@ public class ReflectableModel [SearchableField(IndexAnalyzerName = LexicalAnalyzerName.Values.Whitespace)] public string TextWithIndexAnalyzer { get; set; } - [SearchableField(IsFilterable = true, NormalizerName = LexicalNormalizerName.Values.Lowercase)] - public string TextWithNormalizer { get; set; } - public string[] StringArray { get; set; } public IList StringIList { get; set; } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs index b71ad556d129f..aa26a4fb6163c 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs @@ -14,7 +14,7 @@ public class SearchIndexTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndex sut = new SearchIndex(null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, null, value); + SearchIndex sut = new SearchIndex(null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, value); Assert.AreEqual(expected, sut.ETag?.ToString()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs index dfdda90105cd2..d67a5623ae91f 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs @@ -13,7 +13,7 @@ public class SearchIndexerTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexer sut = new SearchIndexer(null, null, null, null, null, null, null, null, null, null, value, null, null); + SearchIndexer sut = new SearchIndexer(null, null, null, null, null, null, null, null, null, null, value, null); Assert.AreEqual(expected, sut.ETag?.ToString()); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs index a6e64f5997c36..b39e74fec8c1b 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs @@ -13,7 +13,7 @@ public class SkillsetTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexerSkillset sut = new(name: null, description: null, skills: null, cognitiveServicesAccount: null, knowledgeStore: null, indexProjections: null, etag: value, encryptionKey: null); + SearchIndexerSkillset sut = new(name: null, description: null, skills: null, cognitiveServicesAccount: null, knowledgeStore: null, indexProjection: null, etag: value, encryptionKey: null); Assert.AreEqual(expected, sut.ETag?.ToString()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs index 958ea8f989572..89654f97e1551 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs @@ -18,7 +18,6 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class HelloWorld : SearchTestBase { public HelloWorld(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs index ba331de858860..fda9173f5f189 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs @@ -76,7 +76,6 @@ public async Task CreateIndex() SearchableField genreField = new SearchableField("genre") { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Lowercase, IsFacetable = true, IsFilterable = true }; diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs index 7970bf72d50ea..6865ce47dedac 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSemanticHybridSearch : SearchTestBase { public VectorSemanticHybridSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -58,7 +57,6 @@ public async Task SemanticHybridSearch() QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic, }); diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs index 7e1d1863870eb..4cb3e27978708 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs @@ -11,7 +11,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingFieldBuilder : SearchTestBase { public VectorSearchUsingFieldBuilder(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs index f76b21f1293dd..9fa3cc7076700 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingReducedEmbeddings : SearchTestBase { public VectorSearchUsingReducedEmbeddings(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -82,7 +81,7 @@ private async Task CreateIndex(SearchResources resources, str #region Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Reduced_Vector_Search_Index string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; - string deploymentId = "my-text-embedding-3-small"; + string deploymentName = "my-text-embedding-3-small"; int modelDimensions = 256; // Here's the reduced model dimensions string indexName = "hotel"; @@ -106,7 +105,7 @@ private async Task CreateIndex(SearchResources resources, str { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -117,11 +116,11 @@ private async Task CreateIndex(SearchResources resources, str { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbedding3Small } } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs index d5a9939fb4b76..ff010b2b217a5 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs @@ -11,7 +11,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingVectorizableTextQuery : SearchTestBase { public VectorSearchUsingVectorizableTextQuery(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -264,7 +263,7 @@ private async Task CreateIndex(SearchResources resources, str #region Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Vector_Search_Index_UsingVectorizableTextQuery string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; - string deploymentId = "text-embedding-ada-002"; + string deploymentName = "text-embedding-ada-002"; int modelDimensions = 1536; string indexName = "hotel"; @@ -288,7 +287,7 @@ private async Task CreateIndex(SearchResources resources, str { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -299,11 +298,11 @@ private async Task CreateIndex(SearchResources resources, str { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbeddingAda002 } } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs index 5031c03c53e74..9df0cdb6da4bd 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs @@ -12,7 +12,6 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class SemanticSearch : SearchTestBase { public SemanticSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -45,7 +44,6 @@ public async Task SemanticSearchTest() QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic }); @@ -114,7 +112,6 @@ public async Task SearchUsingSemanticQuery() QueryAnswer = new(QueryAnswerType.Extractive), SemanticQuery = "Is there any hotel located on the main commercial artery of the city in the heart of New York?" }, - QueryLanguage = QueryLanguage.EnUs, }); int count = 0; diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs index 324677deede4d..07500a5066a92 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs @@ -15,7 +15,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public class SearchIndexClientTests : SearchTestBase { public SearchIndexClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -108,8 +107,6 @@ static string GetDuplicates(IEnumerable values) } } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task GetServiceStatistics() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -145,8 +142,6 @@ public void CreateIndexParameterValidation() Assert.AreEqual("index", ex.ParamName); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CreateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -180,8 +175,6 @@ public void UpdateIndexParameterValidation() Assert.AreEqual("index", ex.ParamName); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task UpdateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -452,31 +445,6 @@ public async Task AnalyzeText() Assert.AreEqual(new[] { "The", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog." }, tokens.Select(t => t.Token)); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] - public async Task AnalyzeTextWithNormalizer() - { - await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); - - SearchIndexClient client = resources.GetIndexClient(); - - AnalyzeTextOptions request = new("I dARe YoU tO reAd It IN A nORmAl vOiCE.", LexicalNormalizerName.Lowercase); - - Response> result = await client.AnalyzeTextAsync(resources.IndexName, request); - IReadOnlyList tokens = result.Value; - - Assert.AreEqual(1, tokens.Count); - Assert.AreEqual("i dare you to read it in a normal voice.", tokens[0].Token); - - request = new("Item ① in my ⑽ point rant is that 75⁰F is uncomfortably warm.", LexicalNormalizerName.AsciiFolding); - - result = await client.AnalyzeTextAsync(resources.IndexName, request); - tokens = result.Value; - - Assert.AreEqual(1, tokens.Count); - Assert.AreEqual("Item 1 in my (10) point rant is that 750F is uncomfortably warm.", tokens[0].Token); - } - [Test] public async Task SetScoringProfile() { diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs index 66c608fe77af1..fdd919f293819 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public class SearchIndexerClientTests : SearchTestBase { public SearchIndexerClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -629,11 +628,8 @@ private async Task TestSkillsetAsync(SearchIndexerClient client, SearchIndexerSk } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task RoundtripAllSkills() { - // BUGBUG: https://github.com/Azure/azure-sdk-for-net/issues/15108 - await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); SearchIndexerClient client = resources.GetIndexerClient(new SearchClientOptions(ServiceVersion)); @@ -654,9 +650,7 @@ SearchIndexerSkill CreateSkill(Type t, string[] inputNames, string[] outputNames Type _ when t == typeof(TextTranslationSkill) => new TextTranslationSkill(inputs, outputs, TextTranslationSkillLanguage.En), Type _ when t == typeof(WebApiSkill) => new WebApiSkill(inputs, outputs, "https://microsoft.com"), - Type _ when t == typeof(AzureMachineLearningSkill) => new AzureMachineLearningSkill(inputs, outputs, new Uri("https://microsoft.com")), - Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => new AzureOpenAIEmbeddingSkill(inputs, outputs) { ResourceUri = new Uri("https://test-sample.openai.azure.com"), ApiKey = "api-key", DeploymentId = "model", ModelName = "text-embedding-3-large" }, - Type _ when t == typeof(VisionVectorizeSkill) => new VisionVectorizeSkill(inputs, outputs, "latest"), + Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => new AzureOpenAIEmbeddingSkill(inputs, outputs) { ResourceUri = new Uri("https://test-sample.openai.azure.com"), ApiKey = "api-key", DeploymentName = "model", ModelName = "text-embedding-3-large" }, _ => (SearchIndexerSkill)Activator.CreateInstance(t, new object[] { inputs, outputs }), }; } @@ -718,10 +712,7 @@ SentimentSkill CreateSentimentSkill(SentimentSkill.SkillVersion skillVersion) Type _ when t == typeof(SplitSkill) => CreateSkill(t, new[] { "text", "languageCode" }, new[] { "textItems" }), Type _ when t == typeof(TextTranslationSkill) => CreateSkill(t, new[] { "text", "toLanguageCode", "fromLanguageCode" }, new[] { "translatedText", "translatedToLanguageCode", "translatedFromLanguageCode" }), Type _ when t == typeof(WebApiSkill) => CreateSkill(t, new[] { "input" }, new[] { "output" }), - Type _ when t == typeof(AzureMachineLearningSkill) => CreateSkill(t, new[] { "input" }, new[] { "output" }), Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => CreateSkill(t, new[] { "text" }, new[] { "embedding" }), - Type _ when t == typeof(VisionVectorizeSkill) => - TestEnvironment.AzureEnvironment != "AzureUSGovernment" ? CreateSkill(t, new[] { "image" }, new[] { "vector" }) : null, _ => throw new NotSupportedException($"{t.FullName}"), }) .Where(skill => skill != null) diff --git a/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs index 9f7ee5aac1bf5..a201876386bee 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs @@ -21,7 +21,6 @@ public void CreatesEquivalentField( [Values(null, "AnalyzerName")] string analyzerName, [Values(null, "SearchAnalyzerName")] string searchAnalyzerName, [Values(null, "IndexAnalyzerName")] string indexAnalyzerName, - [Values(null, "NormalizerName")] string normalizerName, [Values(null, new[] { "synonynMapName" })] string[] synonymMapNames) { SearchableFieldAttribute sut = new SearchableFieldAttribute @@ -48,11 +47,6 @@ public void CreatesEquivalentField( sut.IndexAnalyzerName = indexAnalyzerName; } - if (normalizerName != null) - { - sut.NormalizerName = normalizerName; - } - if (synonymMapNames != null) { sut.SynonymMapNames = synonymMapNames; @@ -72,7 +66,6 @@ public void CreatesEquivalentField( Assert.AreEqual(analyzerName, field.AnalyzerName?.ToString()); Assert.AreEqual(searchAnalyzerName, field.SearchAnalyzerName?.ToString()); Assert.AreEqual(indexAnalyzerName, field.IndexAnalyzerName?.ToString()); - Assert.AreEqual(normalizerName, field.NormalizerName?.ToString()); Assert.AreEqual(synonymMapNames ?? Array.Empty(), field.SynonymMapNames); } } diff --git a/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs b/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs index e5bd6ba6612ae..9e4d5676d5f12 100644 --- a/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs @@ -49,7 +49,6 @@ public void IsSearchableNotOverwritten() ISearchFieldAttribute attribute = new SearchableFieldAttribute { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Values.Lowercase, IsFilterable = true, IsSortable = true, }; @@ -67,7 +66,6 @@ public void IsSearchableNotOverwritten() Assert.AreEqual(LexicalAnalyzerName.EnLucene.ToString(), field.AnalyzerName?.ToString()); Assert.IsNull(field.IndexAnalyzerName); Assert.IsNull(field.SearchAnalyzerName); - Assert.AreEqual(LexicalNormalizerName.Lowercase.ToString(), field.NormalizerName?.ToString()); Assert.IsEmpty(field.SynonymMapNames); // Make sure that if a SimpleFieldAttribute were also specified, it does not overwrite IsSearchable @@ -90,7 +88,6 @@ public void IsSearchableNotOverwritten() Assert.AreEqual(LexicalAnalyzerName.EnLucene.ToString(), field.AnalyzerName?.ToString()); Assert.IsNull(field.IndexAnalyzerName); Assert.IsNull(field.SearchAnalyzerName); - Assert.AreEqual(LexicalNormalizerName.Lowercase.ToString(), field.NormalizerName?.ToString()); Assert.IsEmpty(field.SynonymMapNames); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs index df40a91bdc531..846568a5dc9b5 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs @@ -53,7 +53,7 @@ internal static SearchIndex GetHotelIndex(string name) => Fields = { new SearchableField("streetAddress"), - new SearchableField("city") { IsFilterable = true, IsSortable = true, IsFacetable = true, NormalizerName = LexicalNormalizerName.Lowercase }, + new SearchableField("city") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("stateProvince") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("country") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("postalCode") { IsFilterable = true, IsSortable = true, IsFacetable = true }, diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs index 379e2371f514f..480c775afdd57 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs @@ -51,7 +51,7 @@ internal static SearchIndex GetHotelIndex(string name) => Fields = { new SearchableField("StreetAddress"), - new SearchableField("City") { IsFilterable = true, IsSortable = true, IsFacetable = true, NormalizerName = LexicalNormalizerName.Lowercase }, + new SearchableField("City") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("StateProvince") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("Country") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("PostalCode") { IsFilterable = true, IsSortable = true, IsFacetable = true }, diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs index c834826e54485..d66b64e6aff6b 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs @@ -23,7 +23,7 @@ namespace Azure.Search.Documents.Tests /// Base class for Search unit tests that adds shared infrastructure on top /// of the Azure.Core testing framework. /// - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01)] public abstract partial class SearchTestBase : RecordedTestBase { ///