Skip to content

Commit d5c506b

Browse files
[Search] Update code with semantic search changes (Azure#25198)
* Update generated code from latest REST Api * Update test code to fix build issue * Simplify property names in `PrioritizedFields` * Update public API * Rename `KeywordsFields` -> `KeywordFields` Add the new search option `SemanticConfiguration` in the `Copy()` method * Rename `SemanticConfiguration`->`SemanticConfigurationName` in `SearchOptions`
1 parent 61d39d6 commit d5c506b

18 files changed

+758
-8
lines changed

sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public SearchOptions() { }
143143
public System.Collections.Generic.IList<string> SearchFields { get { throw null; } }
144144
public Azure.Search.Documents.Models.SearchMode? SearchMode { get { throw null; } set { } }
145145
public System.Collections.Generic.IList<string> Select { get { throw null; } }
146+
public string SemanticConfigurationName { get { throw null; } set { } }
146147
public System.Collections.Generic.IList<string> SemanticFields { get { throw null; } }
147148
public string SessionId { get { throw null; } set { } }
148149
public int? Size { get { throw null; } set { } }
@@ -1680,6 +1681,13 @@ public PiiDetectionSkill(System.Collections.Generic.IEnumerable<Azure.Search.Doc
16801681
public static bool operator !=(Azure.Search.Documents.Indexes.Models.PiiDetectionSkillMaskingMode left, Azure.Search.Documents.Indexes.Models.PiiDetectionSkillMaskingMode right) { throw null; }
16811682
public override string ToString() { throw null; }
16821683
}
1684+
public partial class PrioritizedFields
1685+
{
1686+
public PrioritizedFields() { }
1687+
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.SemanticField> ContentFields { get { throw null; } }
1688+
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.SemanticField> KeywordFields { get { throw null; } }
1689+
public Azure.Search.Documents.Indexes.Models.SemanticField TitleField { get { throw null; } set { } }
1690+
}
16831691
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
16841692
public readonly partial struct RegexFlag : System.IEquatable<Azure.Search.Documents.Indexes.Models.RegexFlag>
16851693
{
@@ -1808,6 +1816,7 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable<Azure.Sea
18081816
public string Name { get { throw null; } }
18091817
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.LexicalNormalizer> Normalizers { get { throw null; } }
18101818
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.ScoringProfile> ScoringProfiles { get { throw null; } }
1819+
public Azure.Search.Documents.Indexes.Models.SemanticSettings SemanticSettings { get { throw null; } set { } }
18111820
public Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm Similarity { get { throw null; } set { } }
18121821
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.SearchSuggester> Suggesters { get { throw null; } }
18131822
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.TokenFilter> TokenFilters { get { throw null; } }
@@ -1999,6 +2008,22 @@ public SearchSuggester(string name, params string[] sourceFields) { }
19992008
public string Name { get { throw null; } set { } }
20002009
public System.Collections.Generic.IList<string> SourceFields { get { throw null; } }
20012010
}
2011+
public partial class SemanticConfiguration
2012+
{
2013+
public SemanticConfiguration(string name, Azure.Search.Documents.Indexes.Models.PrioritizedFields prioritizedFields) { }
2014+
public string Name { get { throw null; } set { } }
2015+
public Azure.Search.Documents.Indexes.Models.PrioritizedFields PrioritizedFields { get { throw null; } set { } }
2016+
}
2017+
public partial class SemanticField
2018+
{
2019+
public SemanticField() { }
2020+
public string FieldName { get { throw null; } set { } }
2021+
}
2022+
public partial class SemanticSettings
2023+
{
2024+
public SemanticSettings() { }
2025+
public System.Collections.Generic.IList<Azure.Search.Documents.Indexes.Models.SemanticConfiguration> Configurations { get { throw null; } }
2026+
}
20022027
public partial class SentimentSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill
20032028
{
20042029
public SentimentSkill(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.InputFieldMappingEntry> inputs, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.OutputFieldMappingEntry> outputs) { }
@@ -2709,8 +2734,78 @@ internal IndexingResult() { }
27092734
private readonly object _dummy;
27102735
private readonly int _dummyPrimitive;
27112736
public QueryLanguage(string value) { throw null; }
2737+
public static Azure.Search.Documents.Models.QueryLanguage ArEg { get { throw null; } }
2738+
public static Azure.Search.Documents.Models.QueryLanguage ArJo { get { throw null; } }
2739+
public static Azure.Search.Documents.Models.QueryLanguage ArKw { get { throw null; } }
2740+
public static Azure.Search.Documents.Models.QueryLanguage ArMa { get { throw null; } }
2741+
public static Azure.Search.Documents.Models.QueryLanguage ArSa { get { throw null; } }
2742+
public static Azure.Search.Documents.Models.QueryLanguage BgBg { get { throw null; } }
2743+
public static Azure.Search.Documents.Models.QueryLanguage BnIn { get { throw null; } }
2744+
public static Azure.Search.Documents.Models.QueryLanguage CaEs { get { throw null; } }
2745+
public static Azure.Search.Documents.Models.QueryLanguage CsCz { get { throw null; } }
2746+
public static Azure.Search.Documents.Models.QueryLanguage DaDk { get { throw null; } }
2747+
public static Azure.Search.Documents.Models.QueryLanguage DeDe { get { throw null; } }
2748+
public static Azure.Search.Documents.Models.QueryLanguage ElGr { get { throw null; } }
2749+
public static Azure.Search.Documents.Models.QueryLanguage EnAu { get { throw null; } }
2750+
public static Azure.Search.Documents.Models.QueryLanguage EnCa { get { throw null; } }
2751+
public static Azure.Search.Documents.Models.QueryLanguage EnGb { get { throw null; } }
2752+
public static Azure.Search.Documents.Models.QueryLanguage EnIn { get { throw null; } }
27122753
public static Azure.Search.Documents.Models.QueryLanguage EnUs { get { throw null; } }
2754+
public static Azure.Search.Documents.Models.QueryLanguage EsEs { get { throw null; } }
2755+
public static Azure.Search.Documents.Models.QueryLanguage EsMx { get { throw null; } }
2756+
public static Azure.Search.Documents.Models.QueryLanguage EtEe { get { throw null; } }
2757+
public static Azure.Search.Documents.Models.QueryLanguage EuEs { get { throw null; } }
2758+
public static Azure.Search.Documents.Models.QueryLanguage FaAe { get { throw null; } }
2759+
public static Azure.Search.Documents.Models.QueryLanguage FiFi { get { throw null; } }
2760+
public static Azure.Search.Documents.Models.QueryLanguage FrCa { get { throw null; } }
2761+
public static Azure.Search.Documents.Models.QueryLanguage FrFr { get { throw null; } }
2762+
public static Azure.Search.Documents.Models.QueryLanguage GaIe { get { throw null; } }
2763+
public static Azure.Search.Documents.Models.QueryLanguage GlEs { get { throw null; } }
2764+
public static Azure.Search.Documents.Models.QueryLanguage GuIn { get { throw null; } }
2765+
public static Azure.Search.Documents.Models.QueryLanguage HeIl { get { throw null; } }
2766+
public static Azure.Search.Documents.Models.QueryLanguage HiIn { get { throw null; } }
2767+
public static Azure.Search.Documents.Models.QueryLanguage HrBa { get { throw null; } }
2768+
public static Azure.Search.Documents.Models.QueryLanguage HrHr { get { throw null; } }
2769+
public static Azure.Search.Documents.Models.QueryLanguage HuHu { get { throw null; } }
2770+
public static Azure.Search.Documents.Models.QueryLanguage HyAm { get { throw null; } }
2771+
public static Azure.Search.Documents.Models.QueryLanguage IdId { get { throw null; } }
2772+
public static Azure.Search.Documents.Models.QueryLanguage IsIs { get { throw null; } }
2773+
public static Azure.Search.Documents.Models.QueryLanguage ItIt { get { throw null; } }
2774+
public static Azure.Search.Documents.Models.QueryLanguage JaJp { get { throw null; } }
2775+
public static Azure.Search.Documents.Models.QueryLanguage KnIn { get { throw null; } }
2776+
public static Azure.Search.Documents.Models.QueryLanguage KoKr { get { throw null; } }
2777+
public static Azure.Search.Documents.Models.QueryLanguage LtLt { get { throw null; } }
2778+
public static Azure.Search.Documents.Models.QueryLanguage LvLv { get { throw null; } }
2779+
public static Azure.Search.Documents.Models.QueryLanguage MlIn { get { throw null; } }
2780+
public static Azure.Search.Documents.Models.QueryLanguage MrIn { get { throw null; } }
2781+
public static Azure.Search.Documents.Models.QueryLanguage MsBn { get { throw null; } }
2782+
public static Azure.Search.Documents.Models.QueryLanguage MsMy { get { throw null; } }
2783+
public static Azure.Search.Documents.Models.QueryLanguage NbNo { get { throw null; } }
2784+
public static Azure.Search.Documents.Models.QueryLanguage NlBe { get { throw null; } }
2785+
public static Azure.Search.Documents.Models.QueryLanguage NlNl { get { throw null; } }
27132786
public static Azure.Search.Documents.Models.QueryLanguage None { get { throw null; } }
2787+
public static Azure.Search.Documents.Models.QueryLanguage NoNo { get { throw null; } }
2788+
public static Azure.Search.Documents.Models.QueryLanguage PaIn { get { throw null; } }
2789+
public static Azure.Search.Documents.Models.QueryLanguage PlPl { get { throw null; } }
2790+
public static Azure.Search.Documents.Models.QueryLanguage PtBr { get { throw null; } }
2791+
public static Azure.Search.Documents.Models.QueryLanguage PtPt { get { throw null; } }
2792+
public static Azure.Search.Documents.Models.QueryLanguage RoRo { get { throw null; } }
2793+
public static Azure.Search.Documents.Models.QueryLanguage RuRu { get { throw null; } }
2794+
public static Azure.Search.Documents.Models.QueryLanguage SkSk { get { throw null; } }
2795+
public static Azure.Search.Documents.Models.QueryLanguage SlSl { get { throw null; } }
2796+
public static Azure.Search.Documents.Models.QueryLanguage SrBa { get { throw null; } }
2797+
public static Azure.Search.Documents.Models.QueryLanguage SrMe { get { throw null; } }
2798+
public static Azure.Search.Documents.Models.QueryLanguage SrRs { get { throw null; } }
2799+
public static Azure.Search.Documents.Models.QueryLanguage SvSe { get { throw null; } }
2800+
public static Azure.Search.Documents.Models.QueryLanguage TaIn { get { throw null; } }
2801+
public static Azure.Search.Documents.Models.QueryLanguage TeIn { get { throw null; } }
2802+
public static Azure.Search.Documents.Models.QueryLanguage ThTh { get { throw null; } }
2803+
public static Azure.Search.Documents.Models.QueryLanguage TrTr { get { throw null; } }
2804+
public static Azure.Search.Documents.Models.QueryLanguage UkUa { get { throw null; } }
2805+
public static Azure.Search.Documents.Models.QueryLanguage UrPk { get { throw null; } }
2806+
public static Azure.Search.Documents.Models.QueryLanguage ViVn { get { throw null; } }
2807+
public static Azure.Search.Documents.Models.QueryLanguage ZhCn { get { throw null; } }
2808+
public static Azure.Search.Documents.Models.QueryLanguage ZhTw { get { throw null; } }
27142809
public bool Equals(Azure.Search.Documents.Models.QueryLanguage other) { throw null; }
27152810
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
27162811
public override bool Equals(object obj) { throw null; }

sdk/search/Azure.Search.Documents/src/Generated/Models/PrioritizedFields.Serialization.cs

Lines changed: 98 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/search/Azure.Search.Documents/src/Generated/Models/PrioritizedFields.cs

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)