diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs index d65745f5b56d..cf28f2bcf9e9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// The name of the embedding model from the Azure AI Studio Catalog that will be called. + /// The name of the embedding model from the Azure AI Foundry Catalog that will be called. public readonly partial struct AIFoundryModelCatalogName : IEquatable { private readonly string _value; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs index 933ce5586932..899f99a9246b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs @@ -25,7 +25,7 @@ public AzureMachineLearningParameters(Uri scoringUri) /// (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. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, AIFoundryModelCatalogName? modelName) { ScoringUri = scoringUri; @@ -46,7 +46,7 @@ internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey 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. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. public AIFoundryModelCatalogName? ModelName { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs index 7aef8e982c11..a459785ad47d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs @@ -9,7 +9,7 @@ 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. + /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog for generating the vector embedding of a query string. public partial class AzureMachineLearningVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.Serialization.cs deleted file mode 100644 index 31c08d33c7e2..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.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 DebugInfo - { - internal static DebugInfo DeserializeDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - QueryRewritesDebugInfo queryRewrites = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("queryRewrites"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryRewrites = QueryRewritesDebugInfo.DeserializeQueryRewritesDebugInfo(property.Value); - continue; - } - } - return new DebugInfo(queryRewrites); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.cs index b50ff0c0537f..d1d31fc1c682 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DebugInfo.cs @@ -8,7 +8,7 @@ namespace Azure.Search.Documents.Models { /// Contains debugging information that can be used to further explore your search results. - public partial class DebugInfo + internal partial class DebugInfo { /// Initializes a new instance of . internal DebugInfo() diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.Serialization.cs deleted file mode 100644 index ff03080d8132..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.Serialization.cs +++ /dev/null @@ -1,60 +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 QueryRewritesDebugInfo - { - internal static QueryRewritesDebugInfo DeserializeQueryRewritesDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - QueryRewritesValuesDebugInfo text = default; - IReadOnlyList vectors = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - text = QueryRewritesValuesDebugInfo.DeserializeQueryRewritesValuesDebugInfo(property.Value); - continue; - } - if (property.NameEquals("vectors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(QueryRewritesValuesDebugInfo.DeserializeQueryRewritesValuesDebugInfo(item)); - } - vectors = array; - continue; - } - } - return new QueryRewritesDebugInfo(text, vectors ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryRewritesDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryRewritesDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.cs index 29f0f869191e..4e49dafcbcb5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesDebugInfo.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Models { /// Contains debugging information specific to query rewrites. - public partial class QueryRewritesDebugInfo + internal partial class QueryRewritesDebugInfo { /// Initializes a new instance of . internal QueryRewritesDebugInfo() diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.Serialization.cs deleted file mode 100644 index a1d641a36434..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.Serialization.cs +++ /dev/null @@ -1,56 +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 QueryRewritesValuesDebugInfo - { - internal static QueryRewritesValuesDebugInfo DeserializeQueryRewritesValuesDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string inputQuery = default; - IReadOnlyList rewrites = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inputQuery"u8)) - { - inputQuery = property.Value.GetString(); - continue; - } - if (property.NameEquals("rewrites"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - rewrites = array; - continue; - } - } - return new QueryRewritesValuesDebugInfo(inputQuery, rewrites ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryRewritesValuesDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryRewritesValuesDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.cs index 953d64ae6719..6234f39ac435 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryRewritesValuesDebugInfo.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Models { /// Contains debugging information specific to query rewrites. - public partial class QueryRewritesValuesDebugInfo + internal partial class QueryRewritesValuesDebugInfo { /// Initializes a new instance of . internal QueryRewritesValuesDebugInfo() 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 e2ab7861359d..19c568fe9c5c 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 @@ -28,7 +28,6 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme SemanticErrorReason? searchSemanticPartialResponseReason = default; SemanticSearchResultsType? searchSemanticPartialResponseType = default; SemanticQueryRewritesResultType? searchSemanticQueryRewritesResultType = default; - DebugInfo searchDebug = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@odata.count"u8)) @@ -141,16 +140,6 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchSemanticQueryRewritesResultType = new SemanticQueryRewritesResultType(property.Value.GetString()); continue; } - if (property.NameEquals("@search.debug"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - searchDebug = null; - continue; - } - searchDebug = DebugInfo.DeserializeDebugInfo(property.Value); - continue; - } } return new SearchDocumentsResult( odataCount, @@ -162,8 +151,7 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme odataNextLink, searchSemanticPartialResponseReason, searchSemanticPartialResponseType, - searchSemanticQueryRewritesResultType, - searchDebug); + searchSemanticQueryRewritesResultType); } /// 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 972d1a451da5..4397ef67b236 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs @@ -33,8 +33,7 @@ internal SearchDocumentsResult(IEnumerable results) /// Reason that a partial response was returned for a semantic ranking request. /// Type of partial response that was returned for a semantic ranking request. /// Type of query rewrite that was used to retrieve documents. - /// Debug information that applies to the search results as a whole. - internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, IReadOnlyList results, string nextLink, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType, SemanticQueryRewritesResultType? semanticQueryRewritesResultType, DebugInfo debugInfo) + internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, IReadOnlyList results, string nextLink, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType, SemanticQueryRewritesResultType? semanticQueryRewritesResultType) { Count = count; Coverage = coverage; @@ -46,7 +45,6 @@ internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionar SemanticPartialResponseReason = semanticPartialResponseReason; SemanticPartialResponseType = semanticPartialResponseType; SemanticQueryRewritesResultType = semanticQueryRewritesResultType; - DebugInfo = debugInfo; } /// 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. @@ -69,7 +67,5 @@ internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionar public SemanticSearchResultsType? SemanticPartialResponseType { get; } /// Type of query rewrite that was used to retrieve documents. public SemanticQueryRewritesResultType? SemanticQueryRewritesResultType { get; } - /// Debug information that applies to the search results as a whole. - public DebugInfo DebugInfo { get; } } } 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 4a73a4c73841..218e1c1685af 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs @@ -65,7 +65,7 @@ public TokenFilterName(string value) public static TokenFilterName AsciiFolding { get; } = new TokenFilterName(AsciiFoldingValue); /// Forms bigrams of CJK terms that are generated from the standard tokenizer. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKBigramFilter.html. public static TokenFilterName CjkBigram { get; } = new TokenFilterName(CjkBigramValue); - /// Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKWidthFilter.html. + /// Normalizes CJK width differences. Folds full-width ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/cjk/CJKWidthFilter.html. public static TokenFilterName CjkWidth { get; } = new TokenFilterName(CjkWidthValue); /// Removes English possessives, and dots from acronyms. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/standard/ClassicFilter.html. public static TokenFilterName Classic { get; } = new TokenFilterName(ClassicValue); 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 bef6730ac985..7443589ba5fc 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs @@ -33,7 +33,7 @@ public VectorSearchVectorizerKind(string value) 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. + /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Foundry 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); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs index 6b392475902e..742e27797e10 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs @@ -15,165 +15,6 @@ namespace Azure.Search.Documents.Models /// Model factory for models. public static partial class SearchModelFactory { - /// Initializes a new instance of . - /// The approximate count of documents falling within the bucket described by this facet. - /// The nested facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not contain any nested facets. - /// Additional Properties. - /// A new instance for mocking. - public static FacetResult FacetResult(long? count = null, IReadOnlyDictionary> facets = null, IReadOnlyDictionary additionalProperties = null) - { - facets ??= new Dictionary>(); - additionalProperties ??= new Dictionary(); - - return new FacetResult(count, facets, additionalProperties); - } - - /// Initializes a new instance of . - /// The score value represents how relevant the answer is to the query relative to other answers returned for the query. - /// The key of the document the answer was extracted from. - /// The text passage extracted from the document contents as the answer. - /// Same text passage as in the Text property with highlighted text phrases most relevant to the query. - /// Additional Properties. - /// A new instance for mocking. - public static QueryAnswerResult QueryAnswerResult(double? score = null, string key = null, string text = null, string highlights = null, IReadOnlyDictionary additionalProperties = null) - { - additionalProperties ??= new Dictionary(); - - return new QueryAnswerResult(score, key, text, highlights, additionalProperties); - } - - /// Initializes a new instance of . - /// A representative text passage extracted from the document most relevant to the search query. - /// Same text passage as in the Text property with highlighted phrases most relevant to the query. - /// Additional Properties. - /// A new instance for mocking. - public static QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, IReadOnlyDictionary additionalProperties = null) - { - additionalProperties ??= new Dictionary(); - - return new QueryCaptionResult(text, highlights, additionalProperties); - } - - /// Initializes a new instance of . - /// Contains debugging information specific to semantic ranking requests. - /// Contains debugging information specific to vector and hybrid search. - /// A new instance for mocking. - public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null) - { - return new DocumentDebugInfo(semantic, vectors); - } - - /// 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 . - /// The breakdown of subscores of the document prior to the chosen result set fusion/combination method such as RRF. - /// A new instance for mocking. - public static VectorsDebugInfo VectorsDebugInfo(QueryResultDocumentSubscores subscores = null) - { - return new VectorsDebugInfo(subscores); - } - - /// Initializes a new instance of . - /// The BM25 or Classic score for the text portion of the query. - /// The vector similarity and @search.score values for each vector query. - /// The BM25 or Classic score for the text portion of the query. - /// A new instance for mocking. - public static QueryResultDocumentSubscores QueryResultDocumentSubscores(TextResult text = null, IEnumerable> vectors = null, double? documentBoost = null) - { - vectors ??= new List>(); - - return new QueryResultDocumentSubscores(text, vectors?.ToList(), documentBoost); - } - - /// Initializes a new instance of . - /// The BM25 or Classic score for the text portion of the query. - /// A new instance for mocking. - public static TextResult TextResult(double? searchScore = null) - { - return new TextResult(searchScore); - } - - /// Initializes a new instance of . - /// The @search.score value that is calculated from the vector similarity score. This is the score that's visible in a pure single-field single-vector query. - /// The vector similarity score for this document. Note this is the canonical definition of similarity metric, not the 'distance' version. For example, cosine similarity instead of cosine distance. - /// A new instance for mocking. - public static SingleVectorFieldResult SingleVectorFieldResult(double? searchScore = null, double? vectorSimilarity = null) - { - return new SingleVectorFieldResult(searchScore, vectorSimilarity); - } - - /// Initializes a new instance of . - /// Contains debugging information specific to query rewrites. - /// A new instance for mocking. - public static DebugInfo DebugInfo(QueryRewritesDebugInfo queryRewrites = null) - { - return new DebugInfo(queryRewrites); - } - - /// Initializes a new instance of . - /// List of query rewrites generated for the text query. - /// List of query rewrites generated for the vectorizable text queries. - /// A new instance for mocking. - public static QueryRewritesDebugInfo QueryRewritesDebugInfo(QueryRewritesValuesDebugInfo text = null, IEnumerable vectors = null) - { - vectors ??= new List(); - - return new QueryRewritesDebugInfo(text, vectors?.ToList()); - } - - /// Initializes a new instance of . - /// The input text to the generative query rewriting model. There may be cases where the user query and the input to the generative model are not identical. - /// List of query rewrites. - /// A new instance for mocking. - public static QueryRewritesValuesDebugInfo QueryRewritesValuesDebugInfo(string inputQuery = null, IEnumerable rewrites = null) - { - rewrites ??= new List(); - - return new QueryRewritesValuesDebugInfo(inputQuery, rewrites?.ToList()); - } - - /// 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. - /// A new instance for mocking. - public static AutocompleteResults AutocompleteResults(double? coverage = null, IEnumerable results = null) - { - results ??= new List(); - - return new AutocompleteResults(coverage, results?.ToList()); - } - /// Initializes a new instance of . /// Overall indexer status. /// The result of the most recent or an in-progress indexer execution. @@ -305,5 +146,134 @@ public static SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex = n { return new SearchServiceLimits(maxFieldsPerIndex, maxFieldNestingDepthPerIndex, maxComplexCollectionFieldsPerIndex, maxComplexObjectsInCollectionsPerDocument, maxStoragePerIndexInBytes); } + + /// Initializes a new instance of . + /// The approximate count of documents falling within the bucket described by this facet. + /// The nested facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not contain any nested facets. + /// Additional Properties. + /// A new instance for mocking. + public static FacetResult FacetResult(long? count = null, IReadOnlyDictionary> facets = null, IReadOnlyDictionary additionalProperties = null) + { + facets ??= new Dictionary>(); + additionalProperties ??= new Dictionary(); + + return new FacetResult(count, facets, additionalProperties); + } + + /// Initializes a new instance of . + /// The score value represents how relevant the answer is to the query relative to other answers returned for the query. + /// The key of the document the answer was extracted from. + /// The text passage extracted from the document contents as the answer. + /// Same text passage as in the Text property with highlighted text phrases most relevant to the query. + /// Additional Properties. + /// A new instance for mocking. + public static QueryAnswerResult QueryAnswerResult(double? score = null, string key = null, string text = null, string highlights = null, IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new QueryAnswerResult(score, key, text, highlights, additionalProperties); + } + + /// Initializes a new instance of . + /// A representative text passage extracted from the document most relevant to the search query. + /// Same text passage as in the Text property with highlighted phrases most relevant to the query. + /// Additional Properties. + /// A new instance for mocking. + public static QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, IReadOnlyDictionary additionalProperties = null) + { + additionalProperties ??= new Dictionary(); + + return new QueryCaptionResult(text, highlights, additionalProperties); + } + + /// Initializes a new instance of . + /// Contains debugging information specific to semantic ranking requests. + /// Contains debugging information specific to vector and hybrid search. + /// A new instance for mocking. + public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null) + { + return new DocumentDebugInfo(semantic, vectors); + } + + /// 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 . + /// The breakdown of subscores of the document prior to the chosen result set fusion/combination method such as RRF. + /// A new instance for mocking. + public static VectorsDebugInfo VectorsDebugInfo(QueryResultDocumentSubscores subscores = null) + { + return new VectorsDebugInfo(subscores); + } + + /// Initializes a new instance of . + /// The BM25 or Classic score for the text portion of the query. + /// The vector similarity and @search.score values for each vector query. + /// The BM25 or Classic score for the text portion of the query. + /// A new instance for mocking. + public static QueryResultDocumentSubscores QueryResultDocumentSubscores(TextResult text = null, IEnumerable> vectors = null, double? documentBoost = null) + { + vectors ??= new List>(); + + return new QueryResultDocumentSubscores(text, vectors?.ToList(), documentBoost); + } + + /// Initializes a new instance of . + /// The BM25 or Classic score for the text portion of the query. + /// A new instance for mocking. + public static TextResult TextResult(double? searchScore = null) + { + return new TextResult(searchScore); + } + + /// Initializes a new instance of . + /// The @search.score value that is calculated from the vector similarity score. This is the score that's visible in a pure single-field single-vector query. + /// The vector similarity score for this document. Note this is the canonical definition of similarity metric, not the 'distance' version. For example, cosine similarity instead of cosine distance. + /// A new instance for mocking. + public static SingleVectorFieldResult SingleVectorFieldResult(double? searchScore = null, double? vectorSimilarity = null) + { + return new SingleVectorFieldResult(searchScore, vectorSimilarity); + } + + /// 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. + /// A new instance for mocking. + public static AutocompleteResults AutocompleteResults(double? coverage = null, IEnumerable results = null) + { + results ??= new List(); + + return new AutocompleteResults(coverage, results?.ToList()); + } } } diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index 794d15c138df..a4b49a8dae55 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -10,9 +10,8 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo ## Swagger Source(s) ```yaml title: SearchServiceClient -input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/14531a7cf6101c1dd57e7c1c83103a047bb8f5bb/specification/search/data-plane/Azure.Search/preview/2024-11-01-preview/searchindex.json - - https://github.com/Azure/azure-rest-api-specs/blob/14531a7cf6101c1dd57e7c1c83103a047bb8f5bb/specification/search/data-plane/Azure.Search/preview/2024-11-01-preview/searchservice.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/search/data-plane/Azure.Search/readme.md generation1-convenience-client: true deserialize-null-collection-as-null-value: true ``` @@ -559,3 +558,4 @@ directive: "modelAsString": false } ``` +