From a9cd95d2553c0d728af517e97bb37cf6b1a38a0f Mon Sep 17 00:00:00 2001 From: tg-msft Date: Mon, 8 Jun 2020 20:27:53 -0700 Subject: [PATCH] Search cross-language consistency API changes (#12615) * Search cross-language consistency API changes Fixes #11162 --- .../Azure.Search.Documents.netstandard2.0.cs | 38 +- ...n.cs => AutocompleteItem.Serialization.cs} | 6 +- ...{Autocompletion.cs => AutocompleteItem.cs} | 6 +- .../AutocompleteResults.Serialization.cs | 6 +- .../Generated/Models/AutocompleteResults.cs | 6 +- .../src/Models/Autocompletion.cs | 13 - .../src/Models/IndexDocumentsAction{T}.cs | 45 -- .../src/Models/IndexDocumentsBatch{T}.cs | 45 -- .../src/Options/IndexDocumentsOptions.cs | 2 +- .../src/Properties/AssemblyInfo.cs | 33 +- .../src/SearchClient.cs | 596 ++++++++++++++---- .../src/Utilities/AssemblyInfo.cs | 26 - .../tests/DocumentOperations/IndexingTests.cs | 73 +++ .../IndexingTests/IndexingConveniences.json | 590 +++++++++++++++++ .../IndexingConveniencesAsync.json | 590 +++++++++++++++++ 15 files changed, 1801 insertions(+), 274 deletions(-) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{Autocompletion.Serialization.cs => AutocompleteItem.Serialization.cs} (80%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{Autocompletion.cs => AutocompleteItem.cs} (83%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Models/Autocompletion.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Utilities/AssemblyInfo.cs create mode 100644 sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniences.json create mode 100644 sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniencesAsync.json 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 bac910eae60c..9ddfb6c1a8eb 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 @@ -32,16 +32,22 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.AzureKeyCredent public virtual string ServiceName { get { throw null; } } public virtual Azure.Response Autocomplete(string searchText, string suggesterName, Azure.Search.Documents.AutocompleteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AutocompleteAsync(string searchText, string suggesterName, Azure.Search.Documents.AutocompleteOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteDocuments(string keyName, System.Collections.Generic.IEnumerable keyValues, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteDocumentsAsync(string keyName, System.Collections.Generic.IEnumerable keyValues, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocument(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocumentCount(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentCountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocument(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response IndexDocuments(Azure.Search.Documents.Models.IndexDocumentsBatch documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> IndexDocumentsAsync(Azure.Search.Documents.Models.IndexDocumentsBatch documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> IndexDocumentsAsync(Azure.Search.Documents.Models.IndexDocumentsBatch documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response IndexDocuments(Azure.Search.Documents.Models.IndexDocumentsBatch documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> IndexDocumentsAsync(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response IndexDocuments(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MergeDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response MergeDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MergeOrUploadDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response MergeOrUploadDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Search(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -50,6 +56,8 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.AzureKeyCredent public virtual System.Threading.Tasks.Task>> SuggestAsync(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SuggestAsync(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Suggest(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UploadDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UploadDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SearchClientOptions : Azure.Core.ClientOptions { @@ -1841,6 +1849,12 @@ public WordDelimiterTokenFilter(string name) { } } namespace Azure.Search.Documents.Models { + public partial class AutocompleteItem + { + internal AutocompleteItem() { } + public string QueryPlusText { get { throw null; } } + public string Text { get { throw null; } } + } public enum AutocompleteMode { OneTerm = 0, @@ -1851,13 +1865,7 @@ public partial class AutocompleteResults { internal AutocompleteResults() { } public double? Coverage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } - } - public partial class Autocompletion - { - internal Autocompletion() { } - public string QueryPlusText { get { throw null; } } - public string Text { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } public partial class FacetResult : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IReadOnlyDictionary, System.Collections.IEnumerable { @@ -1881,14 +1889,10 @@ public enum IndexActionType } public static partial class IndexDocumentsAction { - public static Azure.Search.Documents.Models.IndexDocumentsAction Delete(Azure.Search.Documents.Models.SearchDocument document) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsAction Delete(string keyName, string keyValue) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsAction Delete(T document) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsAction Merge(Azure.Search.Documents.Models.SearchDocument document) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsAction MergeOrUpload(Azure.Search.Documents.Models.SearchDocument document) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsAction MergeOrUpload(T document) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsAction Merge(T document) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsAction Upload(Azure.Search.Documents.Models.SearchDocument document) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsAction Upload(T document) { throw null; } } public partial class IndexDocumentsAction @@ -1900,14 +1904,10 @@ public IndexDocumentsAction(Azure.Search.Documents.Models.IndexActionType type, public static partial class IndexDocumentsBatch { public static Azure.Search.Documents.Models.IndexDocumentsBatch Create(params Azure.Search.Documents.Models.IndexDocumentsAction[] actions) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsBatch Delete(System.Collections.Generic.IEnumerable documents) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsBatch Delete(string keyName, System.Collections.Generic.IEnumerable keyValues) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsBatch Delete(System.Collections.Generic.IEnumerable documents) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsBatch Merge(System.Collections.Generic.IEnumerable documents) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsBatch MergeOrUpload(System.Collections.Generic.IEnumerable documents) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsBatch MergeOrUpload(System.Collections.Generic.IEnumerable documents) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsBatch Merge(System.Collections.Generic.IEnumerable documents) { throw null; } - public static Azure.Search.Documents.Models.IndexDocumentsBatch Upload(System.Collections.Generic.IEnumerable documents) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsBatch Upload(System.Collections.Generic.IEnumerable documents) { throw null; } } public partial class IndexDocumentsBatch diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.Serialization.cs similarity index 80% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.Serialization.cs index 6427f9978292..73e8529f55f7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.Serialization.cs @@ -10,9 +10,9 @@ namespace Azure.Search.Documents.Models { - public partial class Autocompletion + public partial class AutocompleteItem { - internal static Autocompletion DeserializeAutocompletion(JsonElement element) + internal static AutocompleteItem DeserializeAutocompleteItem(JsonElement element) { string text = default; string queryPlusText = default; @@ -29,7 +29,7 @@ internal static Autocompletion DeserializeAutocompletion(JsonElement element) continue; } } - return new Autocompletion(text, queryPlusText); + return new AutocompleteItem(text, queryPlusText); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.cs similarity index 83% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.cs index 1dd0202eeee5..a8472f761a4a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/Autocompletion.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteItem.cs @@ -10,12 +10,12 @@ namespace Azure.Search.Documents.Models { /// The result of Autocomplete requests. - public partial class Autocompletion + public partial class AutocompleteItem { - /// Initializes a new instance of Autocompletion. + /// Initializes a new instance of AutocompleteItem. /// The completed term. /// The query along with the completed term. - internal Autocompletion(string text, string queryPlusText) + internal AutocompleteItem(string text, string queryPlusText) { if (text == null) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.Serialization.cs index d57832718947..b5ab0ab7f768 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.Serialization.cs @@ -16,7 +16,7 @@ public partial class AutocompleteResults internal static AutocompleteResults DeserializeAutocompleteResults(JsonElement element) { double? searchCoverage = default; - IReadOnlyList value = default; + IReadOnlyList value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@search.coverage")) @@ -30,7 +30,7 @@ internal static AutocompleteResults DeserializeAutocompleteResults(JsonElement e } if (property.NameEquals("value")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) @@ -39,7 +39,7 @@ internal static AutocompleteResults DeserializeAutocompleteResults(JsonElement e } else { - array.Add(Autocompletion.DeserializeAutocompletion(item)); + array.Add(AutocompleteItem.DeserializeAutocompleteItem(item)); } } value = array; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.cs index 2ebe7023380b..21530300b0a7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AutocompleteResults.cs @@ -16,7 +16,7 @@ public partial class AutocompleteResults { /// Initializes a new instance of AutocompleteResults. /// The list of returned Autocompleted items. - internal AutocompleteResults(IEnumerable results) + internal AutocompleteResults(IEnumerable results) { if (results == null) { @@ -29,7 +29,7 @@ internal AutocompleteResults(IEnumerable results) /// Initializes a new instance of AutocompleteResults. /// 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. - internal AutocompleteResults(double? coverage, IReadOnlyList results) + internal AutocompleteResults(double? coverage, IReadOnlyList results) { Coverage = coverage; Results = results; @@ -38,6 +38,6 @@ internal AutocompleteResults(double? coverage, IReadOnlyList res /// 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. public double? Coverage { get; } /// The list of returned Autocompleted items. - public IReadOnlyList Results { get; } + public IReadOnlyList Results { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/Autocompletion.cs b/sdk/search/Azure.Search.Documents/src/Models/Autocompletion.cs deleted file mode 100644 index 7b113ae181d6..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Models/Autocompletion.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - [CodeGenModel("AutocompleteItem")] - public partial class Autocompletion - { - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs index e8a76ebde74b..394e174d18f0 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs @@ -100,17 +100,6 @@ public static class IndexDocumentsAction public static IndexDocumentsAction Upload(T document) => new IndexDocumentsAction(IndexActionType.Upload, document); - /// - /// Create an to - /// upload. - /// - /// The document to upload. - /// - /// An to upload. - /// - public static IndexDocumentsAction Upload(SearchDocument document) => - new IndexDocumentsAction(IndexActionType.Upload, document); - /// /// Create an to merge. /// @@ -125,17 +114,6 @@ public static IndexDocumentsAction Upload(SearchDocument documen public static IndexDocumentsAction Merge(T document) => new IndexDocumentsAction(IndexActionType.Merge, document); - /// - /// Create an to - /// merge. - /// - /// The document to merge. - /// - /// An to merge. - /// - public static IndexDocumentsAction Merge(SearchDocument document) => - new IndexDocumentsAction(IndexActionType.Merge, document); - /// /// Create an to merge or upload. /// @@ -150,18 +128,6 @@ public static IndexDocumentsAction Merge(SearchDocument document public static IndexDocumentsAction MergeOrUpload(T document) => new IndexDocumentsAction(IndexActionType.MergeOrUpload, document); - /// - /// Create an to - /// merge or upload. - /// - /// The document to merge or upload. - /// - /// An to merge or - /// upload. - /// - public static IndexDocumentsAction MergeOrUpload(SearchDocument document) => - new IndexDocumentsAction(IndexActionType.MergeOrUpload, document); - /// /// Create an to delete. /// @@ -176,17 +142,6 @@ public static IndexDocumentsAction MergeOrUpload(SearchDocument public static IndexDocumentsAction Delete(T document) => new IndexDocumentsAction(IndexActionType.Delete, document); - /// - /// Create an to - /// delete. - /// - /// The document to delete. - /// - /// An to delete. - /// - public static IndexDocumentsAction Delete(SearchDocument document) => - new IndexDocumentsAction(IndexActionType.Delete, document); - /// /// Create an to /// delete. diff --git a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs index f17b514e49ee..c29bf59ab8d5 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs @@ -93,17 +93,6 @@ public static partial class IndexDocumentsBatch public static IndexDocumentsBatch Upload(IEnumerable documents) => new IndexDocumentsBatch(IndexActionType.Upload, documents); - /// - /// Create an to - /// upload. - /// - /// The documents to upload. - /// - /// An to upload. - /// - public static IndexDocumentsBatch Upload(IEnumerable documents) => - new IndexDocumentsBatch(IndexActionType.Upload, documents); - /// /// Create an to merge. /// @@ -118,17 +107,6 @@ public static IndexDocumentsBatch Upload(IEnumerable Merge(IEnumerable documents) => new IndexDocumentsBatch(IndexActionType.Merge, documents); - /// - /// Create an to - /// merge. - /// - /// The documents to merge. - /// - /// An to merge. - /// - public static IndexDocumentsBatch Merge(IEnumerable documents) => - new IndexDocumentsBatch(IndexActionType.Merge, documents); - /// /// Create an to merge or upload. /// @@ -143,18 +121,6 @@ public static IndexDocumentsBatch Merge(IEnumerable MergeOrUpload(IEnumerable documents) => new IndexDocumentsBatch(IndexActionType.MergeOrUpload, documents); - /// - /// Create an to - /// merge or upload. - /// - /// The documents to merge or upload. - /// - /// An to merge or - /// upload. - /// - public static IndexDocumentsBatch MergeOrUpload(IEnumerable documents) => - new IndexDocumentsBatch(IndexActionType.MergeOrUpload, documents); - /// /// Create an to delete. /// @@ -169,17 +135,6 @@ public static IndexDocumentsBatch MergeOrUpload(IEnumerable Delete(IEnumerable documents) => new IndexDocumentsBatch(IndexActionType.Delete, documents); - /// - /// Create an to - /// delete. - /// - /// The documents to delete. - /// - /// An to delete. - /// - public static IndexDocumentsBatch Delete(IEnumerable documents) => - new IndexDocumentsBatch(IndexActionType.Delete, documents); - /// ///Create an to /// delete. diff --git a/sdk/search/Azure.Search.Documents/src/Options/IndexDocumentsOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/IndexDocumentsOptions.cs index 15a54d2e404c..0a7b17cb2473 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/IndexDocumentsOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/IndexDocumentsOptions.cs @@ -6,7 +6,7 @@ namespace Azure.Search.Documents { /// - /// Options for . + /// Options for . /// public class IndexDocumentsOptions { diff --git a/sdk/search/Azure.Search.Documents/src/Properties/AssemblyInfo.cs b/sdk/search/Azure.Search.Documents/src/Properties/AssemblyInfo.cs index 46af8d70cb4f..e0ec82f8bec2 100644 --- a/sdk/search/Azure.Search.Documents/src/Properties/AssemblyInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Properties/AssemblyInfo.cs @@ -2,10 +2,31 @@ // Licensed under the MIT License. using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using Azure.Core; -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Autocompletion")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Suggester")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Tokenizer")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Skill")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Analyzer")] -[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Skillset")] +[assembly: AzureResourceProviderNamespace("Microsoft.Search")] + +[assembly: InternalsVisibleTo("Azure.Search.Documents.Tests, PublicKey=" + + "00240000048000009400000006020000002400005253413100" + + "04000001000100d15ddcb29688295338af4b7686603fe614ab" + + "d555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd6" + + "0217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d" + + "91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a" + + "69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a" + + "7bd9ae74593daa7b11b4")] +[assembly: InternalsVisibleTo( + "DynamicProxyGenAssembly2, PublicKey=" + + "00240000048000009400000006020000002400005253413100" + + "04000001000100c547cac37abd99c8db225ef2f6c8a3602f3b" + + "3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9" + + "266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191" + + "195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d1560509" + + "3924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7" + + "d3113e92484cf7045cc7")] + +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "Search service terminology", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Analyzer")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "Search service terminology", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Skill")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "Search service terminology", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Skillset")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "Search service terminology", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Suggester")] +[assembly: SuppressMessage("Usage", "AZC0012:Avoid single word type names", Justification = "Search service terminology", Scope = "type", Target = "~T:Azure.Search.Documents.Models.Tokenizer")] diff --git a/sdk/search/Azure.Search.Documents/src/SearchClient.cs b/sdk/search/Azure.Search.Documents/src/SearchClient.cs index 9a21cf9fd39c..1e0af01b4282 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClient.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; using System.Diagnostics; using System.Text.Json; using System.Threading; @@ -1371,104 +1372,6 @@ await Protocol.AutocompletePostAsync(options, cancellationToken).ConfigureAwait( #endregion Autocomplete #region IndexDocuments - /// - /// Sends a batch of upload, merge, and/or delete actions to the search - /// index. - /// - /// - /// - /// The batch of document index actions. - /// - /// - /// Options that allow specifying document indexing behavior. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing the status of operations for all actions in the - /// batch of actions. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// - /// The non-generic overloads of the Index and IndexAsync methods make - /// a best-effort attempt to map JSON types in the response payload to - /// .NET types. See - /// - /// for more information. - /// - /// - /// By default, an exception will only be thrown if the entire request - /// fails. Individual failures are described in the - /// collection. You can set - /// if you want - /// exceptions thrown on partial failure. - /// - /// - public virtual Response IndexDocuments( - IndexDocumentsBatch documents, - IndexDocumentsOptions options = null, - CancellationToken cancellationToken = default) => - IndexDocumentsInternal( - documents, - options, - async: false, - cancellationToken) - .EnsureCompleted(); - - /// - /// Sends a batch of upload, merge, and/or delete actions to the search - /// index. - /// - /// - /// - /// The batch of document index actions. - /// - /// - /// Options that allow specifying document indexing behavior. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing the status of operations for all actions in the - /// batch of actions. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// - /// The non-generic overloads of the Index and IndexAsync methods make - /// a best-effort attempt to map JSON types in the response payload to - /// .NET types. See - /// - /// for more information. - /// - /// - /// By default, an exception will only be thrown if the entire request - /// fails. Individual failures are described in the - /// collection. You can set - /// if you want - /// exceptions thrown on partial failure. - /// - /// - public async virtual Task> IndexDocumentsAsync( - IndexDocumentsBatch documents, - IndexDocumentsOptions options = null, - CancellationToken cancellationToken = default) => - await IndexDocumentsInternal( - documents, - options, - async: true, - cancellationToken) - .ConfigureAwait(false); - /// /// Sends a batch of upload, merge, and/or delete actions to the search /// index. @@ -1478,7 +1381,7 @@ await IndexDocumentsInternal( /// The .NET type that maps to the index schema. Instances of this type /// can be retrieved as documents from the index. /// - /// + /// /// The batch of document index actions. /// /// @@ -1512,11 +1415,11 @@ await IndexDocumentsInternal( /// /// public virtual Response IndexDocuments( - IndexDocumentsBatch documents, + IndexDocumentsBatch batch, IndexDocumentsOptions options = null, CancellationToken cancellationToken = default) => IndexDocumentsInternal( - documents, + batch, options, async: false, cancellationToken) @@ -1531,7 +1434,7 @@ public virtual Response IndexDocuments( /// The .NET type that maps to the index schema. Instances of this type /// can be retrieved as documents from the index. /// - /// + /// /// The batch of document index actions. /// /// @@ -1565,23 +1468,23 @@ public virtual Response IndexDocuments( /// /// public async virtual Task> IndexDocumentsAsync( - IndexDocumentsBatch documents, + IndexDocumentsBatch batch, IndexDocumentsOptions options = null, CancellationToken cancellationToken = default) => await IndexDocumentsInternal( - documents, + batch, options, async: true, cancellationToken) .ConfigureAwait(false); private async Task> IndexDocumentsInternal( - IndexDocumentsBatch documents, + IndexDocumentsBatch batch, IndexDocumentsOptions options, bool async, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(documents, nameof(documents)); + Argument.AssertNotNull(batch, nameof(batch)); using DiagnosticScope scope = ClientDiagnostics.CreateScope($"{nameof(SearchClient)}.{nameof(IndexDocuments)}"); scope.Start(); @@ -1603,7 +1506,7 @@ private async Task> IndexDocumentsInternal( request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(documents); + content.JsonWriter.WriteObjectValue(batch); request.Content = content; } @@ -1663,5 +1566,484 @@ await ClientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).Conf } } #endregion IndexDocuments + + #region Index Documents Conveniences + /// + /// Upload documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the UploadDocuments and UploadDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual Response UploadDocuments( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + IndexDocuments( + IndexDocumentsBatch.Upload(documents), + options, + cancellationToken); + + /// + /// Upload documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the UploadDocuments and UploadDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual async Task> UploadDocumentsAsync( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + await IndexDocumentsAsync( + IndexDocumentsBatch.Upload(documents), + options, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Merge documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the MergeDocuments and MergeDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual Response MergeDocuments( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + IndexDocuments( + IndexDocumentsBatch.Merge(documents), + options, + cancellationToken); + + /// + /// Merge documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the MergeDocuments and MergeDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual async Task> MergeDocumentsAsync( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + await IndexDocumentsAsync( + IndexDocumentsBatch.Merge(documents), + options, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Merge or upload documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the MergeOrUploadDocuments and + /// MergeOrUploadDocumentsAsync methods support mapping of search field + /// types to .NET types via the type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual Response MergeOrUploadDocuments( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + IndexDocuments( + IndexDocumentsBatch.MergeOrUpload(documents), + options, + cancellationToken); + + /// + /// Merge or upload documents to the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the MergeOrUploadDocuments and + /// MergeOrUploadDocumentsAsync methods support mapping of search field + /// types to .NET types via the type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual async Task> MergeOrUploadDocumentsAsync( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + await IndexDocumentsAsync( + IndexDocumentsBatch.MergeOrUpload(documents), + options, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Delete documents from the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the DeleteDocuments and DeleteDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual Response DeleteDocuments( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + IndexDocuments( + IndexDocumentsBatch.Delete(documents), + options, + cancellationToken); + + /// + /// Delete documents from the index as a batch. + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// The documents to upload. + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// The generic overloads of the DeleteDocuments and DeleteDocumentsAsync + /// methods support mapping of search field types to .NET types via the + /// type parameter T. See + /// + /// for more details on the type mapping. + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual async Task> DeleteDocumentsAsync( + IEnumerable documents, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + await IndexDocumentsAsync( + IndexDocumentsBatch.Delete(documents), + options, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Delete documents from the index as a batch given only their keys. + /// + /// + /// The name of the key field that uniquely identifies documents in + /// the index. + /// + /// + /// The keys of the documents to delete. + /// + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual Response DeleteDocuments( + string keyName, + IEnumerable keyValues, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + IndexDocuments( + IndexDocumentsBatch.Delete(keyName, keyValues), + options, + cancellationToken); + + /// + /// Delete documents from the index as a batch given only their keys. + /// + /// + /// The name of the key field that uniquely identifies documents in + /// the index. + /// + /// + /// The keys of the documents to delete. + /// + /// + /// Options that allow specifying document indexing behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the status of operations for all actions in the + /// batch of actions. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// By default, an exception will only be thrown if the entire request + /// fails. Individual failures are described in the + /// collection. You can set + /// if you want + /// exceptions thrown on partial failure. + /// + /// + [ForwardsClientCalls] + public virtual async Task> DeleteDocumentsAsync( + string keyName, + IEnumerable keyValues, + IndexDocumentsOptions options = null, + CancellationToken cancellationToken = default) => + await IndexDocumentsAsync( + IndexDocumentsBatch.Delete(keyName, keyValues), + options, + cancellationToken) + .ConfigureAwait(false); + #endregion Index Documents Conveniences } } diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/AssemblyInfo.cs b/sdk/search/Azure.Search.Documents/src/Utilities/AssemblyInfo.cs deleted file mode 100644 index 388d2c90f97d..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Utilities/AssemblyInfo.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Runtime.CompilerServices; -using Azure.Core; - -[assembly: AzureResourceProviderNamespace("Microsoft.Search")] - -[assembly: InternalsVisibleTo("Azure.Search.Documents.Tests, PublicKey=" + - "00240000048000009400000006020000002400005253413100" + - "04000001000100d15ddcb29688295338af4b7686603fe614ab" + - "d555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd6" + - "0217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d" + - "91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a" + - "69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a" + - "7bd9ae74593daa7b11b4")] -[assembly: InternalsVisibleTo( - "DynamicProxyGenAssembly2, PublicKey=" + - "00240000048000009400000006020000002400005253413100" + - "04000001000100c547cac37abd99c8db225ef2f6c8a3602f3b" + - "3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9" + - "266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191" + - "195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d1560509" + - "3924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7" + - "d3113e92484cf7045cc7")] diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs index 3044ab852cc5..3eb63387d0f9 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs @@ -53,6 +53,79 @@ private static void AssertActionSucceeded( } #endregion Utilities + [Test] + public async Task IndexingConveniences() + { + await using SearchResources resources = await SearchResources.CreateWithEmptyHotelsIndexAsync(this); + SearchClient client = resources.GetSearchClient(); + + // Upload + var doc1 = new SearchDocument + { + ["hotelId"] = "1", + ["hotelName"] = "Highway Hole in the Wall" + }; + var doc2 = new SearchDocument + { + ["hotelId"] = "2", + ["hotelName"] = "Freeway Flophouse" + }; + Response response = await client.UploadDocumentsAsync(new[] { doc1, doc2 }); + Assert.AreEqual(2, response.Value.Results.Count); + AssertActionSucceeded("1", response.Value.Results[0], 201); + AssertActionSucceeded("2", response.Value.Results[1], 201); + await resources.WaitForIndexingAsync(); + long count = await client.GetDocumentCountAsync(); + Assert.AreEqual(2L, count); + + // Merge + response = await client.MergeDocumentsAsync( + new[] + { + new SearchDocument { ["hotelId"] = "1", ["hotelName"] = "Highway Haven" } + }); + Assert.AreEqual(1, response.Value.Results.Count); + AssertActionSucceeded("1", response.Value.Results[0], 200); + await resources.WaitForIndexingAsync(); + count = await client.GetDocumentCountAsync(); + Assert.AreEqual(2L, count); + SearchDocument merged = await client.GetDocumentAsync("1"); + Assert.AreNotEqual(doc1["hotelName"], merged["hotelName"]); + + // Upload or Merge + response = await client.MergeOrUploadDocumentsAsync( + new[] + { + new SearchDocument { ["hotelId"] = "2", ["hotelName"] = "Freeway Freedom" }, + new SearchDocument { ["hotelId"] = "3", ["hotelName"] = "Basically a gas station bathroom, but with beds" }, + }); + Assert.AreEqual(2, response.Value.Results.Count); + AssertActionSucceeded("2", response.Value.Results[0], 200); + AssertActionSucceeded("3", response.Value.Results[1], 201); + await resources.WaitForIndexingAsync(); + count = await client.GetDocumentCountAsync(); + Assert.AreEqual(3L, count); + merged = await client.GetDocumentAsync("2"); + Assert.AreNotEqual(doc2["hotelName"], merged["hotelName"]); + + // Delete by document + response = await client.DeleteDocumentsAsync(new[] { doc1, doc2 }); + Assert.AreEqual(2, response.Value.Results.Count); + AssertActionSucceeded("1", response.Value.Results[0], 200); + AssertActionSucceeded("2", response.Value.Results[1], 200); + await resources.WaitForIndexingAsync(); + count = await client.GetDocumentCountAsync(); + Assert.AreEqual(1L, count); + + // Delete by key + response = await client.DeleteDocumentsAsync("hotelId", new[] { "3" }); + Assert.AreEqual(1, response.Value.Results.Count); + AssertActionSucceeded("3", response.Value.Results[0], 200); + await resources.WaitForIndexingAsync(); + count = await client.GetDocumentCountAsync(); + Assert.AreEqual(0L, count); + } + [Test] public async Task DynamicDocuments() { diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniences.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniences.json new file mode 100644 index 000000000000..2296593ad931 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniences.json @@ -0,0 +1,590 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "166", + "Content-Type": "application/json", + "traceparent": "00-13f089ecfbe5d94f83733b20f0a203b3-2518e81299f07b4e-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "009d12dad910189c0237a18060ad961c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "hotelId": "1", + "hotelName": "Highway Hole in the Wall" + }, + { + "@search.action": "upload", + "hotelId": "2", + "hotelName": "Freeway Flophouse" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "009d12da-d910-189c-0237-a18060ad961c", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:45 GMT", + "elapsed-time": "109", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "009d12da-d910-189c-0237-a18060ad961c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "009d12da-d910-189c-0237-a18060ad961c" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-a22cabd8aa19cb4caa5fa355737ca7ba-e2cb165361c03d4a-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "b7137130e6fc20418415e7ddcf9f0ff2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "b7137130-e6fc-2041-8415-e7ddcf9f0ff2", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:07:47 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "b7137130-e6fc-2041-8415-e7ddcf9f0ff2", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b7137130-e6fc-2041-8415-e7ddcf9f0ff2" + }, + "ResponseBody": "\uFEFF2" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "80", + "Content-Type": "application/json", + "traceparent": "00-dac60ed60a821044829bc08de9c9417c-705a4340fdddfa40-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "1bee5a52db9b4146ea0659759d78907f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "merge", + "hotelId": "1", + "hotelName": "Highway Haven" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "1bee5a52-db9b-4146-ea06-59759d78907f", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:47 GMT", + "elapsed-time": "53", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "1bee5a52-db9b-4146-ea06-59759d78907f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "1bee5a52-db9b-4146-ea06-59759d78907f" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-7845c48e295ed443abb8273ce87ffdf3-8e928a3ca66c7846-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "465eb5c61dfef46cd07d7bfbf2be4962", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "465eb5c6-1dfe-f46c-d07d-7bfbf2be4962", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:07:49 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "465eb5c6-1dfe-f46c-d07d-7bfbf2be4962", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "465eb5c6-1dfe-f46c-d07d-7bfbf2be4962" + }, + "ResponseBody": "\uFEFF2" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-b52e13c15a279946b13f57e0550f6974-138daf5a0c8ad349-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "052eaf277abe54812bd2cdf58dcc820c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "052eaf27-7abe-5481-2bd2-cdf58dcc820c", + "Content-Length": "236", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:49 GMT", + "elapsed-time": "7", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "052eaf27-7abe-5481-2bd2-cdf58dcc820c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "052eaf27-7abe-5481-2bd2-cdf58dcc820c" + }, + "ResponseBody": { + "hotelId": "1", + "hotelName": "Highway Haven", + "description": null, + "descriptionFr": null, + "category": null, + "tags": [], + "parkingIncluded": null, + "smokingAllowed": null, + "lastRenovationDate": null, + "rating": null, + "location": null, + "address": null, + "rooms": [] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "201", + "Content-Type": "application/json", + "traceparent": "00-10c6e7ba48c716489d34bf8aaf81b342-5ab4c74fbb273c48-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "19166785c94135f3edfa4b1d5f4a4e2b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "mergeOrUpload", + "hotelId": "2", + "hotelName": "Freeway Freedom" + }, + { + "@search.action": "mergeOrUpload", + "hotelId": "3", + "hotelName": "Basically a gas station bathroom, but with beds" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "19166785-c941-35f3-edfa-4b1d5f4a4e2b", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:49 GMT", + "elapsed-time": "47", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "19166785-c941-35f3-edfa-4b1d5f4a4e2b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "19166785-c941-35f3-edfa-4b1d5f4a4e2b" + }, + "ResponseBody": { + "value": [ + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "3", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-4e7f7b97b863304a93941b349b420b4c-4afb502a0ef6eb43-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "ee4df6bd8a4a4cc133091a2c4f766703", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "ee4df6bd-8a4a-4cc1-3309-1a2c4f766703", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:07:51 GMT", + "elapsed-time": "5", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "ee4df6bd-8a4a-4cc1-3309-1a2c4f766703", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ee4df6bd-8a4a-4cc1-3309-1a2c4f766703" + }, + "ResponseBody": "\uFEFF3" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-a4e0f895051b294eb2c89fd1f5a2cd44-0c54468dffc77a42-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "8a766ffa2fa75e21bcf917c32f63f5e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "8a766ffa-2fa7-5e21-bcf9-17c32f63f5e0", + "Content-Length": "238", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:51 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "8a766ffa-2fa7-5e21-bcf9-17c32f63f5e0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "8a766ffa-2fa7-5e21-bcf9-17c32f63f5e0" + }, + "ResponseBody": { + "hotelId": "2", + "hotelName": "Freeway Freedom", + "description": null, + "descriptionFr": null, + "category": null, + "tags": [], + "parkingIncluded": null, + "smokingAllowed": null, + "lastRenovationDate": null, + "rating": null, + "location": null, + "address": null, + "rooms": [] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "166", + "Content-Type": "application/json", + "traceparent": "00-a063d518bf2ce0428555f9a6e0578304-7152c6e7a69c4740-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "9638a183937ffac1a6cae537aec6e576", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "delete", + "hotelId": "1", + "hotelName": "Highway Hole in the Wall" + }, + { + "@search.action": "delete", + "hotelId": "2", + "hotelName": "Freeway Flophouse" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "9638a183-937f-fac1-a6ca-e537aec6e576", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:51 GMT", + "elapsed-time": "40", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "9638a183-937f-fac1-a6ca-e537aec6e576", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "9638a183-937f-fac1-a6ca-e537aec6e576" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-403eb2a44cfec948a7b278939eed5118-acebac1fda023147-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "ef234793c4d48d83d4ef315072fd1dd0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "ef234793-c4d4-8d83-d4ef-315072fd1dd0", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:07:53 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "ef234793-c4d4-8d83-d4ef-315072fd1dd0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ef234793-c4d4-8d83-d4ef-315072fd1dd0" + }, + "ResponseBody": "\uFEFF1" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "53", + "Content-Type": "application/json", + "traceparent": "00-b9741a4d8f9fcc488ed7564449a0e882-6aba1d6a9a278048-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "aea83914d03e6784ad7be3dd4aeaaff5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "delete", + "hotelId": "3" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "aea83914-d03e-6784-ad7b-e3dd4aeaaff5", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:07:53 GMT", + "elapsed-time": "49", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "aea83914-d03e-6784-ad7b-e3dd4aeaaff5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "aea83914-d03e-6784-ad7b-e3dd4aeaaff5" + }, + "ResponseBody": { + "value": [ + { + "key": "3", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-64b78fa2272bad4483ff3ff5a22dbb41-f672b5bc40033744-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "e730a0140540be0c1daac190627087a8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "e730a014-0540-be0c-1daa-c190627087a8", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:07:55 GMT", + "elapsed-time": "5", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "e730a014-0540-be0c-1daa-c190627087a8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "e730a014-0540-be0c-1daa-c190627087a8" + }, + "ResponseBody": "\uFEFF0" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hruwhqjq\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-738c1c5adb716f43bbdef28fede4a1df-68b49447d89c9145-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "742215ac371dc238c2bc4158e0a643ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "742215ac-371d-c238-c2bc-4158e0a643ea", + "Date": "Mon, 08 Jun 2020 21:07:55 GMT", + "elapsed-time": "522", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "742215ac-371d-c238-c2bc-4158e0a643ea", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "742215ac-371d-c238-c2bc-4158e0a643ea" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1408488917", + "SearchIndexName": "hruwhqjq", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-teglaza" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniencesAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniencesAsync.json new file mode 100644 index 000000000000..f9d56b3f72e3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/IndexingConveniencesAsync.json @@ -0,0 +1,590 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "166", + "Content-Type": "application/json", + "traceparent": "00-0802a51ccef6844884b1ee4517deac98-2231d2c2f12ecb44-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "95314f6586aa72c223e7185af5cf0e4b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "hotelId": "1", + "hotelName": "Highway Hole in the Wall" + }, + { + "@search.action": "upload", + "hotelId": "2", + "hotelName": "Freeway Flophouse" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "95314f65-86aa-72c2-23e7-185af5cf0e4b", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:03 GMT", + "elapsed-time": "171", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "95314f65-86aa-72c2-23e7-185af5cf0e4b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "95314f65-86aa-72c2-23e7-185af5cf0e4b" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-2d2653165f8f6544b352b4887933a3f5-c74c08ab5c5e7541-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "071523340e28b1469ff6106af56e0a8a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "07152334-0e28-b146-9ff6-106af56e0a8a", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:08:05 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "07152334-0e28-b146-9ff6-106af56e0a8a", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "07152334-0e28-b146-9ff6-106af56e0a8a" + }, + "ResponseBody": "\uFEFF2" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "80", + "Content-Type": "application/json", + "traceparent": "00-b36c8f6610747749949ecc51c79dcd62-247dd6700b3d434a-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "81b32f2fb54b17a59ae6bb24bcaeecff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "merge", + "hotelId": "1", + "hotelName": "Highway Haven" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "81b32f2f-b54b-17a5-9ae6-bb24bcaeecff", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:05 GMT", + "elapsed-time": "52", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "81b32f2f-b54b-17a5-9ae6-bb24bcaeecff", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "81b32f2f-b54b-17a5-9ae6-bb24bcaeecff" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-f09026e68ceace4faa2a44d323880e37-b0a71bf8ef50f54d-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "0cb00dcf04f9578a0880f6b475577db4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "0cb00dcf-04f9-578a-0880-f6b475577db4", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:08:07 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "0cb00dcf-04f9-578a-0880-f6b475577db4", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "0cb00dcf-04f9-578a-0880-f6b475577db4" + }, + "ResponseBody": "\uFEFF2" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-275bf20b3859504389d386247992cc57-d8c58380186b8647-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "c62b8edc8d1c7f007efe6d415222f5f0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "c62b8edc-8d1c-7f00-7efe-6d415222f5f0", + "Content-Length": "236", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:07 GMT", + "elapsed-time": "6", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "c62b8edc-8d1c-7f00-7efe-6d415222f5f0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "c62b8edc-8d1c-7f00-7efe-6d415222f5f0" + }, + "ResponseBody": { + "hotelId": "1", + "hotelName": "Highway Haven", + "description": null, + "descriptionFr": null, + "category": null, + "tags": [], + "parkingIncluded": null, + "smokingAllowed": null, + "lastRenovationDate": null, + "rating": null, + "location": null, + "address": null, + "rooms": [] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "201", + "Content-Type": "application/json", + "traceparent": "00-5d39aa859b4c944994782477de4ccd71-62e4ae0d78fb3d48-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "e79b1009fdbe2a91a55c78cabff0a142", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "mergeOrUpload", + "hotelId": "2", + "hotelName": "Freeway Freedom" + }, + { + "@search.action": "mergeOrUpload", + "hotelId": "3", + "hotelName": "Basically a gas station bathroom, but with beds" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "e79b1009-fdbe-2a91-a55c-78cabff0a142", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:07 GMT", + "elapsed-time": "52", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "e79b1009-fdbe-2a91-a55c-78cabff0a142", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "e79b1009-fdbe-2a91-a55c-78cabff0a142" + }, + "ResponseBody": { + "value": [ + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "3", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-7d0497120a6d6b41a70695ea03a74792-496c3bf74881594c-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "2d470768268341e30c318efb964804e6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "2d470768-2683-41e3-0c31-8efb964804e6", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:08:10 GMT", + "elapsed-time": "5", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "2d470768-2683-41e3-0c31-8efb964804e6", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2d470768-2683-41e3-0c31-8efb964804e6" + }, + "ResponseBody": "\uFEFF3" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-a3d6d979b2120047ac730fca2596eb20-33b96cf4058e2c48-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "65ab068b96bbdff6fd0020c01435c08d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "65ab068b-96bb-dff6-fd00-20c01435c08d", + "Content-Length": "238", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:10 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "65ab068b-96bb-dff6-fd00-20c01435c08d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "65ab068b-96bb-dff6-fd00-20c01435c08d" + }, + "ResponseBody": { + "hotelId": "2", + "hotelName": "Freeway Freedom", + "description": null, + "descriptionFr": null, + "category": null, + "tags": [], + "parkingIncluded": null, + "smokingAllowed": null, + "lastRenovationDate": null, + "rating": null, + "location": null, + "address": null, + "rooms": [] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "166", + "Content-Type": "application/json", + "traceparent": "00-50c8f2d4c1be934facf3a620fefe93a4-d16f662ad9a8484a-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "4bd92b5cc7dae26c2d59da8c6e96945c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "delete", + "hotelId": "1", + "hotelName": "Highway Hole in the Wall" + }, + { + "@search.action": "delete", + "hotelId": "2", + "hotelName": "Freeway Flophouse" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "4bd92b5c-c7da-e26c-2d59-da8c6e96945c", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:10 GMT", + "elapsed-time": "47", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "4bd92b5c-c7da-e26c-2d59-da8c6e96945c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "4bd92b5c-c7da-e26c-2d59-da8c6e96945c" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-4ef3b306b2fa504da13052f4e86b8ca0-0c03cd5c27cf134c-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "b83f92583c45d2861068308305222dd6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "b83f9258-3c45-d286-1068-308305222dd6", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:08:12 GMT", + "elapsed-time": "5", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "b83f9258-3c45-d286-1068-308305222dd6", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b83f9258-3c45-d286-1068-308305222dd6" + }, + "ResponseBody": "\uFEFF1" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "53", + "Content-Type": "application/json", + "traceparent": "00-ccd152af9659e44a92f497b178b1067b-a4ff8368395ee340-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "6b9e0170b86fc30b99c83862bb697066", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "delete", + "hotelId": "3" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "6b9e0170-b86f-c30b-99c8-3862bb697066", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 21:08:12 GMT", + "elapsed-time": "46", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "6b9e0170-b86f-c30b-99c8-3862bb697066", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "6b9e0170-b86f-c30b-99c8-3862bb697066" + }, + "ResponseBody": { + "value": [ + { + "key": "3", + "status": true, + "errorMessage": null, + "statusCode": 200 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-cf476a5a7be49748b078e85379fa2842-56ce80fc7817aa45-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "8168c46b07f61f47a4063a7296e9dd0a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "8168c46b-07f6-1f47-a406-3a7296e9dd0a", + "Content-Length": "4", + "Content-Type": "text/plain", + "Date": "Mon, 08 Jun 2020 21:08:14 GMT", + "elapsed-time": "4", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "8168c46b-07f6-1f47-a406-3a7296e9dd0a", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "8168c46b-07f6-1f47-a406-3a7296e9dd0a" + }, + "ResponseBody": "\uFEFF0" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027xgmqwbvp\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-d65b05f29cf3624192d4eb37abc77330-261d431dabc49144-00", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "6d1b042c28f79fed877b1f7d032417a7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "6d1b042c-28f7-9fed-877b-1f7d032417a7", + "Date": "Mon, 08 Jun 2020 21:08:14 GMT", + "elapsed-time": "597", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "6d1b042c-28f7-9fed-877b-1f7d032417a7", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "6d1b042c-28f7-9fed-877b-1f7d032417a7" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1452263316", + "SearchIndexName": "xgmqwbvp", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-teglaza" + } +} \ No newline at end of file