diff --git a/sdk/core/Azure.Core.Experimental/src/Spatial/PointGeometry.cs b/sdk/core/Azure.Core.Experimental/src/Spatial/PointGeometry.cs index fcf762096d33..38d9ea6de433 100644 --- a/sdk/core/Azure.Core.Experimental/src/Spatial/PointGeometry.cs +++ b/sdk/core/Azure.Core.Experimental/src/Spatial/PointGeometry.cs @@ -31,4 +31,4 @@ public PointGeometry(GeometryPosition position, GeometryProperties properties): /// public GeometryPosition Position { get; } } -} \ No newline at end of file +} diff --git a/sdk/search/Azure.Search.Documents.sln b/sdk/search/Azure.Search.Documents.sln index bfd4dff3446a..c1875fdb16a9 100644 --- a/sdk/search/Azure.Search.Documents.sln +++ b/sdk/search/Azure.Search.Documents.sln @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core", "..\core\Azure EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{06C87DE1-98A8-418E-AF01-FEFF9CFFA788}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.Experimental", "..\core\Azure.Core.Experimental\src\Azure.Core.Experimental.csproj", "{32F92309-FF56-4E48-81FF-ADC7318F6DA5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,6 +35,10 @@ Global {06C87DE1-98A8-418E-AF01-FEFF9CFFA788}.Debug|Any CPU.Build.0 = Debug|Any CPU {06C87DE1-98A8-418E-AF01-FEFF9CFFA788}.Release|Any CPU.ActiveCfg = Release|Any CPU {06C87DE1-98A8-418E-AF01-FEFF9CFFA788}.Release|Any CPU.Build.0 = Release|Any CPU + {32F92309-FF56-4E48-81FF-ADC7318F6DA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {32F92309-FF56-4E48-81FF-ADC7318F6DA5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {32F92309-FF56-4E48-81FF-ADC7318F6DA5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {32F92309-FF56-4E48-81FF-ADC7318F6DA5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 1799d2bb3d5c..41d179b6cfa4 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,9 +1,10 @@ # Release History -## 1.0.0-preview.4 (2020-05-09) +## 1.0.0-preview.4 (2020-06-09) ### Added +- Referencing `Azure.Core.Experimental` which brings new spatial types and custom serializers. - Added `SearchClientBuilderExtensions` to integrate with ASP.NET Core. - Added `SearchModelFactory` to mock output model types. @@ -21,6 +22,8 @@ - Renamed methods on `SearchIndexerClient` matching "\*DataSource" to "\*DataSourceConnection". - Split `SearchServiceClient` into `SearchIndexClient` for managing indexes, and `SearchIndexerClient` for managing indexers, both of which are now in `Azure.Search.Documents.Indexes`. - `SearchClient.IndexDocuments` now throws an `AggregateException` wrapping all the `RequestFailedException`s in the batch. +- Removed `dynamic` support from `SearchDocument` for the time being. + ## 1.0.0-preview.3 (2020-05-05) diff --git a/sdk/search/Azure.Search.Documents/Directory.Build.props b/sdk/search/Azure.Search.Documents/Directory.Build.props index 1a9611bd4924..3c45ca47af75 100644 --- a/sdk/search/Azure.Search.Documents/Directory.Build.props +++ b/sdk/search/Azure.Search.Documents/Directory.Build.props @@ -1,4 +1,38 @@  + + + + + true + + + + $(UseAzureCoreExperimental) + EXPERIMENTAL_SPATIAL;$(DefineConstants) + + + $(UseAzureCoreExperimental) + EXPERIMENTAL_SERIALIZER;$(DefineConstants) + + + false + EXPERIMENTAL_DYNAMIC;$(DefineConstants) + + + true + $(UseProjectReferenceToAzureClients) + + + + + + + + diff --git a/sdk/search/Azure.Search.Documents/README.md b/sdk/search/Azure.Search.Documents/README.md index a6e0116cb914..3b198b96b3cf 100644 --- a/sdk/search/Azure.Search.Documents/README.md +++ b/sdk/search/Azure.Search.Documents/README.md @@ -41,7 +41,7 @@ Use the **Azure.Search.Documents client library** to: Install the Azure Cognitive Search client library for .NET with [NuGet][nuget]: ```Powershell -dotnet add package Azure.Search.Documents --version 1.0.0-preview.3 +dotnet add package Azure.Search.Documents --version 1.0.0-preview.4 ``` ### Prerequisites @@ -112,7 +112,7 @@ AzureKeyCredential credential = new AzureKeyCredential(apiKey); SearchClient client = new SearchClient(serviceEndpoint, indexName, credential); // Let's get the top 5 jobs related to Microsoft -SearchResults response = client.Search("Microsoft", new SearchOptions { Size = 5 }); +SearchResults response = client.Search("Microsoft", new SearchOptions { Size = 5 }); foreach (SearchResult result in response.GetResults()) { // Print out the title and job description (we'll see below how to @@ -190,7 +190,7 @@ AzureKeyCredential credential = new AzureKeyCredential(key); SearchClient client = new SearchClient(endpoint, indexName, credential); ``` -There are three ways to interact with the data returned from a search query. +There are two ways to interact with the data returned from a search query. Let's explore them with a search for a "luxury" hotel. #### Use `SearchDocument` like a dictionary @@ -199,7 +199,7 @@ Let's explore them with a search for a "luxury" hotel. provide your own. Here we perform the search, enumerate over the results, and extract data using `SearchDocument`'s dictionary indexer. ```C# Snippet:Azure_Search_Tests_Samples_Readme_Dict -SearchResults response = client.Search("luxury"); +SearchResults response = client.Search("luxury"); foreach (SearchResult result in response.GetResults()) { SearchDocument doc = result.Document; @@ -209,21 +209,6 @@ foreach (SearchResult result in response.GetResults()) } ``` -#### Use `SearchDocument` with [C#'s `dynamic` keyword](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/using-type-dynamic) - -This starts out the same, but the use of `dynamic` makes the code a little -easier to read. -```C# Snippet:Azure_Search_Tests_Samples_Readme_Dynamic -SearchResults response = client.Search("luxury"); -foreach (SearchResult result in response.GetResults()) -{ - dynamic doc = result.Document; - string id = doc.hotelId; - string name = doc.hotelName; - Console.WriteLine("{id}: {name}"); -} -``` - #### Use C# types We can also decorate our own types with [attributes from `System.Text.Json`](https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-how-to) 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 96826ecf2fdf..c57f6963b5ff 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 @@ -36,8 +36,6 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.AzureKeyCredent 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; } @@ -48,12 +46,8 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.AzureKeyCredent 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; } 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 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>> 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; } @@ -62,6 +56,7 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.AzureKeyCredent public partial class SearchClientOptions : Azure.Core.ClientOptions { public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2019_05_06_Preview) { } + public Azure.Core.ObjectSerializer Serializer { get { throw null; } set { } } public Azure.Search.Documents.SearchClientOptions.ServiceVersion Version { get { throw null; } } public enum ServiceVersion { @@ -1946,7 +1941,7 @@ public RangeFacetResult(long count, T? from, T? to) { } public T? From { get { throw null; } } public T? To { get { throw null; } } } - public partial class SearchDocument : System.Dynamic.DynamicObject, System.Collections.Generic.ICollection>, System.Collections.Generic.IDictionary, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + public partial class SearchDocument : System.Collections.Generic.ICollection>, System.Collections.Generic.IDictionary, System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable { public SearchDocument() { } public SearchDocument(System.Collections.Generic.IDictionary values) { } @@ -1954,11 +1949,27 @@ public SearchDocument(System.Collections.Generic.IDictionary val public object this[string key] { get { throw null; } set { } } public System.Collections.Generic.ICollection Keys { get { throw null; } } bool System.Collections.Generic.ICollection>.IsReadOnly { get { throw null; } } - public System.Collections.Generic.ICollection Values { get { throw null; } } + System.Collections.Generic.ICollection System.Collections.Generic.IDictionary.Values { get { throw null; } } public void Add(string key, object value) { } public void Clear() { } public bool ContainsKey(string key) { throw null; } + public bool? GetBoolean(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetBooleanCollection(string key) { throw null; } + public System.DateTimeOffset? GetDateTimeOffset(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetDateTimeOffsetCollection(string key) { throw null; } + public double? GetDouble(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetDoubleCollection(string key) { throw null; } public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + public int? GetInt32(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetInt32Collection(string key) { throw null; } + public long? GetInt64(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetInt64Collection(string key) { throw null; } + public Azure.Search.Documents.Models.SearchDocument GetObject(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetObjectCollection(string key) { throw null; } + public Azure.Core.Spatial.PointGeometry GetPoint(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetPointCollection(string key) { throw null; } + public string GetString(string key) { throw null; } + public System.Collections.Generic.IReadOnlyList GetStringCollection(string key) { throw null; } public bool Remove(string key) { throw null; } void System.Collections.Generic.ICollection>.Add(System.Collections.Generic.KeyValuePair item) { } bool System.Collections.Generic.ICollection>.Contains(System.Collections.Generic.KeyValuePair item) { throw null; } @@ -1966,9 +1977,7 @@ public void Clear() { } bool System.Collections.Generic.ICollection>.Remove(System.Collections.Generic.KeyValuePair item) { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } public override string ToString() { throw null; } - public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out object result) { throw null; } public bool TryGetValue(string key, out object value) { throw null; } - public override bool TrySetMember(System.Dynamic.SetMemberBinder binder, object value) { throw null; } } public enum SearchMode { @@ -1978,8 +1987,8 @@ public enum SearchMode public static partial class SearchModelFactory { public static Azure.Search.Documents.Indexes.Models.AnalyzedTokenInfo AnalyzedTokenInfo(string token, int startOffset, int endOffset, int position) { throw null; } + public static Azure.Search.Documents.Models.AutocompleteItem AutocompleteItem(string text, string queryPlusText) { throw null; } public static Azure.Search.Documents.Models.AutocompleteResults AutocompleteResults(double? coverage, System.Collections.Generic.IReadOnlyList results) { throw null; } - public static Azure.Search.Documents.Models.AutocompleteItem Autocompletion(string text, string queryPlusText) { throw null; } public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count, System.Collections.Generic.IReadOnlyDictionary additionalProperties) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable results) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList errors, System.Collections.Generic.IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.cs index 6ee47e9acb8d..eeac132b27ec 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.cs @@ -20,6 +20,9 @@ public class SearchIndexClient private readonly HttpPipeline _pipeline; private readonly ClientDiagnostics _clientDiagnostics; private readonly SearchClientOptions.ServiceVersion _version; +#if EXPERIMENTAL_SERIALIZER + private readonly ObjectSerializer _serializer; +#endif private ServiceRestClient _serviceClient; private IndexesRestClient _indexesClient; @@ -70,6 +73,9 @@ public SearchIndexClient( options ??= new SearchClientOptions(); Endpoint = endpoint; +#if EXPERIMENTAL_SERIALIZER + _serializer = options.Serializer; +#endif _clientDiagnostics = new ClientDiagnostics(options); _pipeline = options.Build(credential); _version = options.Version; @@ -137,6 +143,9 @@ public virtual SearchClient GetSearchClient(string indexName) return new SearchClient( Endpoint, indexName, +#if EXPERIMENTAL_SERIALIZER + _serializer, +#endif _pipeline, _clientDiagnostics, _version); 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 394e174d18f0..e2e9e564a12e 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsAction{T}.cs @@ -3,7 +3,10 @@ using System; using System.Diagnostics; +using System.IO; using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; #pragma warning disable SA1402 // File may only contain a single type @@ -21,7 +24,7 @@ internal partial class IndexAction { } /// The .NET type that maps to the index schema. Instances of this type can /// be retrieved as documents from the index. /// - public class IndexDocumentsAction : IUtf8JsonSerializable + public class IndexDocumentsAction { /// /// The operation to perform on a document in an indexing batch. @@ -53,22 +56,65 @@ public IndexDocumentsAction(IndexActionType type, T doc) Document = doc; } + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags + #pragma warning disable CA1801 // Not all parameters are used depending on feature flags + #pragma warning disable CS1998 // Won't await depending on feature flags /// /// Serialize the document write action. /// /// The JSON writer. - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// JSON serializer options. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// A task representing the serialization. + internal async Task SerializeAsync( + Utf8JsonWriter writer, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + JsonSerializerOptions options, + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1998 + #pragma warning restore CA1801 + #pragma warning restore CS1572 { Debug.Assert(writer != null); writer.WriteStartObject(); - writer.WriteString(Constants.SearchActionKey, ActionType.ToSerialString()); - - // TODO: #10589 - Investigate a more efficient way of injecting properties into user models with System.Text.Json + writer.WriteString(Constants.SearchActionKeyJson, ActionType.ToSerialString()); // HACK: Serialize the user's model, parse it, and then write each // of its properties as if they were our own. - byte[] json = JsonSerializer.SerializeToUtf8Bytes(Document, JsonExtensions.SerializerOptions); + byte[] json; +#if EXPERIMENTAL_SERIALIZER + if (serializer != null) + { + using MemoryStream stream = new MemoryStream(); + if (async) + { + await serializer.SerializeAsync(stream, Document, typeof(T)).ConfigureAwait(false); + } + else + { + serializer.Serialize(stream, Document, typeof(T)); + } + json = stream.ToArray(); + } + else + { +#endif + json = JsonSerializer.SerializeToUtf8Bytes(Document, options); +#if EXPERIMENTAL_SERIALIZER + } +#endif using JsonDocument nested = JsonDocument.Parse(json); foreach (JsonProperty property in nested.RootElement.EnumerateObject()) { 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 c29bf59ab8d5..c17b0f50dbe1 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/IndexDocumentsBatch{T}.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; #pragma warning disable SA1402 // File may only contain a single type @@ -19,7 +21,7 @@ internal partial class IndexBatch { } /// Contains a batch of document write actions to send to a search index /// via . /// - public partial class IndexDocumentsBatch : IUtf8JsonSerializable + public partial class IndexDocumentsBatch { /// /// The actions in the batch. @@ -54,19 +56,47 @@ internal IndexDocumentsBatch(IndexActionType type, IEnumerable documents) } } + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags /// /// Serialize the document batch. /// /// The JSON writer. - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// JSON serializer options. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// A task representing the serialization. + internal async Task SerializeAsync( + Utf8JsonWriter writer, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + JsonSerializerOptions options, + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 { Debug.Assert(writer != null); writer.WriteStartObject(); - writer.WritePropertyName("value"); + writer.WritePropertyName(Constants.ValueKeyJson); writer.WriteStartArray(); foreach (IndexDocumentsAction action in Actions) { - writer.WriteObjectValue(action); + await action.SerializeAsync( + writer, +#if EXPERIMENTAL_SERIALIZER + serializer, +#endif + options, + async, + cancellationToken) + .ConfigureAwait(false); } writer.WriteEndArray(); writer.WriteEndObject(); diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs index ee9fcfbee8a1..6adf996f59af 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs @@ -178,7 +178,7 @@ public static AutocompleteResults AutocompleteResults( /// The completed term. /// The query along with the completed term. /// A new AutocompleteItem instance for mocking. - public static AutocompleteItem Autocompletion( + public static AutocompleteItem AutocompleteItem( string text, string queryPlusText) => new AutocompleteItem(text, queryPlusText); diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchResults{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchResults{T}.cs index 8e2112d2a537..e1c9d515e969 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchResults{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchResults{T}.cs @@ -5,6 +5,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.IO; +using System.Runtime.Serialization; using System.Text.Json; using System.Text.Json.Serialization; using System.Threading; @@ -23,7 +25,6 @@ internal partial class SearchDocumentsResult { } /// /// Response containing search results from an index. /// - [JsonConverter(typeof(SearchResultsConverterFactory))] public class SearchResults { /// @@ -147,6 +148,110 @@ await _pagingClient.SearchAsync( } return next; } + + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags + /// + /// Deserialize the SearchResults. + /// + /// A JSON stream. + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// Deserialized SearchResults. + internal static async Task> DeserializeAsync( + Stream json, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 + { + // Parse the JSON + using JsonDocument doc = async ? + await JsonDocument.ParseAsync(json, cancellationToken: cancellationToken).ConfigureAwait(false) : + JsonDocument.Parse(json); + + JsonSerializerOptions defaultSerializerOptions = JsonSerialization.SerializerOptions; + + SearchResults results = new SearchResults(); + foreach (JsonProperty prop in doc.RootElement.EnumerateObject()) + { + if (prop.NameEquals(Constants.ODataCountKeyJson.EncodedUtf8Bytes) && + prop.Value.ValueKind != JsonValueKind.Null) + { + results.TotalCount = prop.Value.GetInt64(); + } + else if (prop.NameEquals(Constants.SearchCoverageKeyJson.EncodedUtf8Bytes) && + prop.Value.ValueKind != JsonValueKind.Null) + { + results.Coverage = prop.Value.GetDouble(); + } + else if (prop.NameEquals(Constants.SearchFacetsKeyJson.EncodedUtf8Bytes)) + { + results.Facets = new Dictionary>(); + foreach (JsonProperty facetObject in prop.Value.EnumerateObject()) + { + // Get the values of the facet + List facets = new List(); + foreach (JsonElement facetValue in facetObject.Value.EnumerateArray()) + { + Dictionary facetValues = new Dictionary(); + long? facetCount = null; + foreach (JsonProperty facetProperty in facetValue.EnumerateObject()) + { + if (facetProperty.NameEquals(Constants.CountKeyJson.EncodedUtf8Bytes)) + { + if (facetProperty.Value.ValueKind != JsonValueKind.Null) + { + facetCount = facetProperty.Value.GetInt64(); + } + } + else + { + object value = facetProperty.Value.GetSearchObject(); + facetValues[facetProperty.Name] = value; + } + } + facets.Add(new FacetResult(facetCount, facetValues)); + } + // Add the facet to the results + results.Facets[facetObject.Name] = facets; + } + } + else if (prop.NameEquals(Constants.ODataNextLinkKeyJson.EncodedUtf8Bytes)) + { + results.NextUri = new Uri(prop.Value.GetString()); + } + else if (prop.NameEquals(Constants.SearchNextPageKeyJson.EncodedUtf8Bytes)) + { + results.NextOptions = SearchOptions.DeserializeSearchOptions(prop.Value); + } + else if (prop.NameEquals(Constants.ValueKeyJson.EncodedUtf8Bytes)) + { + foreach (JsonElement element in prop.Value.EnumerateArray()) + { + SearchResult result = await SearchResult.DeserializeAsync( + element, +#if EXPERIMENTAL_SERIALIZER + serializer, +#endif + defaultSerializerOptions, + async, + cancellationToken) + .ConfigureAwait(false); + results.Values.Add(result); + } + } + } + return results; + } } /// @@ -280,196 +385,6 @@ public override IEnumerable>> AsPages(string continuationTo } } - /// - /// JsonConverterFactory to create closed instances of - /// . - /// - internal class SearchResultsConverterFactory : ModelConverterFactory - { - protected override Type GenericType => typeof(SearchResults<>); - protected override Type GenericConverterType => typeof(SearchResultsConverter<>); - protected override bool ConstructWithOptions => true; - } - - /// - /// Convert from JSON to . - /// - /// - /// The .NET type that maps to the index schema. Instances of this type can - /// be retrieved as documents from the index. - /// - internal class SearchResultsConverter : JsonConverter> - { - private Type _resultType; - private readonly JsonConverter> _resultConverter; - - /// - /// Initializes a new instance of the SearchResultsConverter class. - /// - /// Serialization options. - public SearchResultsConverter(JsonSerializerOptions options) - { - Debug.Assert(options != null); - - // Cache the SearchResult converter - _resultConverter = (JsonConverter>)options.GetConverter(typeof(SearchResult)); - _resultType = typeof(SearchResult); - } - - /// - /// Serializing SearchResults isn't supported as it's an output only - /// model type. This always fails. - /// - /// The JSON writer. - /// The search result. - /// Serialization options. - public override void Write(Utf8JsonWriter writer, SearchResults value, JsonSerializerOptions options) => - throw new NotSupportedException($"{nameof(SearchResults)} cannot be serialized to JSON."); - - /// - /// Parse the SearchResults and its search results. - /// - /// The JSON reader. - /// The type to parse into. - /// Serialization options. - /// The deserialized search results. - public override SearchResults Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) - { - Debug.Assert(typeToConvert != null); - Debug.Assert(typeToConvert.IsAssignableFrom(typeof(SearchResults))); - Debug.Assert(options != null); - - SearchResults results = new SearchResults(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - switch (reader.ExpectsPropertyName()) - { - case Constants.ODataCountKey: - results.TotalCount = reader.ExpectsNullableLong(); - break; - case Constants.SearchCoverageKey: - results.Coverage = reader.ExpectsNullableDouble(); - break; - case Constants.SearchFacetsKey: - ReadFacets(ref reader, results, options); - break; - case Constants.ODataNextLinkKey: - results.NextUri = new Uri(reader.ExpectsString()); - break; - case Constants.SearchNextPageKey: - results.NextOptions = ReadNextPageOptions(ref reader); - break; - case Constants.ValueKey: - reader.Expects(JsonTokenType.StartArray); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - SearchResult result = _resultConverter.Read(ref reader, _resultType, options); - results.Values.Add(result); - } - break; - default: - // Ignore other properties (including OData context, etc.) - reader.Skip(); - break; - } - } - return results; - } - - /// - /// Read the @search.facets property value. - /// - /// The JSON reader. - /// The SearchResults to add the facets to. - /// JSON serializer options. - private static void ReadFacets( - ref Utf8JsonReader reader, - SearchResults results, - JsonSerializerOptions options) - { - Debug.Assert(results != null); - - // Facets are optional, so short circuit if nothing is found - if (reader.TokenType == JsonTokenType.Null) - { - return; - } - - results.Facets = new Dictionary>(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - // Get the name of the facet - string facetName = reader.ExpectsPropertyName(); - - // Get the values of the facet - List facets = new List(); - reader.Expects(JsonTokenType.StartArray); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - FacetResult facet = ReadFacetResult(ref reader, options); - facets.Add(facet); - } - - // Add the facet to the results - results.Facets[facetName] = facets; - } - } - - /// - /// Read the facet result value. - /// - /// JSON reader. - /// Serializer options. - /// The facet result. - private static FacetResult ReadFacetResult( - ref Utf8JsonReader reader, - JsonSerializerOptions options) - { - Dictionary facet = new Dictionary(); - long? count = default; - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - // Get the name of the facet property - string facetName = reader.ExpectsPropertyName(); - if (facetName == Constants.CountKey) - { - count = reader.ExpectsNullableLong(); - } - else - { - object value = reader.ReadObject(options); - facet[facetName] = value; - } - } - return new FacetResult(count, facet); - } - - /// - /// Read the @search.nextPageParameters property value. - /// - /// The JSON reader. - /// The next SearchOptions. - private static SearchOptions ReadNextPageOptions(ref Utf8JsonReader reader) - { - // Next page options aren't required, so short circuit if nothing - // is found - if (reader.TokenType == JsonTokenType.Null) - { - return null; - } - - // Use the generated SearchOptions parsing code - using JsonDocument doc = JsonDocument.ParseValue(ref reader); - return SearchOptions.DeserializeSearchOptions(doc.RootElement); - } - } - public static partial class SearchModelFactory { /// Initializes a new instance of SearchResults. diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchResult{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchResult{T}.cs index a24c0e0ca6db..d336f14ba449 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchResult{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchResult{T}.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Text.Json; using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; #pragma warning disable SA1402 // File may only contain a single type @@ -23,7 +26,6 @@ internal partial class SearchResult { } /// The .NET type that maps to the index schema. Instances of this type can /// be retrieved as documents from the index. /// - [JsonConverter(typeof(SearchResultConverterFactory))] public class SearchResult { /// @@ -48,119 +50,87 @@ public class SearchResult /// Initializes a new instance of the SearchResult class. /// internal SearchResult() { } - } - - /// - /// JsonConverterFactory to create closed instances of - /// . - /// - internal class SearchResultConverterFactory : ModelConverterFactory - { - protected override Type GenericType => typeof(SearchResult<>); - protected override Type GenericConverterType => typeof(SearchResultConverter<>); - } - - /// - /// Convert from JSON to . - /// - /// - /// The .NET type that maps to the index schema. Instances of this type can - /// be retrieved as documents from the index. - /// - internal class SearchResultConverter : JsonConverter> - { - /// - /// Serializing SearchResult isn't supported as it's an output only - /// model type. This always fails. - /// - /// The JSON writer. - /// The search result. - /// Serialization options. - public override void Write(Utf8JsonWriter writer, SearchResult value, JsonSerializerOptions options) => - throw new NotSupportedException($"{nameof(SearchResult)} cannot be serialized to JSON."); + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags /// - /// Parse a SearchResult and its model. + /// Deserialize a SearchResult and its model. /// - /// The JSON reader. - /// The type to parse into. - /// Serialization options. - /// The deserialized search result. - public override SearchResult Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) + /// A JSON element. + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// JSON serializer options. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// Deserialized SearchResults. + internal static async Task> DeserializeAsync( + JsonElement element, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + JsonSerializerOptions options, + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 { Debug.Assert(options != null); SearchResult result = new SearchResult(); - - // Clone the reader so we can get the search text property without - // advancing the reader over any properties needed to deserialize - // the user's model type. - Utf8JsonReader clone = reader; - - // Keep track of the properties we've found so we can stop reading - // through the cloned object - bool parsedScore = false; - bool parsedHighlights = false; - - clone.Expects(JsonTokenType.StartObject); - while ( - (!parsedScore || !parsedHighlights) && - clone.Read() && - clone.TokenType != JsonTokenType.EndObject) + foreach (JsonProperty prop in element.EnumerateObject()) { - string name = clone.ExpectsPropertyName(); - if (name == Constants.SearchScoreKey) + if (prop.NameEquals(Constants.SearchScoreKeyJson.EncodedUtf8Bytes) && + prop.Value.ValueKind != JsonValueKind.Null) { - parsedScore = true; - result.Score = clone.ExpectsNullableDouble(); + result.Score = prop.Value.GetDouble(); } - else if (name == Constants.SearchHighlightsKey) + else if (prop.NameEquals(Constants.SearchHighlightsKeyJson.EncodedUtf8Bytes)) { - parsedHighlights = true; - ReadHighlights(ref clone, result); - } - else - { - // Skip the rest of the next property's value - clone.Skip(); + result.Highlights = new Dictionary>(); + foreach (JsonProperty highlight in prop.Value.EnumerateObject()) + { + // Add the highlight values + List values = new List(); + result.Highlights[highlight.Name] = values; + foreach (JsonElement highlightValue in highlight.Value.EnumerateArray()) + { + values.Add(highlightValue.GetString()); + } + } } } // Deserialize the model - T document = JsonSerializer.Deserialize(ref reader, options); - result.Document = document; - - return result; - } - - /// - /// Read the @search.highlights property value. - /// - /// The JSON reader. - /// The SearchResult to add the highlights to. - private static void ReadHighlights(ref Utf8JsonReader reader, SearchResult result) - { - Debug.Assert(result != null); - result.Highlights = new Dictionary>(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) +#if EXPERIMENTAL_SERIALIZER + if (serializer != null) { - // Get the highlight field name - string name = reader.ExpectsPropertyName(); - - // Get the highlight values - List values = new List(); - reader.Expects(JsonTokenType.StartArray); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) + using Stream stream = element.ToStream(); + T document = async ? + (T)await serializer.DeserializeAsync(stream, typeof(T)).ConfigureAwait(false) : + (T)serializer.Deserialize(stream, typeof(T)); + result.Document = document; + } + else + { +#endif + T document; + if (async) { - values.Add(reader.ExpectsString()); + using Stream stream = element.ToStream(); + document = await JsonSerializer.DeserializeAsync(stream, options, cancellationToken).ConfigureAwait(false); } - - // Add the highlight - result.Highlights[name] = values; + else + { + document = JsonSerializer.Deserialize(element.GetRawText(), options); + } + result.Document = document; +#if EXPERIMENTAL_SERIALIZER } +#endif + + return result; } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchSuggestion{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchSuggestion{T}.cs index 555b05e0caa1..0e0736c4d5d8 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchSuggestion{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchSuggestion{T}.cs @@ -3,8 +3,11 @@ using System; using System.Diagnostics; +using System.IO; using System.Text.Json; using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; #pragma warning disable SA1402 // File may only contain a single type @@ -23,7 +26,6 @@ internal partial class SuggestResult { } /// The .NET type that maps to the index schema. Instances of this type can /// be retrieved as documents from the index. /// - [JsonConverter(typeof(SearchSuggestionConverterFactory))] public class SearchSuggestion { /// @@ -40,70 +42,72 @@ public class SearchSuggestion /// Initializes a new instance of the SearchSuggestion class. /// internal SearchSuggestion() { } - } - - /// - /// JsonConverterFactory to create closed instances of - /// . - /// - internal class SearchSuggestionConverterFactory : ModelConverterFactory - { - protected override Type GenericType => typeof(SearchSuggestion<>); - protected override Type GenericConverterType => typeof(SearchSuggestionConverter<>); - } - - /// - /// Convert from JSON to . - /// - /// - /// The .NET type that maps to the index schema. Instances of this type can - /// be retrieved as documents from the index. - /// - internal class SearchSuggestionConverter : JsonConverter> - { - /// - /// Serializing SearchSuggestion isn't supported as it's an output only - /// model type. This always fails. - /// - /// The JSON writer. - /// The suggestion. - /// Serialization options. - public override void Write(Utf8JsonWriter writer, SearchSuggestion value, JsonSerializerOptions options) => - throw new NotSupportedException($"{nameof(SearchSuggestion)} cannot be serialized to JSON."); + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags /// - /// Parse a SearchSuggestion and its model. + /// Deserialize a SearchSuggestion and its model. /// - /// The JSON reader. - /// The type to parse into. - /// Serialization options. - /// The deserialized suggestion. - public override SearchSuggestion Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) + /// A JSON element. + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// JSON serializer options. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// Deserialized SearchSuggestion. + internal static async Task> DeserializeAsync( + JsonElement element, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + JsonSerializerOptions options, + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 { Debug.Assert(options != null); - SearchSuggestion suggestion = new SearchSuggestion(); - // Clone the reader so we can get the search text property without - // advancing the reader over any properties needed to deserialize - // the user's model type. - Utf8JsonReader clone = reader; - clone.Expects(JsonTokenType.StartObject); - while (clone.Read() && clone.TokenType != JsonTokenType.EndObject) + SearchSuggestion suggestion = new SearchSuggestion(); + foreach (JsonProperty prop in element.EnumerateObject()) { - string name = clone.ExpectsPropertyName(); - if (name == Constants.SearchTextKey) + if (prop.NameEquals(Constants.SearchTextKeyJson.EncodedUtf8Bytes)) { - suggestion.Text = clone.ExpectsString(); - break; + suggestion.Text = prop.Value.GetString(); + break; // We only have one non-model property } } // Deserialize the model - T document = JsonSerializer.Deserialize(ref reader, options); - suggestion.Document = document; +#if EXPERIMENTAL_SERIALIZER + if (serializer != null) + { + using Stream stream = element.ToStream(); + T document = async ? + (T)await serializer.DeserializeAsync(stream, typeof(T)).ConfigureAwait(false) : + (T)serializer.Deserialize(stream, typeof(T)); + suggestion.Document = document; + } + else + { +#endif + T document; + if (async) + { + using Stream stream = element.ToStream(); + document = await JsonSerializer.DeserializeAsync(stream, options, cancellationToken).ConfigureAwait(false); + } + else + { + document = JsonSerializer.Deserialize(element.GetRawText(), options); + } + suggestion.Document = document; +#if EXPERIMENTAL_SERIALIZER + } +#endif return suggestion; } diff --git a/sdk/search/Azure.Search.Documents/src/Models/SuggestResults{T}.cs b/sdk/search/Azure.Search.Documents/src/Models/SuggestResults{T}.cs index 941153fdbf84..1e136fc4c1f2 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SuggestResults{T}.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SuggestResults{T}.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Text.Json; using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; #pragma warning disable SA1402 // File may only contain a single type @@ -23,7 +26,6 @@ internal partial class SuggestDocumentsResult { } /// The .NET type that maps to the index schema. Instances of this type can /// be retrieved as documents from the index. /// - [JsonConverter(typeof(SuggestResultsConverterFactory))] public partial class SuggestResults { /// @@ -42,92 +44,61 @@ public partial class SuggestResults /// Initializes a new instance of the SuggestResults class. /// internal SuggestResults() { } - } - - /// - /// JsonConverterFactory to create closed instances of - /// . - /// - internal class SuggestResultsConverterFactory : ModelConverterFactory - { - protected override Type GenericType => typeof(SuggestResults<>); - protected override Type GenericConverterType => typeof(SuggestResultsConverter<>); - protected override bool ConstructWithOptions => true; - } - - /// - /// Convert from JSON to . - /// - /// - /// The .NET type that maps to the index schema. Instances of this type can - /// be retrieved as documents from the index. - /// - internal class SuggestResultsConverter : JsonConverter> - { - private Type _suggestionType; - private readonly JsonConverter> _suggestionConverter; + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags /// - /// Initializes a new instance of the SuggestResultsConverter class. + /// Deserialize the SuggestResults. /// - /// Serialization options. - public SuggestResultsConverter(JsonSerializerOptions options) + /// A JSON stream. + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// Deserialized SuggestResults. + internal static async Task> DeserializeAsync( + Stream json, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 { - Debug.Assert(options != null); - - // Cache the SearchSuggestion converter - _suggestionConverter = (JsonConverter>)options.GetConverter(typeof(SearchSuggestion)); - _suggestionType = typeof(SearchSuggestion); - } - - /// - /// Serializing SuggestResults isn't supported as it's an output only - /// model type. This always fails. - /// - /// The JSON writer. - /// The suggestion. - /// Serialization options. - public override void Write(Utf8JsonWriter writer, SuggestResults value, JsonSerializerOptions options) => - throw new NotSupportedException($"{nameof(SuggestResults)} cannot be serialized to JSON."); + // Parse the JSON + using JsonDocument doc = async ? + await JsonDocument.ParseAsync(json, cancellationToken: cancellationToken).ConfigureAwait(false) : + JsonDocument.Parse(json); - /// - /// Parse the SuggestResults and its suggestions. - /// - /// The JSON reader. - /// The type to parse into. - /// Serialization options. - /// The deserialized suggestions. - public override SuggestResults Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) - { - Debug.Assert(typeToConvert != null); - Debug.Assert(typeToConvert.IsAssignableFrom(typeof(SuggestResults))); - Debug.Assert(options != null); + JsonSerializerOptions defaultSerializerOptions = JsonSerialization.SerializerOptions; SuggestResults suggestions = new SuggestResults(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + foreach (JsonProperty prop in doc.RootElement.EnumerateObject()) { - switch (reader.ExpectsPropertyName()) + if (prop.NameEquals(Constants.SearchCoverageKeyJson.EncodedUtf8Bytes) && + prop.Value.ValueKind != JsonValueKind.Null) + { + suggestions.Coverage = prop.Value.GetDouble(); + } + else if (prop.NameEquals(Constants.ValueKeyJson.EncodedUtf8Bytes)) { - case Constants.SearchCoverageKey: - suggestions.Coverage = reader.ExpectsNullableDouble(); - break; - case Constants.ValueKey: - reader.Expects(JsonTokenType.StartArray); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - SearchSuggestion suggestion = - _suggestionConverter.Read(ref reader, _suggestionType, options); - suggestions.Results.Add(suggestion); - } - break; - default: - // Ignore other properties (including OData context, etc.) - reader.Skip(); - break; + foreach (JsonElement element in prop.Value.EnumerateArray()) + { + SearchSuggestion suggestion = await SearchSuggestion.DeserializeAsync( + element, +#if EXPERIMENTAL_SERIALIZER + serializer, +#endif + defaultSerializerOptions, + async, + cancellationToken) + .ConfigureAwait(false); + suggestions.Results.Add(suggestion); + } } } return suggestions; diff --git a/sdk/search/Azure.Search.Documents/src/SearchClient.cs b/sdk/search/Azure.Search.Documents/src/SearchClient.cs index 7ca458575c26..e8521a343c04 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClient.cs @@ -47,6 +47,14 @@ public class SearchClient /// public virtual string IndexName { get; } +#if EXPERIMENTAL_SERIALIZER + /// + /// Gets an that can be used to + /// customize the serialization of strongly typed models. + /// + private ObjectSerializer Serializer { get; } +#endif + /// /// Gets the authenticated used for sending /// requests to the Search Service. @@ -159,6 +167,9 @@ public SearchClient( options ??= new SearchClientOptions(); Endpoint = endpoint; IndexName = indexName; +#if EXPERIMENTAL_SERIALIZER + Serializer = options.Serializer; +#endif ClientDiagnostics = new ClientDiagnostics(options); Pipeline = options.Build(credential); Version = options.Version; @@ -172,6 +183,7 @@ public SearchClient( Version.ToVersionString()); } + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags /// /// Initializes a new instance of the SearchClient class from a /// . @@ -184,6 +196,10 @@ public SearchClient( /// /// Required. The name of the Search Index. /// + /// + /// Gets or sets an that can be used to + /// customize the serialization of strongly typed models. + /// /// /// The authenticated used for sending /// requests to the Search Service. @@ -199,9 +215,13 @@ public SearchClient( internal SearchClient( Uri endpoint, string indexName, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif HttpPipeline pipeline, ClientDiagnostics diagnostics, SearchClientOptions.ServiceVersion version) + #pragma warning restore CS1572 { Debug.Assert(endpoint != null); Debug.Assert(string.Equals(endpoint.Scheme, Uri.UriSchemeHttps, StringComparison.OrdinalIgnoreCase)); @@ -214,6 +234,9 @@ internal SearchClient( Endpoint = endpoint; IndexName = indexName; +#if EXPERIMENTAL_SERIALIZER + Serializer = serializer; +#endif ClientDiagnostics = diagnostics; Pipeline = pipeline; Version = version; @@ -288,156 +311,6 @@ public virtual async Task> GetDocumentCountAsync( #endregion GetDocumentCount #region GetDocument - /// - /// Retrieves a document from Azure Cognitive Search. This is useful - /// when a user clicks on a specific search result, and you want to - /// look up specific details about that document. You can only get one - /// document at a time. Use Search to get multiple documents in a - /// single request. - /// - /// - /// - /// Required. An string value that uniquely identifies each document - /// in the index. The key is sometimes referred to as a document ID. - /// See - /// - /// for the rules for constructing valid document keys. - /// - /// - /// Options to customize the operation's behavior. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// The document corresponding to the . - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// The non-generic overloads of the GetDocument and GetDocumentAsync - /// that return a make a best-effort - /// attempt to map JSON types in the response payload to .NET types. - /// See - /// for more information. - /// - public virtual Response GetDocument( - string key, - GetDocumentOptions options = null, - CancellationToken cancellationToken = default) => - GetDocumentInternal( - key, - options, - async: false, - cancellationToken) - .EnsureCompleted(); - - /// - /// Retrieves a document from Azure Cognitive Search. This is useful - /// when a user clicks on a specific search result, and you want to - /// look up specific details about that document. You can only get one - /// document at a time. Use Search to get multiple documents in a - /// single request. - /// - /// - /// - /// Required. An string value that uniquely identifies each document - /// in the index. The key is sometimes referred to as a document ID. - /// See - /// - /// for the rules for constructing valid document keys. - /// - /// - /// Options to customize the operation's behavior. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// The document corresponding to the . - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// The non-generic overloads of the GetDocument and GetDocumentAsync - /// that return a make a best-effort - /// attempt to map JSON types in the response payload to .NET types. - /// This mapping does not have the benefit of precise type information - /// from the index, so the mapping is not always correct. In - /// particular, be aware of the following cases: - /// - /// - /// - /// Any numeric value without a decimal point will be deserialized to - /// a System.Int32 (int in C#, int32 in F#) if it can be converted or - /// a System.Int64 (long in C#, int64 in F#) otherwise. - /// - /// - /// - /// - /// Special double-precision floating point values such as NaN and - /// Infinity will be deserialized as type System.String rather than - /// System.Double, even if they are in arrays with regular floating - /// point values. - /// - /// - /// - /// - /// Any string field with a value formatted like a DateTimeOffset will - /// be deserialized incorrectly. This applies to such values in arrays - /// of strings as well. We recommend storing such values in - /// Edm.DateTimeOffset fields rather than Edm.String fields. - /// - /// - /// - /// - /// Any Edm.DateTimeOffset field will be deserialized as a - /// System.DateTimeOffset, not System.DateTime. - /// - /// - /// - /// - /// Any empty JSON array will be deserialized as an array of - /// System.Object (object[] in C#, obj[] in F#). - /// - /// - /// - /// - /// Any array of a primitive type will be deserialized as an array of - /// its corresponding .NET type, not as an array of System.Object, - /// unless the values cannot all be deserialized to the same type. For - /// example, the arrays [3.14, "NaN"] and - /// ["hello", "2016-10-10T17:41:05.123-07:00"] will both deserialize as - /// arrays of System.Object (object[] in C#, obj[] in F#). This is - /// because special double values always deserialize as strings, while - /// strings that look like DateTimeOffset always deserialize as - /// DateTimeOffset. - /// - /// - /// - /// - /// Complex fields will be recursively deserialized into instances of - /// type . Similarly, complex collection - /// fields will be deserialized into arrays of such instances. - /// - /// - /// - /// - public virtual async Task> GetDocumentAsync( - string key, - GetDocumentOptions options = null, - CancellationToken cancellationToken = default) => - await GetDocumentInternal( - key, - options, - async: true, - cancellationToken) - .ConfigureAwait(false); - /// /// Retrieves a document from Azure Cognitive Search. This is useful /// when a user clicks on a specific search result, and you want to @@ -471,11 +344,12 @@ await GetDocumentInternal( /// Thrown when a failure is returned by the Search Service. /// /// - /// The generic overloads of the GetDocument and GetDocumentAsync - /// methods support mapping of Azure Search field types to .NET types - /// via the type parameter T. Note that all search field types except + /// The generic overloads of the and + /// methods support mapping of Azure + /// Search field types to .NET types via the type parameter + /// . Note that all search field types except /// collections are nullable, so we recommend using nullable types for - /// the properties of T. See + /// the properties of . See /// /// for more information. /// @@ -523,11 +397,12 @@ public virtual Response GetDocument( /// Thrown when a failure is returned by the Search Service. /// /// - /// The generic overloads of the GetDocument and GetDocumentAsync + /// The and /// methods support mapping of Azure Search field types to .NET types - /// via the type parameter T. Note that all search field types except - /// collections are nullable, so we recommend using nullable types for - /// the properties of T. The type mapping is as follows: + /// via the type parameter . Note that all + /// search field types except collections are nullable, so we recommend + /// using nullable types for the properties of . + /// The type mapping is as follows: /// /// /// Search field type @@ -535,32 +410,32 @@ public virtual Response GetDocument( /// /// /// Edm.String - /// System.String (string in C# and F#) + /// (string in C# and F#) /// /// /// Edm.Boolean - /// System.Nullable<System.Boolean> (bool? in C#,\ + /// (bool? in C#,\ /// Nullable<bool> in F#) /// /// /// Edm.Double - /// System.Nullable<System.Double> (double? in C#, + /// (double? in C#, /// Nullable<float> in F#) /// /// /// Edm.Int32 - /// System.Nullable<System.Int32> (int? in C#, + /// (int? in C#, /// Nullable<int> in F#) /// /// /// Edm.Int64 - /// System.Nullable<System.Int64> (long? in C#, + /// (long? in C#, /// Nullable<int64> in F#) /// /// /// Edm.DateTimeOffset /// - /// System.Nullable<System.DateTimeOffset> (DateTimeOffset? in + /// (DateTimeOffset? in /// C#, Nullable<DateTimeOffset> in F#) or /// System.Nullable<System.DateTime> (DateTime? in C#, /// Nullable<DateTime> in F#). Both types work, although we @@ -587,8 +462,7 @@ public virtual Response GetDocument( /// /// /// Edm.GeographyPoint - /// Currently treated as a complex object but will soon be - /// replaced with something like Microsoft.Spatial.GeographyPoint + /// /// /// /// @@ -602,52 +476,93 @@ public virtual Response GetDocument( /// /// /// Collection(Edm.String) - /// IEnumerable<System.String> (seq<string> + /// (seq<string> /// in F#) /// /// /// Collection(Edm.Boolean) - /// IEnumerable<System.Boolean> (seq<bool> in + /// (seq<bool> in /// F#) /// /// /// Collection(Edm.Double) - /// IEnumerable<System.Double> (seq<float> in + /// (seq<float> in /// F#) /// /// /// Collection(Edm.Int32) - /// IEnumerable<System.Int32> (seq<int> in + /// (seq<int> in /// F#) /// /// /// Collection(Edm.Int64) - /// IEnumerable<System.Int64> (seq<int64> in + /// (seq<int64> in /// F#) /// /// /// Collection(Edm.DateTimeOffset) /// - /// IEnumerable<System.DateTimeOffset> or - /// IEnumerable<System.DateTime> (seq<DateTimeOffset> or + /// or + /// (seq<DateTimeOffset> or /// seq<DateTime> in F#). Both types work, although we recommend - /// using IEnumerable<System.DateTimeOffset>. See the notes + /// using . See the notes /// above on Edm.DateTimeOffset for details. /// /// /// /// Collection(Edm.GeographyPoint) - /// Currently treated like Collection(Edm.ComplexType) but - /// will soon be replaced with something more like - /// IEnumerable<Microsoft.Spatial.GeographyPoint> - /// (seq<GeographyPoint> in F#) + /// sequence of + /// (seq<PointGeometry> in F#) /// /// /// Collection(Edm.ComplexType) /// - /// IEnumerable<U> (seq<U> in F#) where U is any type that - /// can be deserialized from the JSON objects in the complex collection - /// field. This can be a value type or a reference type. + /// (seq<T> in F#) where T is any + /// type that can be deserialized from the JSON objects in the complex + /// collection field. This can be a value type or a reference type. + /// + /// + /// + /// You can also use the dynamic as your + /// and we will attempt to map JSON types in + /// the response payload to .NET types. This mapping does not + /// have the benefit of precise type information from the index, so the + /// mapping is not always correct. In particular, be aware of the + /// following cases: + /// + /// + /// + /// Any numeric value without a decimal point will be deserialized to + /// a (int in C#, int32 in F#) if it can be + /// converted or a (long in C#, int64 in F#) + /// otherwise. + /// + /// + /// + /// + /// Special double-precision floating point values such as NaN and + /// Infinity will be deserialized as type rather + /// than , even if they are in arrays with regular + /// floating point values. + /// + /// + /// + /// + /// Any Edm.DateTimeOffset field will be deserialized as a + /// , not . + /// + /// + /// + /// + /// Any empty JSON array will be deserialized as an array of + /// (object[] in C#, obj[] in F#). + /// + /// + /// + /// + /// Complex fields will be recursively deserialized into instances of + /// type . Similarly, complex collection + /// fields will be deserialized into arrays of such instances. /// /// /// @@ -687,9 +602,13 @@ private async Task> GetDocumentInternal( { case 200: { - T value = async ? - await message.Response.ContentStream.DeserializeAsync(cancellationToken).ConfigureAwait(false) : - message.Response.ContentStream.Deserialize(); + T value = await message.Response.ContentStream.DeserializeAsync( +#if EXPERIMENTAL_SERIALIZER + Serializer, +#endif + async, + cancellationToken) + .ConfigureAwait(false); return Response.FromValue(value, message.Response); } default: @@ -707,110 +626,6 @@ await ClientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).Conf #endregion Get #region Search - /// - /// Searches for documents in the search index. - /// - /// - /// - /// A full-text search query expression; Use "*" or omit this - /// parameter to match all documents. See - /// - /// for more information about search query syntax. - /// - /// - /// Options that allow specifying filtering, sorting, faceting, paging, - /// and other search query behaviors. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing the documents matching the query. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// - /// The non-generic overloads of the Search and SearchAsync methods - /// make a best-effort attempt to map JSON types in the response - /// payload to .NET types. See - /// - /// for more information. - /// - /// - /// Azure Cognitive Search might not be able to include all results in - /// a single response in which case - /// will automatically continue making additional requests as you - /// enumerate through the results. You can also process the results a - /// page at a time with the - /// method. - /// - /// - public virtual Response> Search( - string searchText, - SearchOptions options = null, - CancellationToken cancellationToken = default) => - SearchInternal( - searchText, - options, - async: false, - cancellationToken) - .EnsureCompleted(); - - /// - /// Searches for documents in the search index. - /// - /// - /// - /// A full-text search query expression; Use "*" or omit this - /// parameter to match all documents. See - /// - /// for more information about search query syntax. - /// - /// - /// Options that allow specifying filtering, sorting, faceting, paging, - /// and other search query behaviors. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing the documents matching the query. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// - /// The non-generic overloads of the Search and SearchAsync methods - /// make a best-effort attempt to map JSON types in the response - /// payload to .NET types. See - /// - /// for more information. - /// - /// - /// Azure Cognitive Search might not be able to include all results in - /// a single response in which case - /// will automatically - /// continue making additional requests as you enumerate through the - /// results. You can also process the results a page at a time with - /// the method. - /// - /// - public async virtual Task>> SearchAsync( - string searchText, - SearchOptions options = null, - CancellationToken cancellationToken = default) => - await SearchInternal( - searchText, - options, - async: true, - cancellationToken) - .ConfigureAwait(false); - /// /// Searches for documents in the search index. /// @@ -841,9 +656,11 @@ await SearchInternal( /// /// /// - /// The generic overloads of the Search and SearchAsync methods support - /// mapping of search field types to .NET types via the type parameter - /// T. See + /// Search and SearchAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// /// for more details on the type mapping. /// /// @@ -896,9 +713,11 @@ public virtual Response> Search( /// /// /// - /// The generic overloads of the Search and SearchAsync methods support - /// mapping of search field types to .NET types via the type parameter - /// T. See + /// Search and SearchAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// /// for more details on the type mapping. /// /// @@ -969,9 +788,14 @@ private async Task>> SearchInternal( case 200: { // Deserialize the results - SearchResults results = async ? - await message.Response.ContentStream.DeserializeAsync>(cancellationToken).ConfigureAwait(false) : - message.Response.ContentStream.Deserialize>(); + SearchResults results = await SearchResults.DeserializeAsync( + message.Response.ContentStream, +#if EXPERIMENTAL_SERIALIZER + Serializer, +#endif + async, + cancellationToken) + .ConfigureAwait(false); // Cache the client and raw response so we can abstract // away server-side paging @@ -994,110 +818,6 @@ await ClientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).Conf #endregion Search #region Suggest - /// - /// Executes a "search-as-you-type" query consisting of a partial text - /// input (three character minimum). It returns matching text found in - /// suggester-aware fields. Azure Cognitive Search looks for matching - /// values in fields that are predefined in a Suggester. For example, - /// if you enable suggestions on a city field, typing "sea" produces - /// documents containing "Seattle", "Sea Tac", and "Seaside" (all - /// actual city names) for that field. - /// - /// - /// - /// The search text to use to suggest documents. Must be at least 1 - /// character, and no more than 100 characters. - /// - /// - /// The name of the suggester as specified in the suggesters collection - /// that's part of the index definition. - /// - /// - /// Options for filtering, sorting, and other suggestions query - /// behaviors. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing suggestion query results from an index. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// The non-generic overloads of the Suggest and SuggestAsync methods - /// make a best-effort attempt to map JSON types in the response - /// payload to .NET types. See - /// - /// for more information. - /// - public virtual Response> Suggest( - string searchText, - string suggesterName, - SuggestOptions options = null, - CancellationToken cancellationToken = default) => - SuggestInternal( - searchText, - suggesterName, - options, - async: false, - cancellationToken) - .EnsureCompleted(); - - /// - /// Executes a "search-as-you-type" query consisting of a partial text - /// input (three character minimum). It returns matching text found in - /// suggester-aware fields. Azure Cognitive Search looks for matching - /// values in fields that are predefined in a Suggester. For example, - /// if you enable suggestions on a city field, typing "sea" produces - /// documents containing "Seattle", "Sea Tac", and "Seaside" (all - /// actual city names) for that field. - /// - /// - /// - /// The search text to use to suggest documents. Must be at least 1 - /// character, and no more than 100 characters. - /// - /// - /// The name of the suggester as specified in the suggesters collection - /// that's part of the index definition. - /// - /// - /// Options for filtering, sorting, and other suggestions query - /// behaviors. - /// - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// - /// Response containing suggestion query results from an index. - /// - /// - /// Thrown when a failure is returned by the Search Service. - /// - /// - /// The non-generic overloads of the Suggest and SuggestAsync methods - /// make a best-effort attempt to map JSON types in the response - /// payload to .NET types. See - /// - /// for more information. - /// - public virtual async Task>> SuggestAsync( - string searchText, - string suggesterName, - SuggestOptions options = null, - CancellationToken cancellationToken = default) => - await SuggestInternal( - searchText, - suggesterName, - options, - async: true, - cancellationToken) - .ConfigureAwait(false); - /// /// Executes a "search-as-you-type" query consisting of a partial text /// input (three character minimum). It returns matching text found in @@ -1135,9 +855,11 @@ await SuggestInternal( /// Thrown when a failure is returned by the Search Service. /// /// - /// The generic overloads of the Suggest and SuggestAsync methods support - /// mapping of search field types to .NET types via the type parameter - /// T. See + /// Suggest and SuggestAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// /// for more details on the type mapping. /// public virtual Response> Suggest( @@ -1190,9 +912,11 @@ public virtual Response> Suggest( /// Thrown when a failure is returned by the Search Service. /// /// - /// The generic overloads of the Suggest and SuggestAsync methods support - /// mapping of search field types to .NET types via the type parameter - /// T. See + /// Suggest and SuggestAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// /// for more details on the type mapping. /// public virtual async Task>> SuggestAsync( @@ -1236,9 +960,14 @@ private async Task>> SuggestInternal( { case 200: { - SuggestResults suggestions = async ? - await message.Response.ContentStream.DeserializeAsync>(cancellationToken).ConfigureAwait(false) : - message.Response.ContentStream.Deserialize>(); + SuggestResults suggestions = await SuggestResults.DeserializeAsync( + message.Response.ContentStream, +#if EXPERIMENTAL_SERIALIZER + Serializer, +#endif + async, + cancellationToken) + .ConfigureAwait(false); return Response.FromValue(suggestions, message.Response); } default: @@ -1508,7 +1237,15 @@ 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(batch); + await batch.SerializeAsync( + content.JsonWriter, +#if EXPERIMENTAL_SERIALIZER + Serializer, +#endif + JsonSerialization.SerializerOptions, + async, + cancellationToken) + .ConfigureAwait(false); request.Content = content; } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs index 76e1b8a7408e..7b25962f8729 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs @@ -51,6 +51,16 @@ public enum ServiceVersion /// public ServiceVersion Version { get; } +#if EXPERIMENTAL_SERIALIZER + /// + /// Gets or sets an that can be used to + /// customize the serialization of strongly typed models. The + /// serializer needs to support JSON and + /// will be used if no value is provided. + /// + public ObjectSerializer Serializer { get; set; } +#endif + /// /// Initializes a new instance of the /// class. diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument.cs deleted file mode 100644 index be363fcde482..000000000000 --- a/sdk/search/Azure.Search.Documents/src/SearchDocument.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Dynamic; -using System.Globalization; -using System.IO; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; -using Azure.Core; - -#pragma warning disable SA1402 // File may only contain a single type - -namespace Azure.Search.Documents.Models -{ - /// - /// Represents an untyped document returned from a search or document - /// lookup. It can be accessed as either a dynamic object or a dictionary. - /// - [JsonConverter(typeof(SearchDocumentConverter))] - public class SearchDocument : DynamicObject, IDictionary - { - /// - /// The document properties. - /// - private readonly IDictionary _values = null; - - /// - /// Initializes a new instance of the SearchDocument class. - /// - public SearchDocument() : this(null) { } - - /// - /// Initializes a new instance of the SearchDocument class with initial - /// values. - /// - /// Initial values of the document. - public SearchDocument(IDictionary values) => - _values = values != null ? - new Dictionary(values) : - new Dictionary(); - - /// - public object this[string key] - { - get => _values[key]; - set => _values[key] = value; - } - - #region DynamicObject - /// - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - Argument.AssertNotNull(binder, nameof(binder)); - Argument.AssertNotNullOrEmpty(binder.Name, $"{nameof(binder)}.{nameof(binder.Name)}"); - - // Get the property value - if (!TryGetValue(binder.Name, out result)) - { - Debug.Assert(!binder.IgnoreCase, "We haven't implemented case-insensitive lookup!"); - return false; - } - - // Try to convert it to the desired type - if (result.GetType() != binder.ReturnType) - { - try - { - // TODO: #10591 Investigate more robust conversions for dynamic objects - result = Convert.ChangeType(result, binder.ReturnType, CultureInfo.InvariantCulture); - } - catch - { - } - } - - return true; - } - - /// - public override bool TrySetMember(SetMemberBinder binder, object value) - { - Argument.AssertNotNull(binder, nameof(binder)); - this[binder.Name] = value; - return true; - } - #endregion DynamicObject - - #region IDictionary - /// - public bool TryGetValue(string key, out object value) => - _values.TryGetValue(key, out value); - - /// - public ICollection Keys => _values.Keys; - - /// - public ICollection Values => _values.Values; - - /// - public int Count => _values.Count; - - /// - bool ICollection>.IsReadOnly => _values.IsReadOnly; - - /// - public void Add(string key, object value) => _values.Add(key, value); - - /// - public bool ContainsKey(string key) => _values.ContainsKey(key); - - /// - void ICollection>.Add(KeyValuePair item) => - _values.Add(item); - - /// - bool ICollection>.Contains(KeyValuePair item) => - _values.Contains(item); - - /// - void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => - _values.CopyTo(array, arrayIndex); - - /// - public IEnumerator> GetEnumerator() => - _values.GetEnumerator(); - - /// - IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); - - /// - public bool Remove(string key) => _values.Remove(key); - - /// - bool ICollection>.Remove(KeyValuePair item) => - _values.Remove(item); - - /// - public void Clear() => _values.Clear(); - #endregion IDictionary - - /// - public override string ToString() - { - // Write the document as JSON. This is expensive but helpful. - using var stream = new MemoryStream(); - using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions { Indented = true }); - JsonExtensions.WriteSearchDocument(writer, this, JsonExtensions.SerializerOptions); - writer.Flush(); - return Encoding.UTF8.GetString(stream.ToArray()); - } - } - - /// - /// Convert JSON to and from a SearchDocument. - /// - internal class SearchDocumentConverter : JsonConverter - { - public static SearchDocumentConverter Shared { get; } = - new SearchDocumentConverter(); - - /// - /// Write a SearchDocument as JSON. - /// - /// The JSON writer. - /// The document. - /// Serialization options. - public override void Write( - Utf8JsonWriter writer, - SearchDocument value, - JsonSerializerOptions options) - { - Argument.AssertNotNull(writer, nameof(writer)); - Argument.AssertNotNull(value, nameof(value)); - Argument.AssertNotNull(options, nameof(options)); - JsonExtensions.WriteSearchDocument( - writer, - value, - options); - } - - /// - /// Parse JSON into a SearchDocument. - /// - /// The JSON reader. - /// The type to convert to. - /// Serialization options. - /// A deserialized SearchDocument. - public override SearchDocument Read( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options) - { - Argument.AssertNotNull(typeToConvert, nameof(typeToConvert)); - Argument.AssertNotNull(options, nameof(options)); - return JsonExtensions.ReadSearchDocument( - ref reader, - typeToConvert, - options); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument/DynamicData.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument/DynamicData.cs new file mode 100644 index 000000000000..948d9320a0cf --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/SearchDocument/DynamicData.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#if EXPERIMENTAL_DYNAMIC + +using System; +using System.Collections.Generic; +using System.Dynamic; +using System.Linq.Expressions; +using System.Reflection; + +namespace Azure.Core +{ + /// + /// Represents an untyped, structured document returned from or provided to + /// service operations. It can be accessed as either a dynamic object or a + /// dictionary. + /// + public partial class DynamicData : IDynamicMetaObjectProvider + { + /// + /// Initializes a new instance of the DynamicData class. + /// + public DynamicData() : this(null) { } + + /// + /// Initializes a new instance of the DynamicData class with initial + /// values. + /// + /// Initial values of the document. + public DynamicData(IDictionary values) => + _values = values != null ? + new Dictionary(values) : + new Dictionary(); + + /// + DynamicMetaObject IDynamicMetaObjectProvider.GetMetaObject(Expression parameter) => + new MetaObject(parameter, this); + + /// + /// Meta-object wrapping + /// and . + /// + /// Read "Implementing Dynamic Interfaces" by Bill Wagner for more + /// information about what these meta-objects are doing. + /// + private class MetaObject : DynamicMetaObject + { + /// + /// Reference to . + /// + private static readonly MethodInfo s_getter = + typeof(DynamicData).GetMethod( + nameof(GetValue), + BindingFlags.NonPublic | BindingFlags.Instance, + null, + new Type[] { typeof(string), typeof(Type) }, + null); + + /// + /// Reference to . + /// + private static readonly MethodInfo s_setter = + typeof(DynamicData).GetMethod( + nameof(SetValue), + BindingFlags.NonPublic | BindingFlags.Instance); + + /// + /// Creates a new MetaObject. + /// + /// The expression invoking the dynamic operation. + /// The instance. + public MetaObject(Expression expression, IDynamicMetaObjectProvider value) : + base(expression, BindingRestrictions.Empty, value) + { + } + + /// + /// Build a dynamic meta-object that represents calling either + /// GetValue(name, type) or SetValue(name, value). + /// + /// The method to invoke. + /// The argument expressions. + /// The meta-object for the invocation. + private DynamicMetaObject BuildMetaObject(MethodInfo method, params Expression[] arguments) => + new DynamicMetaObject( + Expression.Call( + Expression.Convert(Expression, LimitType), + method, + arguments), + BindingRestrictions.GetTypeRestriction(Expression, LimitType)); + + /// + public override DynamicMetaObject BindGetMember(GetMemberBinder binder) => + BuildMetaObject( + s_getter, + Expression.Constant(binder.Name), + Expression.Constant(binder.ReturnType ?? typeof(object))); + + /// + public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) => + BuildMetaObject( + s_setter, + Expression.Constant(binder.Name), + Expression.Convert(value.Expression, typeof(object))); + } + } +} +#endif diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Core.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Core.cs new file mode 100644 index 000000000000..470db60df034 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Core.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using Azure.Core; + +// This logic belongs in DynamicData, but they may not ship at the same time +// so we optionally compile a private version of it into SearchDocument. +#if EXPERIMENTAL_DYNAMIC +namespace Azure.Core +{ + public partial class DynamicData +#else +namespace Azure.Search.Documents.Models +{ + public partial class SearchDocument +#endif + { + /// + /// The document properties. + /// + private readonly IDictionary _values = null; + + /// + /// Set a document property. + /// + /// The property name. + /// The property value. + private protected void SetValue(string name, object value) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + _values[name] = value; + } + + /// + /// Get a document property. + /// + /// The expected type of the property value. + /// The property name. + /// The value of the property. + private protected T GetValue(string name) => (T)GetValue(name, typeof(T)); + + /// + /// Get a document property. + /// + /// The property name. + /// The expected type of the property value. + /// The value of the property. + private protected object GetValue(string name, Type type = null) + { + if (!TryGetValue(name, type, out object value)) + { + KeyNotFoundException exception = new KeyNotFoundException( + "Could not find a member called '" + name + "' in the document."); + exception.Data["MissingName"] = name; + throw exception; + } + return value; + } + + /// + /// Try to get a document property. + /// + /// The property name. + /// The expected type of the property value. + /// The value of the property if found. + /// A value indicating whether the property was found. + private protected bool TryGetValue(string name, Type type, out object value) + { + if (string.IsNullOrEmpty(name)) + { + value = null; + return false; + } + + type ??= typeof(object); + bool found = _values.TryGetValue(name, out value); + if (found && type != typeof(object)) + { + value = ConvertValue(value, type); + } + return found; + } + + /// + /// Attempt to convert a value to the desired type. This is full of + /// Search specific conversions and I'd expect to be able to override + /// a base version of this provided by DynamicData. + /// + /// The value to convert. + /// The type to convert to. + /// The converted value. + private protected static object ConvertValue(object value, Type type) + { + // Short circuit values that are already in the right format + if (value == null || type == null || type.IsAssignableFrom(value.GetType())) + { + return value; + } + + // Just unwrap Nullable<>s since we've already handled null above + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + Type elementType = type.GetGenericArguments()[0]; + return ConvertValue(value, elementType); + } + + // Arrays deserialize as object[] but we usually want T[] + if (type.IsArray && type.GetArrayRank() == 1 && value is Array values) + { + Type elementType = type.GetElementType(); + int length = values.Length; + Array converted = Array.CreateInstance(elementType, length); + for (int i = 0; i < length; i++) + { + converted.SetValue( + ConvertValue(values.GetValue(i), elementType), + i); + } + return converted; + } + + // Special case DateTime/DateTimeOffset/and textual doubles that we + // don't convert until a user requests them in a given format + if (value is string text) + { + if (type == typeof(DateTime) && + DateTime.TryParse(text, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime date)) + { + return date; + } + else if (type == typeof(DateTimeOffset) && + DateTimeOffset.TryParse(text, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTimeOffset dateOffset)) + { + return dateOffset; + } + else if (type == typeof(double)) + { + if (string.Equals(text, Constants.NanValue, StringComparison.Ordinal)) + { + return double.NaN; + } + else if (string.Equals(text, Constants.InfValue, StringComparison.Ordinal)) + { + return double.PositiveInfinity; + } + else if (string.Equals(text, Constants.NegativeInfValue, StringComparison.Ordinal)) + { + return double.NegativeInfinity; + } + } + } + + // Otherwise we'll use Convert.ChangeType on primitives, except we + // don't want to turn bools to/from numbers, strings to/from other + // types, or cast doubles to integral types + bool canChange = + type.IsPrimitive && + !(value is bool) && type != typeof(bool) && + !(value is string) && type != typeof(string) && + (!(value is double) || (type != typeof(int) && type != typeof(long))); + if (canChange) + { + value = Convert.ChangeType(value, type, CultureInfo.InvariantCulture); + } + + return value; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Dictionary.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Dictionary.cs new file mode 100644 index 000000000000..41d9351cdab1 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.Dictionary.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; + +// This logic belongs in DynamicData, but they may not ship at the same time +// so we optionally compile a version of it into SearchDocument. +#if EXPERIMENTAL_DYNAMIC +namespace Azure.Core +{ + public partial class DynamicData +#else +namespace Azure.Search.Documents.Models +{ + public partial class SearchDocument +#endif + : IDictionary + { + /// + public object this[string key] + { + get => GetValue(key); + set => SetValue(key, value); + } + + /// + public bool TryGetValue(string key, out object value) => + TryGetValue(key, typeof(object), out value); + + /// + public ICollection Keys => _values.Keys; + + /// + ICollection IDictionary.Values => _values.Values; + + /// + public int Count => _values.Count; + + /// + bool ICollection>.IsReadOnly => _values.IsReadOnly; + + /// + public void Add(string key, object value) => SetValue(key, value); + + /// + public bool ContainsKey(string key) => _values.ContainsKey(key); + + /// + void ICollection>.Add(KeyValuePair item) => + SetValue(item.Key, item.Value); + + /// + bool ICollection>.Contains(KeyValuePair item) => + _values.Contains(item); + + /// + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + _values.CopyTo(array, arrayIndex); + + /// + public IEnumerator> GetEnumerator() => + _values.GetEnumerator(); + + /// + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); + + /// + public bool Remove(string key) => _values.Remove(key); + + /// + bool ICollection>.Remove(KeyValuePair item) => + _values.Remove(item); + + /// + public void Clear() => _values.Clear(); + } +} diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.cs new file mode 100644 index 000000000000..c7fed3160520 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocument.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif + +namespace Azure.Search.Documents.Models +{ + /// + /// Represents an untyped document returned from a search or document + /// lookup. It can be accessed as either a dynamic object or a dictionary. + /// + [JsonConverter(typeof(SearchDocumentConverter))] + public partial class SearchDocument +#if EXPERIMENTAL_DYNAMIC + : DynamicData +#endif + { + /// + /// Initializes a new instance of the SearchDocument class. + /// + public SearchDocument() : this(null) { } + +#if EXPERIMENTAL_DYNAMIC + /// + /// Initializes a new instance of the SearchDocument class with initial + /// values. + /// + /// Initial values of the document. + public SearchDocument(IDictionary values) : base(values) { } +#else + /// + /// Initializes a new instance of the SearchDocument class with initial + /// values. + /// + /// Initial values of the document. + public SearchDocument(IDictionary values) => + _values = values != null ? + new Dictionary(values) : + new Dictionary(); +#endif + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public bool? GetBoolean(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetBooleanCollection(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public int? GetInt32(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetInt32Collection(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public long? GetInt64(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetInt64Collection(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public double? GetDouble(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetDoubleCollection(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public DateTimeOffset? GetDateTimeOffset(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetDateTimeOffsetCollection(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public string GetString(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetStringCollection(string key) => GetValue(key); + +#if EXPERIMENTAL_SPATIAL + /// + /// Get the value of a 's + /// property called + /// . + /// + /// The name of the property. + /// The value of the property. + public PointGeometry GetPoint(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetPointCollection(string key) => GetValue(key); +#endif + + /// + /// Get the value of a 's + /// complex property called + /// . + /// + /// The name of the property. + /// The value of the property. + public SearchDocument GetObject(string key) => GetValue(key); + + /// + /// Get the value of a 's + /// complex collection property called + /// . + /// + /// The name of the property. + /// The value of the property. + public IReadOnlyList GetObjectCollection(string key) => GetValue(key); + + /// + public override string ToString() + { + // Write the document as JSON. This is expensive, but helpful. + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream, new JsonWriterOptions { Indented = true }); + JsonSerialization.WriteSearchDocument(writer, this, JsonSerialization.SerializerOptions); + writer.Flush(); + return Encoding.UTF8.GetString(stream.ToArray()); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocumentConverter.cs b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocumentConverter.cs new file mode 100644 index 000000000000..25410b4f6219 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/SearchDocument/SearchDocumentConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + /// + /// Convert JSON to and from a SearchDocument. + /// + internal class SearchDocumentConverter : JsonConverter + { + public static SearchDocumentConverter Shared { get; } = + new SearchDocumentConverter(); + + /// + /// Write a SearchDocument as JSON. + /// + /// The JSON writer. + /// The document. + /// Serialization options. + public override void Write( + Utf8JsonWriter writer, + SearchDocument value, + JsonSerializerOptions options) + { + Argument.AssertNotNull(writer, nameof(writer)); + Argument.AssertNotNull(value, nameof(value)); + Argument.AssertNotNull(options, nameof(options)); + JsonSerialization.WriteSearchDocument( + writer, + value, + options); + } + + /// + /// Parse JSON into a SearchDocument. + /// + /// The JSON reader. + /// The type to convert to. + /// Serialization options. + /// A deserialized SearchDocument. + public override SearchDocument Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options) + { + Argument.AssertNotNull(typeToConvert, nameof(typeToConvert)); + Argument.AssertNotNull(options, nameof(options)); + return JsonSerialization.ReadSearchDocument( + ref reader, + typeToConvert, + options); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/SearchFilter.cs b/sdk/search/Azure.Search.Documents/src/SearchFilter.cs index 0ad7585d4275..33999f384e2d 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchFilter.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchFilter.cs @@ -4,6 +4,10 @@ using System; using System.Globalization; using System.Text; +#if EXPERIMENTAL_SPATIAL +using Azure.Core; +using Azure.Core.Spatial; +#endif namespace Azure.Search.Documents { @@ -63,14 +67,22 @@ public static string Create(FormattableString filter, IFormatProvider formatProv decimal x => x.ToString(formatProvider), // Floating point - float x => JsonExtensions.Float(x, formatProvider), - double x => JsonExtensions.Double(x, formatProvider), + float x => JsonSerialization.Float(x, formatProvider), + double x => JsonSerialization.Double(x, formatProvider), // Dates as 8601 with a time zone - DateTimeOffset x => JsonExtensions.Date(x, formatProvider), - DateTime x => JsonExtensions.Date(x, formatProvider), + DateTimeOffset x => JsonSerialization.Date(x, formatProvider), + DateTime x => JsonSerialization.Date(x, formatProvider), - // TODO: #10592- Unify on an Azure.Core spatial type +#if EXPERIMENTAL_SPATIAL + // Points + GeometryPosition x => EncodeGeometry(x), + PointGeometry x => EncodeGeometry(x), + + // Polygons + LineGeometry x => EncodeGeometry(x), + PolygonGeometry x => EncodeGeometry(x), +#endif // Text string x => Quote(x), @@ -109,5 +121,102 @@ private static string Quote(string text) builder.Append("'"); return builder.ToString(); } + +#if EXPERIMENTAL_SPATIAL + /// + /// Convert a to an OData value. + /// + /// The position. + /// The OData representation of the position. + private static string EncodeGeometry(GeometryPosition position) + { + const int maxLength = + 19 + // "geography'POINT( )'".Length + 2 * // Lat and Long each have: + (15 + // Maximum precision for a double (without G17) + 1 + // Optional decimal point + 1); // Optional negative sign + StringBuilder odata = new StringBuilder(maxLength); + odata.Append("geography'POINT("); + odata.Append(JsonSerialization.Double(position.Longitude, CultureInfo.InvariantCulture)); + odata.Append(" "); + odata.Append(JsonSerialization.Double(position.Latitude, CultureInfo.InvariantCulture)); + odata.Append(")'"); + return odata.ToString(); + } + + /// + /// Convert a to an OData value. + /// + /// The point. + /// The OData representation of the point. + private static string EncodeGeometry(PointGeometry point) + { + Argument.AssertNotNull(point, nameof(point)); + return EncodeGeometry(point.Position); + } + + /// + /// Convert a forming a polygon to an OData + /// value. A LineGeometry must have at least four + /// and the first and last must + /// match to form a searchable polygon. + /// + /// The line forming a polygon. + /// The OData representation of the line. + private static string EncodeGeometry(LineGeometry line) + { + Argument.AssertNotNull(line, nameof(line)); + Argument.AssertNotNull(line.Positions, $"{nameof(line)}.{nameof(line.Positions)}"); + if (line.Positions.Count < 4) + { + throw new ArgumentException( + $"A {nameof(LineGeometry)} must have at least four {nameof(LineGeometry.Positions)} to form a searchable polygon.", + $"{nameof(line)}.{nameof(line.Positions)}"); + } + else if (line.Positions[0] != line.Positions[line.Positions.Count - 1]) + { + throw new ArgumentException( + $"A {nameof(LineGeometry)} must have matching first and last {nameof(LineGeometry.Positions)} to form a searchable polygon.", + $"{nameof(line)}.{nameof(line.Positions)}"); + } + + Argument.AssertInRange(line.Positions?.Count ?? 0, 4, int.MaxValue, $"{nameof(line)}.{nameof(line.Positions)}"); + + StringBuilder odata = new StringBuilder(); + odata.Append("geography'POLYGON(("); + bool first = true; + foreach (GeometryPosition position in line.Positions) + { + if (!first) { odata.Append(","); } + first = false; + odata.Append(JsonSerialization.Double(position.Longitude, CultureInfo.InvariantCulture)); + odata.Append(" "); + odata.Append(JsonSerialization.Double(position.Latitude, CultureInfo.InvariantCulture)); + } + odata.Append("))'"); + return odata.ToString(); + } + + /// + /// Convert a to an OData value. A + /// PolygonGeometry must have exactly one + /// to form a searchable polygon. + /// + /// The polygon. + /// The OData representation of the polygon. + private static string EncodeGeometry(PolygonGeometry polygon) + { + Argument.AssertNotNull(polygon, nameof(polygon)); + Argument.AssertNotNull(polygon.Rings, $"{nameof(polygon)}.{nameof(polygon.Rings)}"); + if (polygon.Rings.Count != 1) + { + throw new ArgumentException( + $"A {nameof(PolygonGeometry)} must have exactly one {nameof(PolygonGeometry.Rings)} to form a searchable polygon.", + $"{nameof(polygon)}.{nameof(polygon.Rings)}"); + } + return EncodeGeometry(polygon.Rings[0]); + } +#endif } } diff --git a/sdk/search/Azure.Search.Documents/src/Serialization/JsonExtensions.cs b/sdk/search/Azure.Search.Documents/src/Serialization/JsonExtensions.cs deleted file mode 100644 index 43a258f2c8be..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Serialization/JsonExtensions.cs +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Buffers; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Search.Documents.Models; - -namespace Azure.Search.Documents -{ - /// - /// JSON serialization and conversion helpers. - /// - internal static class JsonExtensions - { - /// - /// Default JsonSerializerOptions to use. - /// - public static JsonSerializerOptions SerializerOptions { get; } = - new JsonSerializerOptions().AddSearchConverters(); - - /// - /// Add all of the Search JsonConverters. - /// - /// Serialization options. - /// Serialization options. - public static JsonSerializerOptions AddSearchConverters(this JsonSerializerOptions options) - { - options ??= new JsonSerializerOptions(); - options.Converters.Add(SearchDoubleConverter.Shared); - options.Converters.Add(SearchDateTimeOffsetConverter.Shared); - options.Converters.Add(SearchDateTimeConverter.Shared); - options.Converters.Add(SearchDocumentConverter.Shared); - return options; - } - - /// - /// Format floating point values. - /// - /// Float. - /// Format Provider. - /// OData string. - public static string Float(float value, IFormatProvider formatProvider) => - value switch - { - float.NegativeInfinity => Constants.NegativeInfValue, - float.PositiveInfinity => Constants.InfValue, - float x when float.IsNaN(x) => Constants.NanValue, - float x => x.ToString(formatProvider).ToLowerInvariant() - }; - - /// - /// Format floating point values. - /// - /// Double. - /// Format Provider. - /// OData string. - public static string Double(double value, IFormatProvider formatProvider) => - value switch - { - double.NegativeInfinity => Constants.NegativeInfValue, - double.PositiveInfinity => Constants.InfValue, - double x when double.IsNaN(x) => Constants.NanValue, - double x => x.ToString(formatProvider).ToLowerInvariant() - }; - - /// - /// Format dates. - /// - /// Date - /// Format Provider. - /// OData string. - public static string Date(DateTime value, IFormatProvider formatProvider) => - Date( - value.Kind == DateTimeKind.Unspecified ? - new DateTimeOffset(value, TimeSpan.Zero) : - new DateTimeOffset(value), - formatProvider); - - /// - /// Format dates. - /// - /// Date - /// Format Provider. - /// OData string. - public static string Date(DateTimeOffset value, IFormatProvider formatProvider) => - value.ToString("o", formatProvider); - - /// - /// Parse JSON into a SearchDocument. - /// - /// The JSON reader. - /// The type to convert to. - /// Serialization options. - /// - /// Depth of the current read recursion to bail out of circular - /// references. - /// - /// A deserialized SearchDocument. - public static SearchDocument ReadSearchDocument( - ref Utf8JsonReader reader, - Type typeToConvert, - JsonSerializerOptions options, - int? recursionDepth = null) - { - Debug.Assert(typeToConvert != null); - Debug.Assert(typeToConvert.IsAssignableFrom(typeof(SearchDocument))); - - recursionDepth ??= options.GetMaxRecursionDepth(); - AssertRecursionDepth(recursionDepth.Value); - - SearchDocument doc = new SearchDocument(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - string propertyName = reader.ExpectsPropertyName(); - - // Ignore OData properties - we don't expose those on custom - // user schemas - if (!propertyName.StartsWith(Constants.ODataKeyPrefix, StringComparison.OrdinalIgnoreCase)) - { - object value = ReadSearchDocObject(ref reader, recursionDepth.Value - 1); - doc[propertyName] = value; - } - else - { - reader.Skip(); - } - } - return doc; - - // TODO: #10596 - Investigate using JsonSerializer for reading SearchDocument properties - - // The built in converters for JsonSerializer are a little more - // helpful than we want right now and will do things like turn "1" - // to the integer 1 instead of a string. The number of special - // cases needed for converting dynamic documents is small enough - // that we're hard coding them here for now. We'll revisit with - // Search experts and their customer scenarios to get this right in - // the next preview. - object ReadSearchDocObject(ref Utf8JsonReader reader, int depth) - { - AssertRecursionDepth(depth); - switch (reader.TokenType) - { - case JsonTokenType.String: - case JsonTokenType.Number: - case JsonTokenType.True: - case JsonTokenType.False: - case JsonTokenType.None: - case JsonTokenType.Null: - return ReadPrimitiveValue(ref reader); - case JsonTokenType.StartObject: - // TODO: #10592- Unify on an Azure.Core spatial type - - // Return a complex object - return ReadSearchDocument(ref reader, typeof(SearchDocument), options, depth - 1); - case JsonTokenType.StartArray: - var list = new List(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - recursionDepth--; - object value = ReadSearchDocObject(ref reader, depth - 1); - list.Add(value); - } - return list.ToArray(); - default: - throw new JsonException(); - } - } - } - - /// - /// Read a primitive value from the head of a JSON reader. - /// - /// The JSON reader. - /// The value. - private static object ReadPrimitiveValue(ref Utf8JsonReader reader) - { - switch (reader.TokenType) - { - case JsonTokenType.String: - return reader.GetString() switch - { - Constants.NanValue => double.NaN, - Constants.InfValue => double.PositiveInfinity, - Constants.NegativeInfValue => double.NegativeInfinity, - string text => - // JsonReader's TryGetDateTimeOffset doesn't play - // nicely with time zones so we'll do our own parse - DateTimeOffset.TryParse(text, out DateTimeOffset date) ? - (object)date : - (object)text - }; - case JsonTokenType.Number: - if (reader.TryGetInt32(out int intValue)) { return intValue; } - if (reader.TryGetInt64(out long longValue)) { return longValue; } - return reader.GetDouble(); - case JsonTokenType.True: - return true; - case JsonTokenType.False: - return false; - case JsonTokenType.None: - case JsonTokenType.Null: - default: - return null; - } - } - - /// - /// Read a .NET object from the head of a JSON reader. - /// - /// The JSON reader. - /// JSON serializer options. - /// - /// Depth of the current read recursion to bail out of circular - /// references. - /// - /// The object. - public static object ReadObject( - this ref Utf8JsonReader reader, - JsonSerializerOptions options, - int? recursionDepth = null) - { - Debug.Assert(options != null); - recursionDepth ??= options.GetMaxRecursionDepth(); - AssertRecursionDepth(recursionDepth.Value); - - switch (reader.TokenType) - { - case JsonTokenType.String: - case JsonTokenType.Number: - case JsonTokenType.True: - case JsonTokenType.False: - case JsonTokenType.None: - case JsonTokenType.Null: - return ReadPrimitiveValue(ref reader); - case JsonTokenType.StartObject: - // TODO: #10592- Unify on an Azure.Core spatial type - - // Return a complex object - IDictionary obj = new Dictionary(); - reader.Expects(JsonTokenType.StartObject); - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - string property = reader.ExpectsPropertyName(); - object value = ReadObject(ref reader, options, recursionDepth - 1); - obj[property] = value; - } - return obj; - case JsonTokenType.StartArray: - var list = new List(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - object value = ReadObject(ref reader, options, recursionDepth - 1); - list.Add(value); - } - return list.ToArray(); - default: - throw new JsonException(); - } - } - - /// - /// Serialize a SearchDocument as JSON. - /// - /// JSON writer. - /// The document. - /// Serialization options. - public static void WriteSearchDocument( - Utf8JsonWriter writer, - SearchDocument document, - JsonSerializerOptions options) - { - Debug.Assert(writer != null); - Debug.Assert(document != null); - Debug.Assert(options != null); - - writer.WriteStartObject(); - foreach (string key in document.Keys) - { - writer.WritePropertyName(key); - object value = document[key]; - - // Write the value using JsonSerializer so all of our - // converters take effect - JsonSerializer.Serialize( - writer, - value, - value?.GetType() ?? typeof(object), - options); - } - writer.WriteEndObject(); - } - - /// - /// Get the default max recursion depth. - /// - /// Serialization options. - /// The default max recursion depth. - public static int GetMaxRecursionDepth(this JsonSerializerOptions options) - { - int depth = options?.MaxDepth ?? Constants.MaxJsonRecursionDepth; - if (depth <= 0) - { - // JsonSerializerOptions uses 0 to mean pick their default of 64 - depth = Constants.MaxJsonRecursionDepth; - } - return depth; - } - - /// - /// Throw if we've recursed beyond the maximum recursion depth. - /// - /// Current depth. - public static void AssertRecursionDepth(int depth) - { - if (depth <= 0) - { - throw new JsonException("Exceeded maximum recursion depth."); - } - } - - /// - /// Verify that the next token to be read matches our expectation or - /// throw an exception otherwise. - /// - /// The JSON reader. - /// The expected token type. - public static void Expects( - this in Utf8JsonReader reader, - JsonTokenType expected) - { - if (reader.TokenType != expected) - { - throw new JsonException( - $"Expected {nameof(JsonTokenType)} " + - expected.ToString() + - ", not " + - reader.TokenType.ToString()); - } - } - - /// - /// Verify and read the next property name. - /// - /// The JSON reader. - /// The name of the next property. - public static string ExpectsPropertyName(this ref Utf8JsonReader reader) - { - reader.Expects(JsonTokenType.PropertyName); - string name = reader.GetString(); - reader.Read(); // Advance past property names after we read them - return name; - } - - /// - /// Verify and read the next string value. - /// - /// The JSON reader. - /// The next string value. - public static string ExpectsString(this ref Utf8JsonReader reader) - { - reader.Expects(JsonTokenType.String); - return reader.GetString(); - } - - /// - /// Verify and read the next double? value. - /// - /// The JSON reader. - /// The next double? value. - public static double? ExpectsNullableDouble( - this ref Utf8JsonReader reader) - { - if (reader.TokenType == JsonTokenType.Null) - { - return null; - } - reader.Expects(JsonTokenType.Number); - return reader.GetDouble(); - } - - /// - /// Verify and read the next long? value. - /// - /// The JSON reader. - /// The next long? value. - public static long? ExpectsNullableLong( - this ref Utf8JsonReader reader) - { - if (reader.TokenType == JsonTokenType.Null) - { - return null; - } - reader.Expects(JsonTokenType.Number); - return reader.GetInt64(); - } - - /// - /// Deserialize a JSON stream. - /// - /// - /// The target type to deserialize the JSON stream into. - /// - /// A JSON stream. - /// - /// Optional to propagate notifications - /// that the operation should be canceled. - /// - /// A deserialized object. - public static async Task DeserializeAsync( - this Stream json, - CancellationToken cancellationToken) - { - if (json is null) - { - return default; - } - else - { - return await JsonSerializer.DeserializeAsync( - json, - JsonExtensions.SerializerOptions, - cancellationToken) - .ConfigureAwait(false); - } - } - - /// - /// Deserialize a JSON stream. - /// - /// - /// The target type to deserialize the JSON stream into. - /// - /// A JSON stream. - /// A deserialized object. - public static T Deserialize(this Stream json) - { - // Short circuit for empty/erroneous streams. - if (json is null) - { - return default; - } - - int written = 0; - byte[] rented = null; - ReadOnlySpan utf8Bom = Constants.Utf8Bom; - try - { - if (json.CanSeek) - { - // Ask for 1 more than the length to avoid resizing later, - // which is unnecessary in the common case where the stream - // length doesn't change. - long expectedLength = Math.Max(utf8Bom.Length, json.Length - json.Position) + 1; - rented = ArrayPool.Shared.Rent(checked((int)expectedLength)); - } - else - { - rented = ArrayPool.Shared.Rent(Constants.UnseekableStreamInitialRentSize); - } - - // Read up to 3 bytes to see if it's the UTF-8 BOM - int lastRead; - do - { - // No need for checking for growth, the minimal rent sizes - // both guarantee it'll fit. - Debug.Assert(rented.Length >= utf8Bom.Length); - lastRead = json.Read(rented, written, utf8Bom.Length - written); - written += lastRead; - } while (lastRead > 0 && written < utf8Bom.Length); - - // If we have 3 bytes, and they're the BOM, reset the write - // position to 0. - if (written == utf8Bom.Length && - utf8Bom.SequenceEqual(rented.AsSpan(0, utf8Bom.Length))) - { - written = 0; - } - - do - { - if (rented.Length == written) - { - byte[] toReturn = rented; - rented = ArrayPool.Shared.Rent(checked(toReturn.Length * 2)); - Buffer.BlockCopy(toReturn, 0, rented, 0, toReturn.Length); - - // Holds document content, clear it. - ArrayPool.Shared.Return(toReturn, clearArray: true); - } - - lastRead = json.Read(rented, written, rented.Length - written); - written += lastRead; - } while (lastRead > 0); - - // Deserialize the JSON once we've copied it over - return JsonSerializer.Deserialize(rented.AsSpan(0, written), JsonExtensions.SerializerOptions); - } - finally - { - if (rented != null) - { - // Holds document content, clear it before returning it. - rented.AsSpan(0, written).Clear(); - ArrayPool.Shared.Return(rented); - } - } - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Serialization/JsonSerialization.cs b/sdk/search/Azure.Search.Documents/src/Serialization/JsonSerialization.cs new file mode 100644 index 000000000000..1257128375fb --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Serialization/JsonSerialization.cs @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents +{ + /// + /// JSON serialization and conversion helpers. + /// + internal static class JsonSerialization + { + /// + /// Default JsonSerializerOptions to use. + /// + public static JsonSerializerOptions SerializerOptions { get; } = + new JsonSerializerOptions().AddSearchConverters(); + + /// + /// Add all of the Search JsonConverters. + /// + /// Serialization options. + /// Serialization options. + public static JsonSerializerOptions AddSearchConverters(this JsonSerializerOptions options) + { + options ??= new JsonSerializerOptions(); + options.Converters.Add(SearchDoubleConverter.Shared); + options.Converters.Add(SearchDateTimeOffsetConverter.Shared); + options.Converters.Add(SearchDateTimeConverter.Shared); + options.Converters.Add(SearchDocumentConverter.Shared); +#if EXPERIMENTAL_SPATIAL + options.Converters.Add(new GeometryJsonConverter()); +#endif + return options; + } + + /// + /// Format floating point values. + /// + /// Float. + /// Format Provider. + /// OData string. + public static string Float(float value, IFormatProvider formatProvider) => + value switch + { + float.NegativeInfinity => Constants.NegativeInfValue, + float.PositiveInfinity => Constants.InfValue, + float x when float.IsNaN(x) => Constants.NanValue, + float x => x.ToString(formatProvider).ToLowerInvariant() + }; + + /// + /// Format floating point values. + /// + /// Double. + /// Format Provider. + /// OData string. + public static string Double(double value, IFormatProvider formatProvider) => + value switch + { + double.NegativeInfinity => Constants.NegativeInfValue, + double.PositiveInfinity => Constants.InfValue, + double x when double.IsNaN(x) => Constants.NanValue, + double x => x.ToString(formatProvider).ToLowerInvariant() + }; + + /// + /// Format dates. + /// + /// Date + /// Format Provider. + /// OData string. + public static string Date(DateTime value, IFormatProvider formatProvider) => + Date( + value.Kind == DateTimeKind.Unspecified ? + new DateTimeOffset(value, TimeSpan.Zero) : + new DateTimeOffset(value), + formatProvider); + + /// + /// Format dates. + /// + /// Date + /// Format Provider. + /// OData string. + public static string Date(DateTimeOffset value, IFormatProvider formatProvider) => + value.ToString("o", formatProvider); + + /// + /// Get a stream representation of a JsonElement. This is an + /// inefficient hack to let us rip out nested sub-documents + /// representing different model types and pass them to + /// ObjectSerializer. + /// + /// The JsonElement. + /// The JsonElement's content wrapped in a Stream. + public static Stream ToStream(this JsonElement element) => + new MemoryStream( + Encoding.UTF8.GetBytes( + element.GetRawText())); + + /// + /// Convert a JSON value into a .NET object relative to Search's EDM + /// types. + /// + /// The JSON element. + /// A corresponding .NET value. + public static object GetSearchObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString() switch + { + Constants.NanValue => double.NaN, + Constants.InfValue => double.PositiveInfinity, + Constants.NegativeInfValue => double.NegativeInfinity, + string text => + DateTimeOffset.TryParse(text, out DateTimeOffset date) ? + (object)date : + (object)text + }; + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) { return intValue; } + if (element.TryGetInt64(out long longValue)) { return longValue; } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (JsonProperty jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetSearchObject()); + } +#if EXPERIMENTAL_SPATIAL + // Check if we've got a Point instead of a complex type + if (dictionary.TryGetValue("type", out object type) && + type is string typeName && + string.Equals(typeName, "Point", StringComparison.Ordinal) && + dictionary.TryGetValue("coordinates", out object coordArray) && + coordArray is double[] coords && + (coords.Length == 2 || coords.Length == 3)) + { + double longitude = coords[0]; + double latitude = coords[1]; + double? altitude = coords.Length == 3 ? (double?)coords[2] : null; + // TODO: Should we also pull in other PointGeometry properties? + return new PointGeometry(new GeometryPosition(longitude, latitude, altitude)); + } +#endif + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (JsonElement item in element.EnumerateArray()) + { + list.Add(item.GetSearchObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException("Not supported value kind " + element.ValueKind); + } + } + + /// + /// Parse JSON into a SearchDocument. + /// + /// The JSON reader. + /// The type to convert to. + /// Serialization options. + /// + /// Depth of the current read recursion to bail out of circular + /// references. + /// + /// A deserialized SearchDocument. + public static SearchDocument ReadSearchDocument( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options, + int? recursionDepth = null) + { + Debug.Assert(typeToConvert != null); + Debug.Assert(typeToConvert.IsAssignableFrom(typeof(SearchDocument))); + + recursionDepth ??= options?.MaxDepth ?? Constants.MaxJsonRecursionDepth; + if (!recursionDepth.HasValue || recursionDepth.Value <= 0) + { + // JsonSerializerOptions uses 0 to mean pick their default of 64 + recursionDepth = Constants.MaxJsonRecursionDepth; + } + if (recursionDepth.Value < 0) { throw new JsonException("Exceeded maximum recursion depth."); } + + SearchDocument doc = new SearchDocument(); + Expects(reader, JsonTokenType.StartObject); + while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) + { + Expects(reader, JsonTokenType.PropertyName); + string propertyName = reader.GetString(); + reader.Read(); // Advance the past the property name + + // Ignore OData properties - we don't expose those on custom + // user schemas + if (!propertyName.StartsWith(Constants.ODataKeyPrefix, StringComparison.OrdinalIgnoreCase)) + { + object value = ReadSearchDocObject(ref reader, recursionDepth.Value - 1); + doc[propertyName] = value; + } + else + { + reader.Skip(); + } + } + return doc; + + object ReadSearchDocObject(ref Utf8JsonReader reader, int depth) + { + if (depth < 0) { throw new JsonException("Exceeded maximum recursion depth."); } + switch (reader.TokenType) + { + case JsonTokenType.String: + return reader.GetString(); + case JsonTokenType.Number: + if (reader.TryGetInt32(out int intValue)) { return intValue; } + if (reader.TryGetInt64(out long longValue)) { return longValue; } + return reader.GetDouble(); + case JsonTokenType.True: + return true; + case JsonTokenType.False: + return false; + case JsonTokenType.None: + case JsonTokenType.Null: + return null; + case JsonTokenType.StartObject: +#if EXPERIMENTAL_SPATIAL + // Clone the reader so we can check if the object is a + // GeoJsonPoint without advancing tokens if not + Utf8JsonReader clone = reader; + try + { + GeometryJsonConverter converter = new GeometryJsonConverter(); + PointGeometry point = converter.Read(ref clone, typeof(PointGeometry), options) as PointGeometry; + if (point != null) + { + reader = clone; + return point; + } + } + catch + { + } +#endif + + // Return a complex object + return ReadSearchDocument(ref reader, typeof(SearchDocument), options, depth - 1); + case JsonTokenType.StartArray: + var list = new List(); + while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) + { + object value = ReadSearchDocObject(ref reader, depth - 1); + list.Add(value); + } + return list.ToArray(); + default: + throw new JsonException(); + } + } + + static void Expects(in Utf8JsonReader reader, JsonTokenType expected) + { + if (reader.TokenType != expected) + { + throw new JsonException( + $"Expected {nameof(JsonTokenType)} " + + expected.ToString() + + ", not " + + reader.TokenType.ToString()); + } + } + } + + /// + /// Serialize a SearchDocument as JSON. + /// + /// JSON writer. + /// The document. + /// Serialization options. + public static void WriteSearchDocument( + Utf8JsonWriter writer, + SearchDocument document, + JsonSerializerOptions options) + { + Debug.Assert(writer != null); + Debug.Assert(document != null); + Debug.Assert(options != null); + + writer.WriteStartObject(); + foreach (string key in document.Keys) + { + writer.WritePropertyName(key); + object value = document[key]; + + // Write the value using JsonSerializer so all of our + // converters take effect + JsonSerializer.Serialize( + writer, + value, + value?.GetType() ?? typeof(object), + options); + } + writer.WriteEndObject(); + } + + #pragma warning disable CS1572 // Not all parameters will be used depending on feature flags + /// + /// Deserialize a JSON stream. + /// + /// + /// The target type to deserialize the JSON stream into. + /// + /// A JSON stream. + /// + /// Optional serializer that can be used to customize the serialization + /// of strongly typed models. + /// + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// A deserialized object. + public static async Task DeserializeAsync( + this Stream json, +#if EXPERIMENTAL_SERIALIZER + ObjectSerializer serializer, +#endif + bool async, + CancellationToken cancellationToken) + #pragma warning restore CS1572 + { + if (json is null) + { + return default; + } +#if EXPERIMENTAL_SERIALIZER + else if (serializer != null) + { + return async ? + (T)await serializer.DeserializeAsync(json, typeof(T)).ConfigureAwait(false) : + (T)serializer.Deserialize(json, typeof(T)); + } +#endif + else if (async) + { + return await JsonSerializer.DeserializeAsync( + json, + JsonSerialization.SerializerOptions, + cancellationToken) + .ConfigureAwait(false); + } + else + { + // Copy the stream into memory and then deserialize + using MemoryStream memory = json.CopyToMemoryStreamAsync(async, cancellationToken).EnsureCompleted(); + return JsonSerializer.Deserialize( + memory.ToArray(), + JsonSerialization.SerializerOptions); + } + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Serialization/ModelConverterFactory.cs b/sdk/search/Azure.Search.Documents/src/Serialization/ModelConverterFactory.cs deleted file mode 100644 index ebff59d2a746..000000000000 --- a/sdk/search/Azure.Search.Documents/src/Serialization/ModelConverterFactory.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Diagnostics; -using System.Reflection; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Azure.Search.Documents -{ - /// - /// Helper base for exposing - /// that correspond to wrappers around our - /// model types. - /// - internal abstract class ModelConverterFactory : JsonConverterFactory - { - /// - /// Type of the wrapper around our model type (i.e., - /// typeof(SearchResults{}) for example). - /// - protected abstract Type GenericType { get; } - - /// - /// Type of the JsonConverter for our GenericType. - /// - protected abstract Type GenericConverterType { get; } - - /// - /// Determine whether we need to construct the converter with our - /// JsonSerializerOptions. The default value is false. - /// - protected virtual bool ConstructWithOptions => false; - - /// - /// Checks if this converter can be used to convert JSON to the given - /// type. - /// - /// The type we want to convert to. - /// Whether the type can be converted. - public override bool CanConvert(Type typeToConvert) => - typeToConvert != null && - typeToConvert.IsGenericType && - typeToConvert.GetGenericTypeDefinition() == GenericType; - - /// - /// Create a concrete for the desired - /// model type. - /// - /// - /// The closed type we want to convert to. - /// - /// Serialization options. - /// A converter for the closed type. - public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) - { - Debug.Assert(CanConvert(typeToConvert)); - Debug.Assert(typeToConvert.GetGenericArguments()?.Length == 1); - Type modelType = typeToConvert.GetGenericArguments()[0]; - Type converterType = GenericConverterType.MakeGenericType(new[] { modelType }); - - // Create an instance of the closed type (and pass in the options - // if requested) - JsonConverter converter; - if (ConstructWithOptions) - { - converter = (JsonConverter)Activator.CreateInstance( - converterType, - BindingFlags.Instance | BindingFlags.Public, - binder: null, - args: new object[] { options }, - culture: null); - } - else - { - converter = (JsonConverter)Activator.CreateInstance(converterType); - } - return converter; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeConverter.cs b/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeConverter.cs index 27a2f841ae2c..7f81a0bf5373 100644 --- a/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeConverter.cs +++ b/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeConverter.cs @@ -37,7 +37,7 @@ public override void Write( { Argument.AssertNotNull(writer, nameof(writer)); Debug.Assert(options != null); - writer.WriteStringValue(JsonExtensions.Date(value, CultureInfo.InvariantCulture)); + writer.WriteStringValue(JsonSerialization.Date(value, CultureInfo.InvariantCulture)); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeOffsetConverter.cs b/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeOffsetConverter.cs index b3d110b261fe..1157cdf3ca6a 100644 --- a/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeOffsetConverter.cs +++ b/sdk/search/Azure.Search.Documents/src/Serialization/SearchDateTimeOffsetConverter.cs @@ -37,7 +37,7 @@ public override void Write( { Argument.AssertNotNull(writer, nameof(writer)); Debug.Assert(options != null); - writer.WriteStringValue(JsonExtensions.Date(value, CultureInfo.InvariantCulture)); + writer.WriteStringValue(JsonSerialization.Date(value, CultureInfo.InvariantCulture)); } } } diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs index e802dd2ac11b..5c0a8272bd85 100644 --- a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs +++ b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Text.Json; namespace Azure.Search.Documents { @@ -10,8 +11,6 @@ namespace Azure.Search.Documents /// internal static class Constants { - // TODO: #10596 - Switch constants to use JsonEncodedText - /// /// Gets "*" to select all fields, properties, or rows. /// @@ -45,47 +44,47 @@ internal static class Constants /// /// The @search.text key. /// - public const string SearchTextKey = "@search.text"; + public static readonly JsonEncodedText SearchTextKeyJson = JsonEncodedText.Encode("@search.text"); /// /// The @search.coverage key. /// - public const string SearchCoverageKey = "@search.coverage"; + public static readonly JsonEncodedText SearchCoverageKeyJson = JsonEncodedText.Encode("@search.coverage"); /// /// The @search.score key. /// - public const string SearchScoreKey = "@search.score"; + public static readonly JsonEncodedText SearchScoreKeyJson = JsonEncodedText.Encode("@search.score"); /// /// The @search.facets key. /// - public const string SearchFacetsKey = "@search.facets"; + public static readonly JsonEncodedText SearchFacetsKeyJson = JsonEncodedText.Encode("@search.facets"); /// /// The @search.nextPageParameters key. /// - public const string SearchNextPageKey = "@search.nextPageParameters"; + public static readonly JsonEncodedText SearchNextPageKeyJson = JsonEncodedText.Encode("@search.nextPageParameters"); /// /// The @search.highlights key. /// - public const string SearchHighlightsKey = "@search.highlights"; + public static readonly JsonEncodedText SearchHighlightsKeyJson = JsonEncodedText.Encode("@search.highlights"); /// /// The @search.action key. /// - public const string SearchActionKey = "@search.action"; + public static readonly JsonEncodedText SearchActionKeyJson = JsonEncodedText.Encode("@search.action"); /// /// The @odata.count key. /// - public const string ODataCountKey = "@odata.count"; + public static readonly JsonEncodedText ODataCountKeyJson = JsonEncodedText.Encode("@odata.count"); /// /// The @odata.nextLink key. /// - public const string ODataNextLinkKey = "@odata.nextLink"; + public static readonly JsonEncodedText ODataNextLinkKeyJson = JsonEncodedText.Encode("@odata.nextLink"); /// /// The name key. @@ -98,37 +97,40 @@ internal static class Constants public const string ValueKey = "value"; /// - /// The count key. + /// The value key. /// - public const string CountKey = "count"; + public static readonly JsonEncodedText ValueKeyJson = JsonEncodedText.Encode(ValueKey); /// - /// The to key. + /// The count key. /// - public const string FromKey = "from"; + public const string CountKey = "count"; /// - /// The from key. + /// The count key. /// - public const string ToKey = "to"; + public static readonly JsonEncodedText CountKeyJson = JsonEncodedText.Encode(CountKey); /// - /// Initial ArrayPool rental size for copying unseekable streams in - /// our sync method. + /// The to key. /// - public const int UnseekableStreamInitialRentSize = 4096; + public const string FromKey = "from"; /// - /// Byte order mark for a UTF8 document used by our sync - /// method. + /// The from key. /// - public static ReadOnlySpan Utf8Bom => new byte[] { 0xEF, 0xBB, 0xBF }; + public const string ToKey = "to"; /// /// The default recursion limit if we don't get a value from /// . /// The service limit is (currently) 10. /// - public static int MaxJsonRecursionDepth = 64; + public const int MaxJsonRecursionDepth = 64; + + /// + /// The default size of buffer to use when copying data between streams. + /// + public const int CopyBufferSize = 81920; } } diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/SearchExtensions.cs b/sdk/search/Azure.Search.Documents/src/Utilities/SearchExtensions.cs index 79de829dd8ca..961fca207df5 100644 --- a/sdk/search/Azure.Search.Documents/src/Utilities/SearchExtensions.cs +++ b/sdk/search/Azure.Search.Documents/src/Utilities/SearchExtensions.cs @@ -2,9 +2,14 @@ // Licensed under the MIT License. using System; +using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; namespace Azure.Search.Documents { @@ -69,5 +74,77 @@ public static IList CommaSplit(string value) => new List() : // TODO: #10600 - Verify we don't need to worry about escaping new List(value.Split(',')); + + /// + /// Copy from a source stream to a destination either synchronously or + /// asynchronously. + /// + /// The stream to read from. + /// The stream to write to. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// A Task representing the computation. + public static async Task CopyToAsync( + this Stream source, + Stream destination, + bool async, + CancellationToken cancellationToken) + { + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(destination, nameof(destination)); + + if (async) + { + await source.CopyToAsync( + destination, + Constants.CopyBufferSize, + cancellationToken) + .ConfigureAwait(false); + } + else + { + // This is not using CopyTo so we can honor cancellations + byte[] buffer = ArrayPool.Shared.Rent(Constants.CopyBufferSize); + try + { + while (true) + { + cancellationToken.ThrowIfCancellationRequested(); + int read = source.Read(buffer, 0, buffer.Length); + if (read <= 0) { break; } + cancellationToken.ThrowIfCancellationRequested(); + destination.Write(buffer, 0, read); + } + } + finally + { + destination.Flush(); + ArrayPool.Shared.Return(buffer, true); + } + } + } + + /// + /// Copy a Stream into memory. + /// + /// The stream to read. + /// Whether to execute sync or async. + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// The source stream as a MemoryStream. + public static async Task CopyToMemoryStreamAsync( + this Stream source, + bool async, + CancellationToken cancellationToken) + { + MemoryStream destination = new MemoryStream(); + await source.CopyToAsync(destination, async, cancellationToken).ConfigureAwait(false); + return destination; + } } } diff --git a/sdk/search/Azure.Search.Documents/tests/Azure.Search.Documents.Tests.csproj b/sdk/search/Azure.Search.Documents/tests/Azure.Search.Documents.Tests.csproj index 814b3f61d5d8..2162efa63c57 100644 --- a/sdk/search/Azure.Search.Documents/tests/Azure.Search.Documents.Tests.csproj +++ b/sdk/search/Azure.Search.Documents/tests/Azure.Search.Documents.Tests.csproj @@ -29,7 +29,7 @@ - + diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs index 47f4a1904408..4a6c6744540b 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/GetDocumentTests.cs @@ -94,23 +94,26 @@ public async Task GetDocumentDict() await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); - Response response = await client.GetDocumentAsync("3"); + Response response = await client.GetDocumentAsync("3"); Assert.AreEqual(200, response.GetRawResponse().Status); Assert.AreEqual("3", response.Value["hotelId"]); } +#if EXPERIMENTAL_DYNAMIC [Test] +#endif public async Task GetDocumentDynamic() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); - Response response = await client.GetDocumentAsync("3"); + Response response = await client.GetDocumentAsync("3"); dynamic hotel = response.Value; Assert.AreEqual(200, response.GetRawResponse().Status); Assert.AreEqual("3", hotel.hotelId); } + [Test] public async Task GetDocumentStatic() { @@ -182,7 +185,7 @@ await resources.GetSearchClient().IndexDocumentsAsync( IndexDocumentsBatch.Upload(new[] { document })); await resources.WaitForIndexingAsync(); - Response response = await resources.GetQueryClient().GetDocumentAsync((string)document["hotelId"]); + Response response = await resources.GetQueryClient().GetDocumentAsync((string)document["hotelId"]); Assert.AreEqual(document["hotelId"], response.Value["hotelId"]); } @@ -298,8 +301,7 @@ public async Task CannotAlwaysDetermineCorrectType() { ["hotelId"] = "1", ["hotelName"] = "2015-02-11T12:58:00Z", - // TODO: #10592- Unify on an Azure.Core spatial type - // ["location"] = GeographyPoint.Create(40.760586, -73.975403), // Test that we don't confuse Geo-JSON & complex types. + ["location"] = TestExtensions.CreatePoint(-73.975403, 40.760586), // Test that we don't confuse Geo-JSON & complex types. ["rooms"] = new[] { new SearchDocument @@ -315,14 +317,12 @@ await VerifyRoundtrip( { ["hotelId"] = "1", ["hotelName"] = new DateTimeOffset(2015, 2, 11, 12, 58, 0, TimeSpan.Zero), - // TODO: #10592- Unify on an Azure.Core spatial type - // ["location"] = GeographyPoint.Create(40.760586, -73.975403), + ["location"] = TestExtensions.CreatePoint(-73.975403, 40.760586), ["rooms"] = new[] { new SearchDocument { - // TODO: #10601 - Verify it's okay to change from "NaN" in the Track 1 tests - ["baseRate"] = double.NaN + ["baseRate"] = "NaN" } } }, @@ -466,8 +466,7 @@ await VerifyRoundtrip( SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1999, 9, 6, 0, 0, 0, TimeSpan.Zero), //aka.ms/sre-codescan/disable Rating = 3, - // TODO: #10592- Unify on an Azure.Core spatial type - // Location = GeographyPoint.Create(35.904160, -78.940483), + Location = TestExtensions.CreatePoint(-78.940483, 35.904160), Address = new HotelAddress() { StreetAddress = "6910 Fayetteville Rd", @@ -524,7 +523,7 @@ public async Task ThrowsWhenNotFound() await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); RequestFailedException ex = await CatchAsync( - async () => await client.GetDocumentAsync("ThisDocumentDoesNotExist")); + async () => await client.GetDocumentAsync("ThisDocumentDoesNotExist")); Assert.AreEqual(404, ex.Status); } @@ -534,7 +533,7 @@ public async Task ThrowsWhenMalformed() await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); RequestFailedException ex = await CatchAsync( - async () => await client.GetDocumentAsync( + async () => await client.GetDocumentAsync( "3", new GetDocumentOptions() { SelectedFields = new[] { "ThisFieldDoesNotExist" } })); Assert.AreEqual(400, ex.Status); @@ -569,8 +568,8 @@ public void CanRoundtripStaticallyTypedPrimitiveCollections() Longs = new[] { -9_999_999_999_999_999L, 832_372_345_832_523L }, Points = new[] { - GeographyPoint.Create(49, -123), - GeographyPoint.Create(47, -121) + TestExtensions.CreatePoint(49, -123), + TestExtensions.CreatePoint(47, -121) }, Strings = new[] { @@ -614,8 +613,8 @@ public void DynamicallyTypedPrimitiveCollectionsDoNotAllRoundtripCorrectly() ["Longs"] = new long[] { -9_999_999_999_999_999L, 832_372_345_832_523L }, ["Points"] = new GeographyPoint[] { - GeographyPoint.Create(49, -123), - GeographyPoint.Create(47, -121) + TestExtensions.CreatePoint(49, -123), + TestExtensions.CreatePoint(47, -121) }, ["Strings"] = new string[] { @@ -638,8 +637,8 @@ public void DynamicallyTypedPrimitiveCollectionsDoNotAllRoundtripCorrectly() ["Longs"] = new long[] { -9_999_999_999_999_999L, 832_372_345_832_523L }, ["Points"] = new GeographyPoint[] { - GeographyPoint.Create(49, -123), - GeographyPoint.Create(47, -121) + TestExtensions.CreatePoint(49, -123), + TestExtensions.CreatePoint(47, -121) }, ["Strings"] = new object[] { diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs index 16b658828796..362c50aaed15 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/IndexingTests.cs @@ -4,8 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; +using Azure.Core; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif using Azure.Core.TestFramework; using Azure.Search.Documents.Models; using NUnit.Framework; @@ -145,9 +150,7 @@ public async Task DynamicDocuments() ["smokingAllowed"] = true, ["lastRenovationDate"] = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), ["rating"] = 4, - // TODO: #10592- Unify on an Azure.Core spatial type - ["location"] = null, - // ["location"] = GeographyPoint.Create(40.760586, -73.975403), + ["location"] = TestExtensions.CreatePoint(-73.975403, 40.760586), ["address"] = new SearchDocument() { ["streetAddress"] = "677 5th Ave", @@ -195,9 +198,7 @@ public async Task DynamicDocuments() ["smokingAllowed"] = true, ["lastRenovationDate"] = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), ["rating"] = 4, - // TODO: #10592- Unify on an Azure.Core spatial type - ["location"] = null, - // ["location"] = GeographyPoint.Create(40.760586, -73.975403), + ["location"] = TestExtensions.CreatePoint(-73.975403, 40.760586), ["address"] = new SearchDocument() { ["streetAddress"] = "677 5th Ave", @@ -294,8 +295,7 @@ public async Task StaticDocuments() SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), Rating = 4, - // TODO: #10592- Unify on an Azure.Core spatial type - // Location = GeographyPoint.Create(40.760586, -73.975403), + Location = TestExtensions.CreatePoint(-73.975403, 40.760586), Address = new HotelAddress { StreetAddress = "677 5th Ave", @@ -343,8 +343,7 @@ public async Task StaticDocuments() SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1999, 9, 6, 0, 0, 0, TimeSpan.Zero), //aka.ms/sre-codescan/disable Rating = 3, - // TODO: #10592- Unify on an Azure.Core spatial type - // Location = GeographyPoint.Create(35.904160, -78.940483), + Location = TestExtensions.CreatePoint(-78.940483, 35.904160), Address = new HotelAddress() { StreetAddress = "6910 Fayetteville Rd", @@ -422,6 +421,92 @@ public async Task StaticDocuments() Assert.AreEqual(3L, count); } +#if EXPERIMENTAL_SERIALIZER + [Test] +#endif + public async Task StaticDocumentsWithCustomSerializer() + { + await using SearchResources resources = await SearchResources.CreateWithEmptyHotelsIndexAsync(this); + SearchClient client = resources.GetSearchClient( + new SearchClientOptions() + { +#if EXPERIMENTAL_SERIALIZER + Serializer = new JsonObjectSerializer( + new JsonSerializerOptions() + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + Converters = + { +#if EXPERIMENTAL_SPATIAL + new GeometryJsonConverter() +#endif + } + }) +#endif + }); + UncasedHotel expected = new UncasedHotel + { + HotelId = "1", + HotelName = "Secret Point Motel", + Description = "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time's Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.", + DescriptionFr = "L'hôtel est idéalement situé sur la principale artère commerciale de la ville en plein cœur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d'autres lieux d'intérêt qui font de New York l'une des villes les plus attractives et cosmopolites de l'Amérique.", + Category = "Boutique", + Tags = new[] { "pool", "air conditioning", "concierge" }, + ParkingIncluded = false, + SmokingAllowed = true, + LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), + Rating = 4, + Location = TestExtensions.CreatePoint(-73.975403, 40.760586), + Address = new HotelAddress + { + StreetAddress = "677 5th Ave", + City = "New York", + StateProvince = "NY", + Country = "USA", + PostalCode = "10022" + }, + Rooms = new[] + { + new HotelRoom + { + Description = "Budget Room, 1 Queen Bed (Cityside)", + DescriptionFr = "Chambre Économique, 1 grand lit (côté ville)", + Type = "Budget Room", + BaseRate = 9.69, + BedOptions = "1 Queen Bed", + SleepsCount = 2, + SmokingAllowed = true, + Tags = new[] { "vcr/dvd" } + }, + new HotelRoom + { + Description = "Budget Room, 1 King Bed (Mountain View)", + DescriptionFr = "Chambre Économique, 1 très grand lit (Mountain View)", + Type = "Budget Room", + BaseRate = 8.09, + BedOptions = "1 King Bed", + SleepsCount = 2, + SmokingAllowed = true, + Tags = new[] { "vcr/dvd", "jacuzzi tub" } + } + } + }; + IndexDocumentsBatch batch = IndexDocumentsBatch.Create( + IndexDocumentsAction.Upload(expected)); + + Response response = await client.IndexDocumentsAsync(batch); + Assert.AreEqual(1, response.Value.Results.Count); + + List results = new List(response.Value.Results); + AssertActionSucceeded("1", results[0], 201); + + await resources.WaitForIndexingAsync(); + + // Pull it back using the default serializer and compare + Hotel actual = await resources.GetQueryClient().GetDocumentAsync("1"); + Assert.AreEqual(expected, actual); + } + internal struct SimpleStructHotel { [JsonPropertyName("hotelId")] @@ -798,9 +883,7 @@ public async Task MergeDocumentsDynamic() ["smokingAllowed"] = true, ["lastRenovationDate"] = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), ["rating"] = 4L, - // TODO: #10592- Unify on an Azure.Core spatial type - ["location"] = null, - // ["location"] = GeographyPoint.Create(40.760586, -73.975403), + ["location"] = TestExtensions.CreatePoint(-73.975403, 40.760586), ["address"] = new SearchDocument { ["streetAddress"] = "677 5th Ave", @@ -910,15 +993,15 @@ await client.IndexDocumentsAsync( IndexDocumentsBatch.Merge(new[] { updated })); await resources.WaitForIndexingAsync(); - SearchDocument actualDoc = await client.GetDocumentAsync("1"); - Assert.AreEqual(expected, actualDoc); + SearchDocument actualDoc = await client.GetDocumentAsync("1"); + AssertApproximate(expected, actualDoc); await client.IndexDocumentsAsync( IndexDocumentsBatch.MergeOrUpload(new[] { original })); await resources.WaitForIndexingAsync(); - actualDoc = await client.GetDocumentAsync("1"); - Assert.AreEqual(original, actualDoc); + actualDoc = await client.GetDocumentAsync("1"); + AssertApproximate(original, actualDoc); } [Test] @@ -940,8 +1023,7 @@ public async Task MergeDocumentsStatic() SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), Rating = 4, - // TODO: #10592- Unify on an Azure.Core spatial type - // Location = GeographyPoint.Create(40.760586, -73.975403), + Location = TestExtensions.CreatePoint(-73.975403, 40.760586), Address = new HotelAddress { StreetAddress = "677 5th Ave", @@ -1015,8 +1097,7 @@ public async Task MergeDocumentsStatic() SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1970, 1, 18, 5, 0, 0, TimeSpan.Zero), Rating = 3, - // TODO: #10592- Unify on an Azure.Core spatial type - // Location = GeographyPoint.Create(40.760586, -73.975403), + Location = TestExtensions.CreatePoint(-73.975403, 40.760586), Address = new HotelAddress() { StreetAddress = "677 5th Ave", @@ -1095,7 +1176,7 @@ public void CanSetExplicitNullsInStaticallyTypedDocuments() SMOKINGALLOWED = false, LASTRENOVATIONDATE = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), RATING = 4, - LOCATION = GeographyPoint.Create(40.760586, -73.975403), + LOCATION = TestExtensions.CreatePoint(40.760586, -73.975403), ADDRESS = new LoudHotelAddress() { STREETADDRESS = "677 5th Ave", @@ -1230,9 +1311,8 @@ public async Task RoundtripBoundaryValues() HotelId = "1", Category = string.Empty, LastRenovationDate = DateTimeOffset.MinValue, - // TODO: #10592- Unify on an Azure.Core spatial type // South pole, date line from the west - // Location = GeographyPoint.Create(-90, -180), + Location = TestExtensions.CreatePoint(-180, -90), ParkingIncluded = false, Rating = int.MinValue, Tags = new string[0], @@ -1251,9 +1331,8 @@ public async Task RoundtripBoundaryValues() // (other than payload size or term length). Category = "test", LastRenovationDate = DateTimeOffset.MaxValue, - // TODO: #10592- Unify on an Azure.Core spatial type // North pole, date line from the east - // Location = GeographyPoint.Create(90, 180), + Location = TestExtensions.CreatePoint(180, 90), ParkingIncluded = true, Rating = int.MaxValue, // No meaningful string max; see above. @@ -1271,9 +1350,8 @@ public async Task RoundtripBoundaryValues() HotelId = "3", Category = null, LastRenovationDate = null, - // TODO: #10592- Unify on an Azure.Core spatial type // Equator, meridian - // Location = GeographyPoint.Create(0, 0), + Location = TestExtensions.CreatePoint(0, 0), ParkingIncluded = null, Rating = null, Tags = new string[0], @@ -1333,7 +1411,7 @@ public async Task RoundtripBoundaryValues() foreach (Hotel doc in expected) { Hotel actual = await client.GetDocumentAsync(doc.HotelId); - Assert.AreEqual(doc, actual); + AssertApproximate(doc, actual); } } @@ -1424,7 +1502,7 @@ public void CanIndexAndRetrieveWithCustomContractResolver() SMOKINGALLOWED = true, LASTRENOVATIONDATE = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), RATING = 4, - LOCATION = GeographyPoint.Create(40.760586, -73.975403), + LOCATION = TestExtensions.CreatePoint(40.760586, -73.975403), ADDRESS = new LoudHotelAddress() { STREETADDRESS = "677 5th Ave", diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs index b6f77d1454a4..f807d18c162f 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs @@ -4,7 +4,12 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; +using Azure.Core; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif using Azure.Core.TestFramework; using Azure.Search.Documents.Models; using NUnit.Framework; @@ -116,13 +121,12 @@ public async Task CreateLargeHotelsIndexAsync(int size) #endregion Utilities [Test] - [Ignore("Complex fields are not being serialized: https://github.com/Azure/azure-sdk-for-net/issues/10944")] public async Task DynamicDocuments() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); - SearchResults response = await client.SearchAsync("*"); + SearchResults response = await client.SearchAsync("*"); Assert.IsNull(response.TotalCount); Assert.IsNull(response.Coverage); Assert.IsNull(response.Facets); @@ -133,14 +137,13 @@ public async Task DynamicDocuments() { Assert.AreEqual(1, docs[i].Score); Assert.IsNull(docs[i].Highlights); - Assert.AreEqual( + SearchTestBase.AssertApproximate( SearchResources.TestDocuments[i].AsDocument(), docs[i].Document); } } [Test] - [Ignore("Complex fields are not being serialized: https://github.com/Azure/azure-sdk-for-net/issues/10944")] public async Task StaticDocuments() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -161,6 +164,46 @@ public async Task StaticDocuments() } } +#if EXPERIMENTAL_SERIALIZER + [Test] +#endif + public async Task StaticDocumentsWithCustomSerializer() + { + await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); + + SearchClient client = resources.GetQueryClient( + new SearchClientOptions() + { +#if EXPERIMENTAL_SERIALIZER + Serializer = new JsonObjectSerializer( + new JsonSerializerOptions() + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + Converters = + { +#if EXPERIMENTAL_SPATIAL + new GeometryJsonConverter() +#endif + } + }) +#endif + }); + SearchResults response = await client.SearchAsync("*"); + Assert.IsNull(response.TotalCount); + Assert.IsNull(response.Coverage); + Assert.IsNull(response.Facets); + + List> docs = await response.GetResultsAsync().ToListAsync(); + Assert.AreEqual(SearchResources.TestDocuments.Length, docs.Count); + for (int i = 0; i < docs.Count; i++) + { + Assert.AreEqual(1, docs[i].Score); + Assert.IsNull(docs[i].Highlights); + // Flip expected/actual order because we implemented Equals in UncasedHotel + Assert.AreEqual(docs[i].Document, SearchResources.TestDocuments[i]); + } + } + [Test] public async Task ThrowsWhenRequestIsMalformed() { @@ -169,7 +212,7 @@ public async Task ThrowsWhenRequestIsMalformed() SearchClient client = resources.GetQueryClient(); SearchOptions invalidOptions = new SearchOptions { Filter = "This is not a valid filter." }; RequestFailedException ex = await CatchAsync( - async () => await client.SearchAsync("*", invalidOptions)); + async () => await client.SearchAsync("*", invalidOptions)); Assert.AreEqual(400, ex.Status); StringAssert.StartsWith("Invalid expression: Syntax error at position 7 in 'This is not a valid filter.'", ex.Message); } @@ -272,7 +315,6 @@ await AssertKeysEqual( } [Test] - [Ignore("Complex fields are not being serialized: https://github.com/Azure/azure-sdk-for-net/issues/10944")] public async Task OrderByProgressivelyBreaksTies() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -449,7 +491,7 @@ public async Task RegexSpecialCharsUnescapedThrows() await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SearchClient client = resources.GetQueryClient(); RequestFailedException ex = await CatchAsync( - async () => await client.SearchAsync( + async () => await client.SearchAsync( @"/.*/.*/", new SearchOptions { QueryType = SearchQueryType.Full })); Assert.AreEqual(400, ex.Status); @@ -493,7 +535,7 @@ await resources.GetQueryClient().SearchAsync( new SearchOptions { ScoringProfile = "nearest", - ScoringParameters = new[] { new ScoringParameter("myloc", GeographyPoint.Create(49, -122)) }, + ScoringParameters = new[] { new ScoringParameter("myloc", TestExtensions.CreatePoint(49, -122)) }, Filter = "rating eq 5 or rating eq 1" }); await AssertKeysEqual( @@ -675,7 +717,7 @@ public async Task CanContinueDynamic() await using SearchResources resources = await CreateLargeHotelsIndexAsync(size); SearchClient client = resources.GetQueryClient(); Response> response = - await client.SearchAsync( + await client.SearchAsync( "*", new SearchOptions { @@ -692,14 +734,14 @@ await client.SearchAsync( Assert.NotNull(page.ContinuationToken); // Get the second page - response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); + response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); page = await response.Value.GetResultsAsync().AsPages().FirstAsync(); Assert.LessOrEqual(page.Values.Count, 1000); ids.AddRange(page.Values.Select(d => (string)d.Document["hotelId"])); Assert.NotNull(page.ContinuationToken); // Get the third page - response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); + response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); page = await response.Value.GetResultsAsync().AsPages().FirstAsync(); Assert.LessOrEqual(page.Values.Count, 1000); ids.AddRange(page.Values.Select(d => (string)d.Document["hotelId"])); @@ -718,7 +760,7 @@ public async Task CanContinueWithoutSize() await using SearchResources resources = await CreateLargeHotelsIndexAsync(size); SearchClient client = resources.GetQueryClient(); Response> response = - await client.SearchAsync( + await client.SearchAsync( "*", new SearchOptions { @@ -734,21 +776,21 @@ await client.SearchAsync( Assert.NotNull(page.ContinuationToken); // Get the second page - response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); + response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); page = await response.Value.GetResultsAsync().AsPages().FirstAsync(); Assert.LessOrEqual(page.Values.Count, 50); ids.AddRange(page.Values.Select(d => (string)d.Document["hotelId"])); Assert.NotNull(page.ContinuationToken); // Get the third page - response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); + response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); page = await response.Value.GetResultsAsync().AsPages().FirstAsync(); Assert.LessOrEqual(page.Values.Count, 50); ids.AddRange(page.Values.Select(d => (string)d.Document["hotelId"])); Assert.NotNull(page.ContinuationToken); // Get the final page - response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); + response = await client.SearchAsync(null, new SearchOptions(page.ContinuationToken)); page = await response.Value.GetResultsAsync().AsPages().FirstAsync(); Assert.LessOrEqual(page.Values.Count, 50); ids.AddRange(page.Values.Select(d => (string)d.Document["hotelId"])); @@ -777,7 +819,7 @@ public async Task PagingDynamicDocuments() const int size = 2001; await using SearchResources resources = await CreateLargeHotelsIndexAsync(size); Response> response = - await resources.GetQueryClient().SearchAsync( + await resources.GetQueryClient().SearchAsync( "*", new SearchOptions { diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SuggestTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SuggestTests.cs index a8208b0f5006..7a91c86a9208 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SuggestTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SuggestTests.cs @@ -29,7 +29,7 @@ public async Task SuggestDynamicDocuments() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); SuggestResults suggestions = - await resources.GetQueryClient().SuggestAsync( + await resources.GetQueryClient().SuggestAsync( "more", "sg", new SuggestOptions { OrderBy = new[] { "hotelId" } }); @@ -80,7 +80,7 @@ public async Task ThrowsWhenRequestIsMalformed() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); RequestFailedException ex = await CatchAsync( - async () => await resources.GetQueryClient().SuggestAsync( + async () => await resources.GetQueryClient().SuggestAsync( "hotel", "sg", new SuggestOptions { OrderBy = new[] { "This is not a valid orderby." } })); @@ -96,7 +96,7 @@ public async Task ThrowsWhenGivenBadSuggesterName() await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); string invalidName = "Invalid suggester"; RequestFailedException ex = await CatchAsync( - async () => await resources.GetQueryClient().SuggestAsync( + async () => await resources.GetQueryClient().SuggestAsync( "hotel", invalidName)); Assert.AreEqual(400, ex.Status); diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs index 6ec452d2f365..e459c73490a7 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Readme.cs @@ -64,7 +64,7 @@ public void FirstQuery() SearchClient client = new SearchClient(serviceEndpoint, indexName, credential); // Let's get the top 5 jobs related to Microsoft - SearchResults response = client.Search("Microsoft", new SearchOptions { Size = 5 }); + SearchResults response = client.Search("Microsoft", new SearchOptions { Size = 5 }); foreach (SearchResult result in response.GetResults()) { // Print out the title and job description (we'll see below how to @@ -76,7 +76,9 @@ public void FirstQuery() #endregion Snippet:Azure_Search_Tests_Samples_Readme_FirstQuery } +#if EXPERIMENTAL_DYNAMIC [Test] +#endif [SyncOnly] public async Task CreateAndQuery() { @@ -98,7 +100,7 @@ public async Task CreateAndQuery() #endregion Snippet:Azure_Search_Tests_Samples_Readme_Client #region Snippet:Azure_Search_Tests_Samples_Readme_Dict - SearchResults response = client.Search("luxury"); + SearchResults response = client.Search("luxury"); foreach (SearchResult result in response.GetResults()) { SearchDocument doc = result.Document; @@ -109,8 +111,8 @@ public async Task CreateAndQuery() #endregion Snippet:Azure_Search_Tests_Samples_Readme_Dict #region Snippet:Azure_Search_Tests_Samples_Readme_Dynamic - //@@ SearchResults response = client.Search("luxury"); - /*@@*/ response = client.Search("luxury"); + //@@ SearchResults response = client.Search("luxury"); + /*@@*/ response = client.Search("luxury"); foreach (SearchResult result in response.GetResults()) { dynamic doc = result.Document; diff --git a/sdk/search/Azure.Search.Documents/tests/Serialization/SearchDocumentTests.cs b/sdk/search/Azure.Search.Documents/tests/Serialization/SearchDocumentTests.cs new file mode 100644 index 000000000000..37b25a6cadfe --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/Serialization/SearchDocumentTests.cs @@ -0,0 +1,782 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Dynamic; +using System.Linq; +using System.Text.Json; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif +using Azure.Search.Documents.Models; +using NUnit.Framework; + +namespace Azure.Search.Documents.Tests +{ + public class SearchDocumentTests + { + #region Utilities + private static void AssertCollectionEqual(IEnumerable expected, IEnumerable actual) + { + if (expected == null) + { + Assert.IsNull(actual); + return; + } + Assert.IsNotNull(actual); + + IEnumerator exp = expected.GetEnumerator(); + IEnumerator act = actual.GetEnumerator(); + int moved = 0; + do + { + moved = (exp.MoveNext(), act.MoveNext()) switch + { + (true, true) => 2, + (true, false) => 1, + (false, true) => 2, + (false, false) => 0 + }; + if (moved == 2) + { + SearchTestBase.AssertApproximate(exp.Current, act.Current); + } + } while (moved == 2); + Assert.Zero(moved); + } + + private static string ToJson(string value, string name = "Value") => + $"{{\"{name}\":{value}}}"; + + private static SearchDocument FromJson(string json) => + JsonSerializer.Deserialize(json); + + private static SearchDocument ToDocument(string value, string name = "Value") => + FromJson(ToJson(value, name)); + + public class TestValue + { + public string JsonValue { get; private set; } + public T Expected { get; set; } + public bool CanReadDictionary { get; set; } + public bool CanReadDynamic { get; set; } + public bool CanReadGetter { get; set; } + + private TestValue(string json, T expected, bool dict, bool dyn, bool getter) + { + JsonValue = json; + Expected = expected; + CanReadDictionary = dict; + CanReadDynamic = dyn; + CanReadGetter = getter; + } + + public static TestValue Exact(string jsonValue, T expected) => + new TestValue(jsonValue, expected, dict: true, dyn: true, getter: true); + + public static TestValue Convert(string jsonValue, T expected) => + new TestValue(jsonValue, expected, dict: false, dyn: true, getter: true); + + public static TestValue Fail(string jsonValue) => + new TestValue(jsonValue, default, dict: false, dyn: false, getter: false); + + public override string ToString() + { + string operation = (CanReadDictionary, CanReadDynamic, CanReadGetter) switch + { + (true, true, true) => "Exact", + (false, true, true) => "Convert", + _ => "Fail" + }; + return $"{operation}: {JsonValue}"; + } + + public TestValue As() => + new TestValue(JsonValue, (U)(object)Expected, CanReadDictionary, CanReadDynamic, CanReadGetter); + + private static bool IsCollection() => + typeof(U).IsGenericType && + typeof(U).GetGenericTypeDefinition() == typeof(IReadOnlyList<>); + + public void Check(Func getter = null) + { + SearchDocument doc = null; + try { doc = ToDocument(JsonValue, "Value"); } + catch (Exception ex) { Assert.Fail($"Failed to parse {JsonValue}: {ex}"); } + + if (CanReadDictionary) + { + AssertReadDictionary(doc); + } + else + { + AssertReadDictionaryFails(doc); + } + +#if EXPERIMENTAL_DYNAMIC + if (CanReadDynamic) + { + AssertReadDynamic(doc); + } + else + { + AssertReadDynamicFails(doc); + } +#endif + + if (getter != null) + { + if (CanReadGetter) + { + AssertReadGetter(doc, getter); + } + else if (getter != null) + { + AssertReadGetterFails(doc, getter); + } + } + } + + private void AssertReadDictionary(SearchDocument doc) + { + object actual = doc["Value"]; + + bool isCollection = IsCollection(); + if (actual != null) + { + if (!isCollection) + { + Assert.IsInstanceOf(actual); + } + else + { + // Note: Arrays returned by the indexer are object[], not T[] + Assert.IsInstanceOf(actual); + } + } + + if (!isCollection) + { + SearchTestBase.AssertApproximate(Expected, actual); + } + else + { + if (actual != null) + { + CollectionAssert.AllItemsAreInstancesOfType(actual as IEnumerable, typeof(T).GetGenericArguments()[0]); + } + AssertCollectionEqual(Expected as IEnumerable, actual as IEnumerable); + } + } + + private static void AssertReadDictionaryFails(SearchDocument doc) + { + if (!IsCollection()) + { + object actual = doc["Value"]; + Assert.IsNotInstanceOf(actual); + } + else if (doc["Value"] is object[] actual && actual?.Length > 0) + { + Assert.IsTrue(actual.Any(e => !(e is T))); + } + } + + private void AssertReadDynamic(SearchDocument doc) + { + dynamic dyn = doc; + if (!IsCollection()) + { + T actual = dyn.Value; + SearchTestBase.AssertApproximate(Expected, actual); + } + else + { + // TODO: Change from object[] to T when DynamicData has better conversions + object[] actual = dyn.Value; + AssertCollectionEqual(Expected as IEnumerable, actual as IEnumerable); + } + } + + private static void AssertReadDynamicFails(SearchDocument doc) + { + dynamic dyn = doc; + object actual = dyn.Value; + if (actual != null && IsCollection()) + { + Assert.IsNotInstanceOf(actual); + } + // TODO: Change from object[] to T when DynamicData has better conversions + else if (actual is object[] values && values?.Length > 0) + { + Assert.IsTrue(values.Any(e => !(e is T))); + } + } + + private void AssertReadGetter(SearchDocument doc, Func getter) + { + Assert.IsNotNull(getter); + T actual = getter(doc, "Value"); + if (!IsCollection()) + { + SearchTestBase.AssertApproximate(Expected, actual); + } + else + { + AssertCollectionEqual(Expected as IEnumerable, actual as IEnumerable); + } + } + + private static void AssertReadGetterFails(SearchDocument doc, Func getter) + { + Assert.IsNotNull(getter); + bool throws = false; + try + { + getter(doc, "Value"); + } + catch (Exception) + { + throws = true; + } + Assert.IsTrue(throws, "Expected an exception to be thrown!"); + } + } + + private static TestValue[] GetNullableValues(TestValue[] values) where T : struct + { + List> cases = new List>(); + foreach (TestValue original in values) + { + TestValue test = original.As(); + if (test.JsonValue == "null") + { + test.Expected = null; + test.CanReadDictionary = true; + test.CanReadDynamic = true; + test.CanReadGetter = true; + } + cases.Add(test); + } + return cases.ToArray(); + } + + private static TestValue>[] GetCollectionValues(params TestValue>[] values) + { + var common = new[] + { + TestValue>.Exact("[]", new T[] { }), + TestValue>.Exact("null", null), + + TestValue>.Fail("true"), + TestValue>.Fail("false"), + TestValue>.Fail("\"\""), + TestValue>.Fail("\"hello\""), + TestValue>.Fail("{}"), + TestValue>.Fail("0"), + TestValue>.Fail("1"), + TestValue>.Fail("0.5"), + }; + + List>> cases = new List>>(); + cases.AddRange(values); + cases.AddRange(common); + return cases.ToArray(); + } + #endregion + + [TestCaseSource(nameof(BooleanValues))] + public void GetBools(TestValue test) => test.Check((d, n) => d.GetBoolean(n).Value); + private static TestValue[] BooleanValues => + new[] + { + TestValue.Exact("true", true), + TestValue.Exact("false", false), + + TestValue.Fail("null"), + TestValue.Fail("\"\""), + TestValue.Fail("\"true\""), + TestValue.Fail("\"false\""), + TestValue.Fail("\"True\""), + TestValue.Fail("\"False\""), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("0"), + TestValue.Fail("1"), + TestValue.Fail("0.5"), + }; + + [TestCaseSource(nameof(NullableBooleanValues))] + public void GetNullableBools(TestValue test) => test.Check((d,n) => d.GetBoolean(n)); + private static TestValue[] NullableBooleanValues => GetNullableValues(BooleanValues); + + [TestCaseSource(nameof(BooleanCollectionValues))] + public void GetBoolCollections(TestValue> test) => test.Check((d, n) => d.GetBooleanCollection(n)); + private static TestValue>[] BooleanCollectionValues => + GetCollectionValues( + TestValue>.Exact("[true]", new bool[] { true }), + TestValue>.Exact("[false]", new bool[] { false }), + TestValue>.Exact("[true, false]", new bool[] { true, false })); + + [TestCaseSource(nameof(StringValues))] + public void GetStrings(TestValue test) => test.Check((d, n) => d.GetString(n)); + private static TestValue[] StringValues => + new[] + { + TestValue.Exact("null", null), + TestValue.Exact("\"\"", ""), + TestValue.Exact("\"a\"", "a"), + TestValue.Exact("\"1\"", "1"), + TestValue.Exact("\"Hello\"", "Hello"), + TestValue.Exact("\"\\\"\"", "\""), + TestValue.Exact("\"\\\"\\\"\"", "\"\""), + TestValue.Exact("\"\\\"Hi!\\\"\"", "\"Hi!\""), + + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("0"), + TestValue.Fail("1"), + TestValue.Fail("0.5") + }; + + [TestCaseSource(nameof(StringCollectionValues))] + public void GetStringCollections(TestValue> test) => test.Check((d, n) => d.GetStringCollection(n)); + private static TestValue>[] StringCollectionValues => + GetCollectionValues( + TestValue>.Exact("[\"a\"]", new string[] { "a" }), + TestValue>.Exact("[\"\"]", new string[] { "" }), + TestValue>.Exact("[\"a\", \"b\", \"\"]", new string[] { "a", "b", "" })); + + [TestCaseSource(nameof(Int32Values))] + public void GetInt32s(TestValue test) => test.Check((d,n) => d.GetInt32(n).Value); + private static TestValue[] Int32Values => + new[] + { + TestValue.Exact("0", 0), + TestValue.Exact("1", 1), + TestValue.Exact("-1", -1), + TestValue.Exact("2", 2), + TestValue.Exact("10", 10), + TestValue.Exact("100", 100), + TestValue.Exact("10000", 10000), + TestValue.Exact("2147483647", int.MaxValue), + TestValue.Exact("-2147483648", int.MinValue), + + TestValue.Fail("null"), + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("\"\""), + TestValue.Fail("\"1\""), + TestValue.Fail("0.5"), + TestValue.Fail("2147483648"), + TestValue.Fail("-2147483649") + }; + + [TestCaseSource(nameof(NullableInt32Values))] + public void GetNullableInt32s(TestValue test) => test.Check((d, n) => d.GetInt32(n)); + private static TestValue[] NullableInt32Values => GetNullableValues(Int32Values); + + [TestCaseSource(nameof(Int32CollectionValues))] + public void GetInt32Collections(TestValue> test) => test.Check((d, n) => d.GetInt32Collection(n)); + private static TestValue>[] Int32CollectionValues => + GetCollectionValues( + TestValue>.Exact("[0]", new int[] { 0 }), + TestValue>.Exact("[10]", new int[] { 10 }), + TestValue>.Exact("[1, 2, 3]", new int[] { 1, 2, 3 }), + TestValue>.Exact("[-1, -2, -3]", new int[] { -1, -2, -3 }), + TestValue>.Exact("[0, 2147483647, -2147483648]", new int[] { 0, int.MaxValue, int.MinValue }), + TestValue>.Fail("[0, 2147483648, -2147483649]")); + + [TestCaseSource(nameof(Int64Values))] + public void GetInt64s(TestValue test) => test.Check((d, n) => d.GetInt64(n).Value); + private static TestValue[] Int64Values => + new[] + { + TestValue.Exact("2147483648", (long)int.MaxValue + 1L), + TestValue.Exact("-2147483649", (long)int.MinValue - 1L), + TestValue.Exact("9223372036854775807", long.MaxValue), + TestValue.Exact("-9223372036854775808", long.MinValue), + + TestValue.Convert("0", 0), + TestValue.Convert("1", 1), + TestValue.Convert("-1", -1), + TestValue.Convert("2", 2), + TestValue.Convert("10", 10), + TestValue.Convert("100", 100), + TestValue.Convert("10000", 10000), + TestValue.Convert("2147483647", (long)int.MaxValue), + TestValue.Convert("-2147483648", (long)int.MinValue), + + TestValue.Fail("null"), + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("\"\""), + TestValue.Fail("\"1\""), + TestValue.Fail("0.5"), + TestValue.Fail("9223372036854775808"), + TestValue.Fail("-9223372036854775809"), + }; + + [TestCaseSource(nameof(NullableInt64Values))] + public void GetNullableInt64s(TestValue test) => test.Check((d, n) => d.GetInt64(n)); + private static TestValue[] NullableInt64Values => GetNullableValues(Int64Values); + + [TestCaseSource(nameof(Int64CollectionValues))] + public void GetInt64Collections(TestValue> test) => test.Check((d, n) => d.GetInt64Collection(n)); + private static TestValue>[] Int64CollectionValues => + GetCollectionValues( + TestValue>.Exact("[2147483648]", new long[] { int.MaxValue + 1L }), + TestValue>.Exact("[-2147483649]", new long[] { int.MinValue - 1L }), + TestValue>.Exact("[2147483648, -2147483649]", new long[] { int.MaxValue + 1L, int.MinValue - 1L }), + TestValue>.Convert("[1]", new long[] { 1 }), + TestValue>.Convert("[1, 2, 3]", new long[] { 1, 2, 3 }), + TestValue>.Convert("[0, 2147483648, -2147483649]", new long[] { 0L, int.MaxValue + 1L, int.MinValue - 1L }), + TestValue>.Fail("[0, 9223372036854775808, -9223372036854775809]")); + + [TestCaseSource(nameof(DoubleValues))] + public void GetDoubles(TestValue test) => test.Check((d, n) => d.GetDouble(n).Value); + private static TestValue[] DoubleValues => + new[] + { + TestValue.Exact("0.0", 0), + TestValue.Exact("1.0", 1), + TestValue.Exact("1e0", 1), + TestValue.Exact("1.5e1", 15), + TestValue.Exact("1.55e1", 15.5), + TestValue.Exact("1.55e2", 155), + TestValue.Exact("1.5", 1.5), + TestValue.Exact("-1.5", -1.5), + TestValue.Exact("-1e0", -1), + TestValue.Exact("-1.5e1", -15), + TestValue.Exact("-1.55e2", -155), + TestValue.Exact("9.2233720368547758E+18", long.MaxValue), + TestValue.Exact("-9.2233720368547758E+18", long.MinValue), + + TestValue.Convert("\"NaN\"", double.NaN), + TestValue.Convert("\"INF\"", double.PositiveInfinity), + TestValue.Convert("\"-INF\"", double.NegativeInfinity), + TestValue.Convert("0", 0), + TestValue.Convert("1", 1), + TestValue.Convert("-1", -1), + TestValue.Convert("2", 2), + TestValue.Convert("10", 10), + TestValue.Convert("100", 100), + TestValue.Convert("10000", 10000), + TestValue.Convert("2147483647", int.MaxValue), + TestValue.Convert("-2147483648", int.MinValue), + + TestValue.Fail("null"), + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("\"\""), + TestValue.Fail("\"1\""), + }; + + [TestCaseSource(nameof(NullableDoubleValues))] + public void GetNullableDoubles(TestValue test) => test.Check((d, n) => d.GetDouble(n)); + private static TestValue[] NullableDoubleValues => GetNullableValues(DoubleValues); + + [TestCaseSource(nameof(DoubleCollectionValues))] + public void GetDoubleCollections(TestValue> test) => test.Check((d, n) => d.GetDoubleCollection(n)); + private static TestValue>[] DoubleCollectionValues => + GetCollectionValues( + TestValue>.Exact("[0.5]", new double[] { 0.5 }), + TestValue>.Exact("[0.0, 0.5, 1.0]", new double[] { 0.0, 0.5, 1.0 }), + TestValue>.Convert("[0, 0.5, 1]", new double[] { 0.0, 0.5, 1.0 })); + + [TestCaseSource(nameof(DateTimeOffsetValues))] + public void GetDateTimeOffsets(TestValue test) => test.Check((d, n) => d.GetDateTimeOffset(n).Value); + private static TestValue[] DateTimeOffsetValues => + new[] + { + TestValue.Convert( + "\"2020-01-20T15:50:00+00:00\"", + new DateTimeOffset(2020, 1, 20, 15, 50, 0, TimeSpan.Zero)), + TestValue.Convert( + "\"2020-01-20T15:50:00+00:00\"", + new DateTimeOffset(2020, 1, 20, 15, 50, 0, TimeSpan.Zero).ToUniversalTime()), + TestValue.Convert( + "\"2017-01-13T14:03:00-08:00\"", + new DateTimeOffset(2017, 1, 13, 14, 3, 0, 0, TimeSpan.FromHours(-8))), + TestValue.Convert( + "\"2017-01-13T22:03:00+00:00\"", + new DateTimeOffset(2017, 1, 13, 14, 3, 0, 0, TimeSpan.FromHours(-8)).ToUniversalTime()), + TestValue.Fail("null"), + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("\"\""), + TestValue.Fail("\"1\""), + TestValue.Fail("0.5") + }; + + [TestCaseSource(nameof(NullableDateTimeOffsetValues))] + public void GetNullableDateTimeOffsets(TestValue test) => test.Check((d, n) => d.GetDateTimeOffset(n)); + private static TestValue[] NullableDateTimeOffsetValues => GetNullableValues(DateTimeOffsetValues); + + [TestCaseSource(nameof(DateTimeOffsetCollectionValues))] + public void GetDateTimeOffsetCollections(TestValue> test) => test.Check((d, n) => d.GetDateTimeOffsetCollection(n)); + private static TestValue>[] DateTimeOffsetCollectionValues => + GetCollectionValues( + TestValue>.Convert( + "[\"2020-01-20T15:50:00+00:00\"]", + new DateTimeOffset[] { new DateTimeOffset(2020, 1, 20, 15, 50, 0, TimeSpan.Zero) }), + TestValue>.Convert( + "[\"2017-01-13T14:03:00-08:00\"]", + new DateTimeOffset[] { new DateTimeOffset(2017, 1, 13, 14, 3, 0, 0, TimeSpan.FromHours(-8)) }), + TestValue>.Convert( + "[\"2020-01-20T15:50:00+00:00\", \"2017-01-13T14:03:00-08:00\", \"2017-01-13T22:03:00+00:00\"]", + new DateTimeOffset[] + { + new DateTimeOffset(2020, 1, 20, 15, 50, 0, TimeSpan.Zero), + new DateTimeOffset(2017, 1, 13, 14, 3, 0, 0, TimeSpan.FromHours(-8)), + new DateTimeOffset(2017, 1, 13, 14, 3, 0, 0, TimeSpan.FromHours(-8)).ToUniversalTime() + })); + +#if EXPERIMENTAL_SPATIAL + [TestCaseSource(nameof(PointValues))] + public void GetPoints(TestValue test) => test.Check((d, n) => d.GetPoint(n)); + private static TestValue[] PointValues => + new[] + { + TestValue.Exact( + "{\"type\":\"Point\",\"coordinates\":[0, 0]}", + new PointGeometry(new GeometryPosition(0, 0))), + TestValue.Exact( + "{\"type\":\"Point\",\"coordinates\":[2, 3]}", + new PointGeometry(new GeometryPosition(2, 3))), + TestValue.Exact( + "{\"type\":\"Point\",\"coordinates\":[2, 3, 5]}", + new PointGeometry(new GeometryPosition(2, 3, 5))), + TestValue.Exact("null", null), + + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("{}"), + TestValue.Fail("[]"), + TestValue.Fail("0"), + TestValue.Fail("1"), + TestValue.Fail("0.5") + }; + + [TestCaseSource(nameof(PointCollectionValues))] + public void GetPointCollections(TestValue> test) => test.Check((d, n) => d.GetPointCollection(n)); + private static TestValue>[] PointCollectionValues => + GetCollectionValues( + TestValue>.Exact( + "[{\"type\":\"Point\",\"coordinates\":[0, 1]}]", + new[] { new PointGeometry(new GeometryPosition(0, 1)) }), + TestValue>.Exact( + "[{\"type\":\"Point\",\"coordinates\":[0, 1]},{\"type\":\"Point\",\"coordinates\":[2, 3]}]", + new[] + { + new PointGeometry(new GeometryPosition(0, 1)), + new PointGeometry(new GeometryPosition(2, 3)) + })); +#endif + + public class Complex + { + public int A { get; set; } + public bool B { get; set; } + public string C { get; set; } + public Complex() : this(0, false, null) { } + public Complex(int a, bool b, string c) { A = a; B = b; C = c; } + public string ToJson() => JsonSerializer.Serialize(this); + public SearchDocument ToDocument() => FromJson(ToJson()); + } + + public class ComplexNullable + { + public int? X { get; set; } + public bool? Y { get; set; } + public string Z { get; set; } + public ComplexNullable() : this(null, null, null) { } + public ComplexNullable(int? x, bool? y, string z) { X = x; Y = y; Z = z; } + public string ToJson() => JsonSerializer.Serialize(this); + public SearchDocument ToDocument() => FromJson(ToJson()); + } + + public class NestedComplex + { + public Complex Nested { get; set; } + public NestedComplex() : this(null) { } + public NestedComplex(int a, bool b, string c) : this(new Complex(a, b, c)) { } + public NestedComplex(Complex nested) { Nested = nested; } + public string ToJson() => JsonSerializer.Serialize(this); + public SearchDocument ToDocument() => FromJson(ToJson()); + } + + [TestCaseSource(nameof(ComplexValues))] + public void GetComplex(TestValue test) => test.Check((d, n) => d.GetObject(n)); + private static TestValue[] ComplexValues => + new[] + { + TestValue.Exact("null", null), + TestValue.Exact("{ }", new SearchDocument()), + + TestValue.Exact( + new Complex().ToJson(), + new Complex().ToDocument()), + TestValue.Exact( + new Complex(12, true, "hello").ToJson(), + new Complex(12, true, "hello").ToDocument()), + TestValue.Exact( + new Complex(-3, false, "bye").ToJson(), + new Complex(-3, false, "bye").ToDocument()), + + TestValue.Exact( + new ComplexNullable().ToJson(), + new ComplexNullable().ToDocument()), + TestValue.Exact( + new ComplexNullable(12, true, "hello").ToJson(), + new ComplexNullable(12, true, "hello").ToDocument()), + TestValue.Exact( + new ComplexNullable(null, null, "bye").ToJson(), + new ComplexNullable(null, null, "bye").ToDocument()), + + TestValue.Exact( + new NestedComplex().ToJson(), + new NestedComplex().ToDocument()), + TestValue.Exact( + new NestedComplex(1, true, "hi").ToJson(), + new NestedComplex(1, true, "hi").ToDocument()), + + TestValue.Fail("true"), + TestValue.Fail("false"), + TestValue.Fail("\"\""), + TestValue.Fail("\"hello\""), + TestValue.Fail("[]"), + TestValue.Fail("0"), + TestValue.Fail("1"), + TestValue.Fail("0.5"), + }; + + [TestCaseSource(nameof(ComplexCollectionValues))] + public void GetComplexCollections(TestValue> test) => test.Check((d, n) => d.GetObjectCollection(n)); + private static TestValue>[] ComplexCollectionValues => + GetCollectionValues( + TestValue>.Exact( + "[{ }]", + new[] { new SearchDocument() }), + TestValue>.Exact( + $"[{new Complex().ToJson()}]", + new[] { new Complex().ToDocument() }), + TestValue>.Exact( + $"[{new Complex(1, true, "hi").ToJson()}, {new Complex(2, false, "bye").ToJson()}]", + new[] { new Complex(1, true, "hi").ToDocument(), new Complex(2, false, "bye").ToDocument() }), + TestValue>.Exact( + $"[{new ComplexNullable(1, true, "hi").ToJson()}, {new ComplexNullable(2, false, "bye").ToJson()}]", + new[] { new ComplexNullable(1, true, "hi").ToDocument(), new ComplexNullable(2, false, "bye").ToDocument() }), + TestValue>.Exact( + $"[{new Complex().ToJson()}, {new ComplexNullable().ToJson()}]", + new[] { new Complex().ToDocument(), new ComplexNullable().ToDocument() })); + +#if EXPERIMENTAL_DYNAMIC + [Test] +#endif + public void Index() + { + dynamic doc = ToDocument("12"); + int value = doc.Value; + SearchTestBase.AssertApproximate(12, value); + } + +#if EXPERIMENTAL_DYNAMIC + [Test] +#endif + public void IndexComplex() + { + dynamic doc = ToDocument(new Complex(1, true, "hi").ToJson()); + + int a = doc.Value.A; + SearchTestBase.AssertApproximate(1, a); + + bool b = doc.Value.B; + SearchTestBase.AssertApproximate(true, b); + + string c = doc.Value.C; + SearchTestBase.AssertApproximate("hi", c); + } + +#if EXPERIMENTAL_DYNAMIC + [Test] +#endif + public void IndexNestedComplex() + { + dynamic doc = ToDocument(new NestedComplex(1, true, "hi").ToJson()); + + int a = doc.Value.Nested.A; + SearchTestBase.AssertApproximate(1, a); + + bool b = doc.Value.Nested.B; + SearchTestBase.AssertApproximate(true, b); + + string c = doc.Value.Nested.C; + SearchTestBase.AssertApproximate("hi", c); + } + + [Test] + public void Equality() + { + SearchTestBase.AssertApproximate( + new SearchDocument(), + new SearchDocument()); + + Assert.AreNotEqual( + new SearchDocument(), + new Complex().ToDocument()); + SearchTestBase.AssertApproximate( + new Complex().ToDocument(), + new Complex().ToDocument()); + + Assert.AreNotEqual( + new Complex(1, false, "hi").ToDocument(), + new NestedComplex(1, false, "hi").ToDocument()); + SearchTestBase.AssertApproximate( + new NestedComplex(1, false, "hi").ToDocument(), + new NestedComplex(1, false, "hi").ToDocument()); + SearchTestBase.AssertApproximate( + new Complex(1, false, "hi").ToDocument(), + new NestedComplex(1, false, "hi").Nested.ToDocument()); + } + +#if EXPERIMENTAL_DYNAMIC + [Test] +#endif + public void NoDynamicObjectMembers() + { + Assert.IsInstanceOf(new SearchDocument()); + Assert.IsNotInstanceOf(new SearchDocument()); + } + + [Test] + public void TooDeepToParse() + { + string Wrap(string value) => "{\"x\":" + value + ",\"y\":[1,2,3]}"; + + // Push it to the limit + string json = "1"; + for (int i = 0; i < 63; i++) + { + json = Wrap(json); + } + JsonSerializer.Deserialize(json); + + // Go just a little too far + json = Wrap(json); + Assert.Throws(() => JsonSerializer.Deserialize(json)); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/tests/Serialization/SearchFilterTests.cs b/sdk/search/Azure.Search.Documents/tests/Serialization/SearchFilterTests.cs index 190d4744ea64..3ac190f10c65 100644 --- a/sdk/search/Azure.Search.Documents/tests/Serialization/SearchFilterTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Serialization/SearchFilterTests.cs @@ -3,8 +3,9 @@ using System; using System.Text; -using System.Threading.Tasks; -using Azure.Core.TestFramework; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif using NUnit.Framework; namespace Azure.Search.Documents.Tests @@ -150,6 +151,45 @@ public void Text() Assert.AreEqual("Foo eq 'bar'", SearchFilter.Create($"Foo eq {sb}")); } +#if EXPERIMENTAL_SPATIAL + [Test] + public void Points() + { + GeometryPosition position = new GeometryPosition(2.0, 3.0); + Assert.AreEqual("geo.distance(geography'POINT(2 3)', Foo) < 3", SearchFilter.Create($"geo.distance({position}, Foo) < 3")); + Assert.AreEqual("geo.distance(geography'POINT(2 3)', Foo) < 3", SearchFilter.Create($"geo.distance({new GeometryPosition(2.0, 3.0, 5.0)}, Foo) < 3")); + Assert.AreEqual("geo.distance(geography'POINT(2 3)', Foo) < 3", SearchFilter.Create($"geo.distance({new PointGeometry(position)}, Foo) < 3")); + } + + [Test] + public void Polygons() + { + LineGeometry line = new LineGeometry( + new[] + { + new GeometryPosition(0, 0), + new GeometryPosition(0, 1), + new GeometryPosition(1, 1), + new GeometryPosition(0, 0), + }); + Assert.AreEqual( + "geo.intersects(Foo, geography'POLYGON((0 0,0 1,1 1,0 0))')", + SearchFilter.Create($"geo.intersects(Foo, {line})")); + + PolygonGeometry polygon = new PolygonGeometry(new[] { line }); + Assert.AreEqual( + "geo.intersects(Foo, geography'POLYGON((0 0,0 1,1 1,0 0))')", + SearchFilter.Create($"geo.intersects(Foo, {polygon})")); + + Assert.Throws(() => SearchFilter.Create( + $"{new LineGeometry(new[] { new GeometryPosition(0, 0) })}")); + Assert.Throws(() => SearchFilter.Create( + $"{new LineGeometry(new[] { new GeometryPosition(0, 0), new GeometryPosition(0, 0), new GeometryPosition(0, 0), new GeometryPosition(1, 1) })}")); + Assert.Throws(() => SearchFilter.Create( + $"{new PolygonGeometry(new[] { line, line })}")); + } +#endif + [Test] public void OtherThrows() { diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectType.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectType.json index 521c107e53ed..1fb95b9f62b0 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectType.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectType.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fjprueyo\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tcxlmlyi\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "117", + "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-62b175d7caeafa49a8a4e79117e5d4b1-6babf8780fcaac46-00", + "traceparent": "00-77f10ea08b907b49942454d5e81b0750-1e680756c0a48d44-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f2dea44eafbfa4b6ba735f3c93646f5e", "x-ms-return-client-request-id": "true" @@ -22,6 +22,13 @@ "@search.action": "upload", "hotelId": "1", "hotelName": "2015-02-11T12:58:00Z", + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "rooms": [ { "baseRate": "NaN" @@ -33,16 +40,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "f2dea44e-afbf-a4b6-ba73-5f3c93646f5e", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:42:03 GMT", - "elapsed-time": "89", + "Date": "Mon, 01 Jun 2020 11:26:07 GMT", + "elapsed-time": "99", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "f2dea44e-afbf-a4b6-ba73-5f3c93646f5e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f2dea44e-afbf-a4b6-ba73-5f3c93646f5e" }, "ResponseBody": { "value": [ @@ -56,15 +65,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fjprueyo\u0027)/docs(\u00271\u0027)?$select=hotelId%2ChotelName%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tcxlmlyi\u0027)/docs(\u00271\u0027)?$select=hotelId%2ChotelName%2Clocation%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-fd73d0bf2b52344e878b5565c05a620a-8b91b98195217a44-00", + "traceparent": "00-aedcd63c9091bf4ba7c6c3aa4a69ddf3-4f239fc75cf6b041-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "9dfd77cc8a89de6cb092c4d1b6f43b5e", "x-ms-return-client-request-id": "true" @@ -73,20 +82,35 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "79", + "client-request-id": "9dfd77cc-8a89-de6c-b092-c4d1b6f43b5e", + "Content-Length": "200", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:42:05 GMT", - "elapsed-time": "8", + "Date": "Mon, 01 Jun 2020 11:26:08 GMT", + "elapsed-time": "14", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "9dfd77cc-8a89-de6c-b092-c4d1b6f43b5e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "9dfd77cc-8a89-de6c-b092-c4d1b6f43b5e" }, "ResponseBody": { "hotelId": "1", "hotelName": "2015-02-11T12:58:00Z", + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "rooms": [ { "baseRate": "NaN" @@ -95,15 +119,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fjprueyo\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tcxlmlyi\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-826e765e87b4cf448eb46a9154dd4545-50d9267485885048-00", + "traceparent": "00-5e86405c2af2664787763e60fbaff5f0-e1936530bb93af4c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "116b93ec2c2861072de398e0d79b3562", "x-ms-return-client-request-id": "true" @@ -112,21 +136,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:42:05 GMT", - "elapsed-time": "170", + "client-request-id": "116b93ec-2c28-6107-2de3-98e0d79b3562", + "Date": "Mon, 01 Jun 2020 11:26:10 GMT", + "elapsed-time": "542", "Expires": "-1", "Pragma": "no-cache", "request-id": "116b93ec-2c28-6107-2de3-98e0d79b3562", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "116b93ec-2c28-6107-2de3-98e0d79b3562" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1073368072", - "SearchIndexName": "fjprueyo", + "SearchIndexName": "tcxlmlyi", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectTypeAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectTypeAsync.json index c1ed2eeefc3a..2fa103903866 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectTypeAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/CannotAlwaysDetermineCorrectTypeAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027yeyxmdxb\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vufoohxy\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "117", + "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-9528fa5cf1659541bef6788371b720a8-0c105aad0935c448-00", + "traceparent": "00-fe42b832c474364ca0863bb600e3a922-3bc313363a5c314c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2fc6adffe4b6d5f88c266573078647dc", "x-ms-return-client-request-id": "true" @@ -22,6 +22,13 @@ "@search.action": "upload", "hotelId": "1", "hotelName": "2015-02-11T12:58:00Z", + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "rooms": [ { "baseRate": "NaN" @@ -33,16 +40,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "2fc6adff-e4b6-d5f8-8c26-6573078647dc", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:46:44 GMT", - "elapsed-time": "77", + "Date": "Mon, 01 Jun 2020 11:28:12 GMT", + "elapsed-time": "123", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "2fc6adff-e4b6-d5f8-8c26-6573078647dc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2fc6adff-e4b6-d5f8-8c26-6573078647dc" }, "ResponseBody": { "value": [ @@ -56,15 +65,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027yeyxmdxb\u0027)/docs(\u00271\u0027)?$select=hotelId%2ChotelName%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vufoohxy\u0027)/docs(\u00271\u0027)?$select=hotelId%2ChotelName%2Clocation%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-9d12307619425c498fcedde1e63c1959-db7013a57c1edd4c-00", + "traceparent": "00-b70a283761af2c458afb757d1939f2ce-3c3318708956d64c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "445154a46aeeea75e714de162175d29b", "x-ms-return-client-request-id": "true" @@ -73,20 +82,35 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "79", + "client-request-id": "445154a4-6aee-ea75-e714-de162175d29b", + "Content-Length": "200", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:46:47 GMT", + "Date": "Mon, 01 Jun 2020 11:28:15 GMT", "elapsed-time": "8", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "445154a4-6aee-ea75-e714-de162175d29b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "445154a4-6aee-ea75-e714-de162175d29b" }, "ResponseBody": { "hotelId": "1", "hotelName": "2015-02-11T12:58:00Z", + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "rooms": [ { "baseRate": "NaN" @@ -95,15 +119,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027yeyxmdxb\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vufoohxy\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-ba972e8ec9563b448afc972379d67099-46ee25e2d734e44f-00", + "traceparent": "00-92965378acf5754f961dfcb7be56d6c8-9e305fb7b97b1344-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "aa050cde6d8374c8781ce99399c98836", "x-ms-return-client-request-id": "true" @@ -112,21 +136,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:46:47 GMT", - "elapsed-time": "216", + "client-request-id": "aa050cde-6d83-74c8-781c-e99399c98836", + "Date": "Mon, 01 Jun 2020 11:28:15 GMT", + "elapsed-time": "662", "Expires": "-1", "Pragma": "no-cache", "request-id": "aa050cde-6d83-74c8-781c-e99399c98836", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "aa050cde-6d83-74c8-781c-e99399c98836" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "815861156", - "SearchIndexName": "yeyxmdxb", + "SearchIndexName": "vufoohxy", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocument.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocument.json index d0b76c1a5807..fadf513892a6 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocument.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocument.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027spscwwei\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ababbqyr\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1018", + "Content-Length": "962", "Content-Type": "application/json", - "traceparent": "00-a1450d078e767c4e865e33c90bce789f-99051edeacd30840-00", + "traceparent": "00-f22ad1f65a9a494390e5e0f5a053d393-9a40598d382f0f4c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "26a6f1d5a3b239468a59914d90ca500b", "x-ms-return-client-request-id": "true" @@ -40,13 +40,7 @@ "coordinates": [ -122.13157699999999, 47.678581000000001 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } + ] }, "address": null, "rooms": [] @@ -56,16 +50,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "26a6f1d5-a3b2-3946-8a59-914d90ca500b", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:01 GMT", - "elapsed-time": "121", + "Date": "Mon, 01 Jun 2020 12:03:59 GMT", + "elapsed-time": "115", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "26a6f1d5-a3b2-3946-8a59-914d90ca500b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "26a6f1d5-a3b2-3946-8a59-914d90ca500b" }, "ResponseBody": { "value": [ @@ -79,15 +75,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027spscwwei\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ababbqyr\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-9edbdf419ceb2f49adcec9a5c60eef19-a356eea487b2c644-00", + "traceparent": "00-ab00e89228d1a24881318ec99bd50e4b-2a6ce4812d06434f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5d990c2a343c51ee5341d72213255f52", "x-ms-return-client-request-id": "true" @@ -96,60 +92,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5d990c2a-343c-51ee-5341-d72213255f52", "Content-Length": "940", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:03 GMT", + "Date": "Mon, 01 Jun 2020 12:04:01 GMT", "elapsed-time": "9", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5d990c2a-343c-51ee-5341-d72213255f52", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5d990c2a-343c-51ee-5341-d72213255f52" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027spscwwei\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ababbqyr\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-65aa91814fa17147a38b09477c1284cd-d8ec70da2d072142-00", + "traceparent": "00-ade9416cd8fefa49a92d76c8c3841653-97ae9aff41ad584d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a7e54185fafe352bf1bf7be371ac3975", "x-ms-return-client-request-id": "true" @@ -158,21 +125,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:44:03 GMT", - "elapsed-time": "218", + "client-request-id": "a7e54185-fafe-352b-f1bf-7be371ac3975", + "Date": "Mon, 01 Jun 2020 12:04:01 GMT", + "elapsed-time": "526", "Expires": "-1", "Pragma": "no-cache", "request-id": "a7e54185-fafe-352b-f1bf-7be371ac3975", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "a7e54185-fafe-352b-f1bf-7be371ac3975" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1347817798", - "SearchIndexName": "spscwwei", + "SearchIndexName": "ababbqyr", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocumentAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocumentAsync.json index 4cfd160fe61c..ac47455d79ca 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocumentAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedDynamicDocumentAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027avdcfapx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027swtvuldi\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1018", + "Content-Length": "962", "Content-Type": "application/json", - "traceparent": "00-352faff1f4a2974fba3bdc95d1d8624b-43e89ad3b14be940-00", + "traceparent": "00-27e4906ed0f7664fb616fc61c21f16ee-eba85ecc85ff8d4f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8363316349f54d2b909cd08d181068ae", "x-ms-return-client-request-id": "true" @@ -40,13 +40,7 @@ "coordinates": [ -122.13157699999999, 47.678581000000001 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } + ] }, "address": null, "rooms": [] @@ -56,16 +50,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "83633163-49f5-4d2b-909c-d08d181068ae", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:48:41 GMT", - "elapsed-time": "72", + "Date": "Mon, 01 Jun 2020 12:05:25 GMT", + "elapsed-time": "134", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "83633163-49f5-4d2b-909c-d08d181068ae", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "83633163-49f5-4d2b-909c-d08d181068ae" }, "ResponseBody": { "value": [ @@ -79,15 +75,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027avdcfapx\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027swtvuldi\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-a23d0a66511a02418487bc5873bedfc9-9d1742dc652d9a4b-00", + "traceparent": "00-3ac00a4fd36a5c44821d9e98a0d485bb-5e820ed39fbcf24f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ce0b4ac00085d030f1ea2ddc1d5a427d", "x-ms-return-client-request-id": "true" @@ -96,60 +92,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "ce0b4ac0-0085-d030-f1ea-2ddc1d5a427d", "Content-Length": "940", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:48:43 GMT", - "elapsed-time": "8", + "Date": "Mon, 01 Jun 2020 12:05:28 GMT", + "elapsed-time": "37", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "ce0b4ac0-0085-d030-f1ea-2ddc1d5a427d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ce0b4ac0-0085-d030-f1ea-2ddc1d5a427d" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027avdcfapx\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027swtvuldi\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-35c20c47d4d52c45ad916771833744b5-2771003b69083348-00", + "traceparent": "00-da01dbdde543634d9db21daadfa96d0c-a2facc53ffe5f840-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "08f0ae6a80953d42543cf9077e3d28e5", "x-ms-return-client-request-id": "true" @@ -158,21 +125,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:48:44 GMT", - "elapsed-time": "298", + "client-request-id": "08f0ae6a-8095-3d42-543c-f9077e3d28e5", + "Date": "Mon, 01 Jun 2020 12:05:28 GMT", + "elapsed-time": "574", "Expires": "-1", "Pragma": "no-cache", "request-id": "08f0ae6a-8095-3d42-543c-f9077e3d28e5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "08f0ae6a-8095-3d42-543c-f9077e3d28e5" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1375466831", - "SearchIndexName": "avdcfapx", + "SearchIndexName": "swtvuldi", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocument.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocument.json index d6c3233a6fbd..472e8a91d55b 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocument.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocument.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027eoxbyjsf\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027krucruku\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "879", + "Content-Length": "962", "Content-Type": "application/json", - "traceparent": "00-63b1a1a7453a2b429670f213b409c785-9bd324471952004f-00", + "traceparent": "00-4b421dc3ac96e6439302103f5334c48e-e2f89bcca5fcd743-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "45bd018deeee3a730ce795272c4bd29b", "x-ms-return-client-request-id": "true" @@ -35,6 +35,13 @@ "smokingAllowed": false, "lastRenovationDate": "2010-06-27T00:00:00.0000000\u002B00:00", "rating": 5, + "location": { + "type": "Point", + "coordinates": [ + -122.13157699999999, + 47.678581000000001 + ] + }, "address": null, "rooms": [] } @@ -43,16 +50,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "45bd018d-eeee-3a73-0ce7-95272c4bd29b", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:25 GMT", - "elapsed-time": "108", + "Date": "Mon, 01 Jun 2020 12:05:04 GMT", + "elapsed-time": "111", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "45bd018d-eeee-3a73-0ce7-95272c4bd29b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "45bd018d-eeee-3a73-0ce7-95272c4bd29b" }, "ResponseBody": { "value": [ @@ -66,15 +75,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027eoxbyjsf\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027krucruku\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-30d7d8ed290d0f44b05c86c2b4ec506b-0014bfbc8e342746-00", + "traceparent": "00-59986086e8d9eb41ab53bf95b7b7bc05-101ea1663d61e648-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2325cd1bf6fe19b379554259e2158a89", "x-ms-return-client-request-id": "true" @@ -83,48 +92,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "834", + "client-request-id": "2325cd1b-f6fe-19b3-7955-4259e2158a89", + "Content-Length": "940", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:27 GMT", - "elapsed-time": "10", + "Date": "Mon, 01 Jun 2020 12:05:07 GMT", + "elapsed-time": "20", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "2325cd1b-f6fe-19b3-7955-4259e2158a89", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2325cd1b-f6fe-19b3-7955-4259e2158a89" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": null, - "address": null, - "rooms": [] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027eoxbyjsf\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027krucruku\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-dcf688e46520b04593f64453f326c559-7d1f0a7053fe3b4f-00", + "traceparent": "00-560cf293295a524b8f5c0384f50173ad-e3bc23bb4d6d554f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8ccdbfa27fd5941ac7078ce17f2dd5f6", "x-ms-return-client-request-id": "true" @@ -133,21 +125,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:44:27 GMT", - "elapsed-time": "221", + "client-request-id": "8ccdbfa2-7fd5-941a-c707-8ce17f2dd5f6", + "Date": "Mon, 01 Jun 2020 12:05:07 GMT", + "elapsed-time": "723", "Expires": "-1", "Pragma": "no-cache", "request-id": "8ccdbfa2-7fd5-941a-c707-8ce17f2dd5f6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "8ccdbfa2-7fd5-941a-c707-8ce17f2dd5f6" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "433827026", - "SearchIndexName": "eoxbyjsf", + "SearchIndexName": "krucruku", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocumentAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocumentAsync.json index 71147120451f..e1b1439acdaf 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocumentAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RecentlyIndexedStaticDocumentAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vjajgwvs\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wqkuxpja\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "879", + "Content-Length": "962", "Content-Type": "application/json", - "traceparent": "00-c028d50c01bc0e4fb38db07f47ee7f54-34d5a108faa58946-00", + "traceparent": "00-e010c54ffd0c324a9fa822cd0d0e6e10-de590b41c3b4e445-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "aa5f713be58bf17803b0715e17f2aff2", "x-ms-return-client-request-id": "true" @@ -35,6 +35,13 @@ "smokingAllowed": false, "lastRenovationDate": "2010-06-27T00:00:00.0000000\u002B00:00", "rating": 5, + "location": { + "type": "Point", + "coordinates": [ + -122.13157699999999, + 47.678581000000001 + ] + }, "address": null, "rooms": [] } @@ -43,16 +50,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "aa5f713b-e58b-f178-03b0-715e17f2aff2", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:04 GMT", - "elapsed-time": "90", + "Date": "Mon, 01 Jun 2020 12:05:35 GMT", + "elapsed-time": "93", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "aa5f713b-e58b-f178-03b0-715e17f2aff2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "aa5f713b-e58b-f178-03b0-715e17f2aff2" }, "ResponseBody": { "value": [ @@ -66,15 +75,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vjajgwvs\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wqkuxpja\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-8a32adef8dcc9649bca694ba468b0954-db2a6e8ff80a4d47-00", + "traceparent": "00-32bb27c3a27a5540b8c066d7236a731f-12dad64cce994b43-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "93de715e8cce15b225b9af5b7103eb25", "x-ms-return-client-request-id": "true" @@ -83,48 +92,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "834", + "client-request-id": "93de715e-8cce-15b2-25b9-af5b7103eb25", + "Content-Length": "940", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:06 GMT", + "Date": "Mon, 01 Jun 2020 12:05:38 GMT", "elapsed-time": "9", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "93de715e-8cce-15b2-25b9-af5b7103eb25", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "93de715e-8cce-15b2-25b9-af5b7103eb25" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": null, - "address": null, - "rooms": [] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vjajgwvs\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wqkuxpja\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-18cef57c19e05a428a2d64781389e4b6-fb90df528864464e-00", + "traceparent": "00-11b507a223fed54287d433c4edc5444d-cfb27209b0e48c4d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3c0735ca040bd9897a3c734084c58a72", "x-ms-return-client-request-id": "true" @@ -133,21 +125,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:49:06 GMT", - "elapsed-time": "227", + "client-request-id": "3c0735ca-040b-d989-7a3c-734084c58a72", + "Date": "Mon, 01 Jun 2020 12:05:38 GMT", + "elapsed-time": "510", "Expires": "-1", "Pragma": "no-cache", "request-id": "3c0735ca-040b-d989-7a3c-734084c58a72", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "3c0735ca-040b-d989-7a3c-734084c58a72" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1353165967", - "SearchIndexName": "vjajgwvs", + "SearchIndexName": "wqkuxpja", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtc.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtc.json index fe38df76139c..9f3ee4ccb41f 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtc.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtc.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027mtcjwvpn\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bbcunyhs\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "278", + "Content-Length": "294", "Content-Type": "application/json", - "traceparent": "00-7b7a218972643f4593bfe947cdc2ec1f-30e389a0875d3845-00", + "traceparent": "00-010f47555fa97f4f8fa2c05453d2d6dd-a830bf1b0ca98640-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f7a4c22c78dddacfb1d808b89b0aec32", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": "2010-06-27T00:00:00.0000000-08:00", "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "f7a4c22c-78dd-dacf-b1d8-08b89b0aec32", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:48 GMT", - "elapsed-time": "76", + "Date": "Mon, 01 Jun 2020 11:27:22 GMT", + "elapsed-time": "96", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "f7a4c22c-78dd-dacf-b1d8-08b89b0aec32", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f7a4c22c-78dd-dacf-b1d8-08b89b0aec32" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027mtcjwvpn\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bbcunyhs\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-b9c921bad06624478753093bb18d2b6e-b6cb349266515c4f-00", + "traceparent": "00-e3cb02fd50058e42a29ad75bdb19bc39-81b975ae10ae8941-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "fd0641a31eab57b430547fefdad08e0b", "x-ms-return-client-request-id": "true" @@ -78,16 +81,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "fd0641a3-1eab-57b4-3054-7fefdad08e0b", "Content-Length": "243", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:44:50 GMT", - "elapsed-time": "8", + "Date": "Mon, 01 Jun 2020 11:27:24 GMT", + "elapsed-time": "10", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "fd0641a3-1eab-57b4-3054-7fefdad08e0b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "fd0641a3-1eab-57b4-3054-7fefdad08e0b" }, "ResponseBody": { "hotelId": "1", @@ -106,15 +111,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027mtcjwvpn\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bbcunyhs\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-e76c37dfc5442d47a4e108f63cd2e8a0-fad1b6b58a095340-00", + "traceparent": "00-07fa7d14918b2b4da581f5c841b93e42-48fbe4fcd7a8c543-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "9517b5720fdcf163424ab7950cc3a3d9", "x-ms-return-client-request-id": "true" @@ -123,21 +128,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:44:50 GMT", - "elapsed-time": "170", + "client-request-id": "9517b572-0fdc-f163-424a-b7950cc3a3d9", + "Date": "Mon, 01 Jun 2020 11:27:26 GMT", + "elapsed-time": "667", "Expires": "-1", "Pragma": "no-cache", "request-id": "9517b572-0fdc-f163-424a-b7950cc3a3d9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "9517b572-0fdc-f163-424a-b7950cc3a3d9" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "514352695", - "SearchIndexName": "mtcjwvpn", + "SearchIndexName": "bbcunyhs", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtcAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtcAsync.json index 67b814bb8e4d..2fd8d0817a7d 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtcAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/RoundtripChangesToUtcAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027rlwqciat\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027eiefinwm\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "278", + "Content-Length": "294", "Content-Type": "application/json", - "traceparent": "00-152c922efded6f40afe2a3ee76dfd6c0-262b80216d8f3d4f-00", + "traceparent": "00-99b01072fd1ad544b6d833b3aead4268-d60a86b3bda7a747-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "90ea827e2f761f83ac770431dcd23fc1", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": "2010-06-27T00:00:00.0000000-08:00", "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "90ea827e-2f76-1f83-ac77-0431dcd23fc1", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:28 GMT", - "elapsed-time": "134", + "Date": "Mon, 01 Jun 2020 11:29:28 GMT", + "elapsed-time": "132", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "90ea827e-2f76-1f83-ac77-0431dcd23fc1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "90ea827e-2f76-1f83-ac77-0431dcd23fc1" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027rlwqciat\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027eiefinwm\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-4c5e36248750ba4ca26fd27e45e1df14-6a75d47c85a86a40-00", + "traceparent": "00-ff99100ffe421a42b6eceb324f4bce42-4cd55f407ee8894d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "26d08ddb6c66331f89a7e6eef9859689", "x-ms-return-client-request-id": "true" @@ -78,16 +81,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "26d08ddb-6c66-331f-89a7-e6eef9859689", "Content-Length": "243", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:30 GMT", - "elapsed-time": "8", + "Date": "Mon, 01 Jun 2020 11:29:30 GMT", + "elapsed-time": "11", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "26d08ddb-6c66-331f-89a7-e6eef9859689", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "26d08ddb-6c66-331f-89a7-e6eef9859689" }, "ResponseBody": { "hotelId": "1", @@ -106,15 +111,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027rlwqciat\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027eiefinwm\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-7addf795b54b8d42a8089c354ded5ba9-e54ac78b627d8b44-00", + "traceparent": "00-f70a2560e9132f4c90dcfb74cf9a6c55-b9fc9cb3241faa42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "c1c3aaec550ec72ede64a37b001da8ef", "x-ms-return-client-request-id": "true" @@ -123,21 +128,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:49:30 GMT", - "elapsed-time": "222", + "client-request-id": "c1c3aaec-550e-c72e-de64-a37b001da8ef", + "Date": "Mon, 01 Jun 2020 11:29:30 GMT", + "elapsed-time": "567", "Expires": "-1", "Pragma": "no-cache", "request-id": "c1c3aaec-550e-c72e-de64-a37b001da8ef", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "c1c3aaec-550e-c72e-de64-a37b001da8ef" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "144595203", - "SearchIndexName": "rlwqciat", + "SearchIndexName": "eiefinwm", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtrips.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtrips.json index 532289c5b72f..93e051548b1f 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtrips.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtrips.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027cyjbkciy\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027htpcadqs\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "608", + "Content-Length": "624", "Content-Type": "application/json", - "traceparent": "00-05bb4bd8fbb36e4192ab2fc5000f6a21-f4d537af3b817742-00", + "traceparent": "00-4b11f12ef4c7cb45acacee0915ef5438-5bd1bf75a7b3094c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ba72cae48d6b18784cff3b464ee836d8", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": { "streetAddress": null, "city": null, @@ -65,16 +66,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "ba72cae4-8d6b-1878-4cff-3b464ee836d8", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:45:11 GMT", - "elapsed-time": "94", + "Date": "Mon, 01 Jun 2020 11:41:20 GMT", + "elapsed-time": "116", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "ba72cae4-8d6b-1878-4cff-3b464ee836d8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ba72cae4-8d6b-1878-4cff-3b464ee836d8" }, "ResponseBody": { "value": [ @@ -88,15 +91,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027cyjbkciy\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027htpcadqs\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-ba113262bd515949b12b958313f8d535-d406811a9cc04141-00", + "traceparent": "00-7141dcf9e0b736418043985734b148cd-13761a7667ccd343-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "798ede94329eb9a297a83d07640f2343", "x-ms-return-client-request-id": "true" @@ -105,16 +108,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "798ede94-329e-b9a2-97a8-3d07640f2343", "Content-Length": "586", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:45:13 GMT", - "elapsed-time": "12", + "Date": "Mon, 01 Jun 2020 11:41:22 GMT", + "elapsed-time": "14", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "798ede94-329e-b9a2-97a8-3d07640f2343", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "798ede94-329e-b9a2-97a8-3d07640f2343" }, "ResponseBody": { "hotelId": "1", @@ -160,15 +165,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027cyjbkciy\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027htpcadqs\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-b953dcd50d96c94590cbd049e1b279f3-7e85306592c4a74a-00", + "traceparent": "00-71145ccf6e42414da5d29d1bd3141baf-6126323226557445-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "0096144fd0940abcb7d25585213b4dd6", "x-ms-return-client-request-id": "true" @@ -177,21 +182,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:45:13 GMT", - "elapsed-time": "288", + "client-request-id": "0096144f-d094-0abc-b7d2-5585213b4dd6", + "Date": "Mon, 01 Jun 2020 11:41:22 GMT", + "elapsed-time": "506", "Expires": "-1", "Pragma": "no-cache", "request-id": "0096144f-d094-0abc-b7d2-5585213b4dd6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "0096144f-d094-0abc-b7d2-5585213b4dd6" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "226392841", - "SearchIndexName": "cyjbkciy", + "SearchIndexName": "htpcadqs", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtripsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtripsAsync.json index f77b5f326475..633baadbf679 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtripsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/StaticDocumentWithNullsRoundtripsAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027tyrjkwwv\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ypvyesat\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "608", + "Content-Length": "624", "Content-Type": "application/json", - "traceparent": "00-656cd5231dc8334a884227b5c6c2fb48-75cd138a1490c845-00", + "traceparent": "00-e0508f5425e9bb4387c5d72619d21819-281d6b6740bd354d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2e413dc21dec5a9ca767cde11dd6490b", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": { "streetAddress": null, "city": null, @@ -65,16 +66,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "2e413dc2-1dec-5a9c-a767-cde11dd6490b", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:51 GMT", - "elapsed-time": "75", + "Date": "Mon, 01 Jun 2020 11:29:54 GMT", + "elapsed-time": "103", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "2e413dc2-1dec-5a9c-a767-cde11dd6490b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2e413dc2-1dec-5a9c-a767-cde11dd6490b" }, "ResponseBody": { "value": [ @@ -88,15 +91,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027tyrjkwwv\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ypvyesat\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-29336f8adec9bc4d8710bde633e9a573-dcea7cad80c5114b-00", + "traceparent": "00-15f0c469007eb24fa52984f9c56bc4ac-e8fd5395a6bbf84a-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "cb53b580bced7b11d26d24c4ff60a775", "x-ms-return-client-request-id": "true" @@ -105,16 +108,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "cb53b580-bced-7b11-d26d-24c4ff60a775", "Content-Length": "586", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:49:53 GMT", - "elapsed-time": "10", + "Date": "Mon, 01 Jun 2020 11:29:56 GMT", + "elapsed-time": "12", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "cb53b580-bced-7b11-d26d-24c4ff60a775", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "cb53b580-bced-7b11-d26d-24c4ff60a775" }, "ResponseBody": { "hotelId": "1", @@ -160,15 +165,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027tyrjkwwv\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ypvyesat\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-12985b9af76f614d8df2c442048b4336-3510e3e2916e4540-00", + "traceparent": "00-7506133ece1fbb4094fc8eb121ab3a85-82e6a6f1b575c34c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "7a0fd72aa46936dc021a6df6098bddcc", "x-ms-return-client-request-id": "true" @@ -177,21 +182,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:49:53 GMT", - "elapsed-time": "192", + "client-request-id": "7a0fd72a-a469-36dc-021a-6df6098bddcc", + "Date": "Mon, 01 Jun 2020 11:29:56 GMT", + "elapsed-time": "529", "Expires": "-1", "Pragma": "no-cache", "request-id": "7a0fd72a-a469-36dc-021a-6df6098bddcc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "7a0fd72a-a469-36dc-021a-6df6098bddcc" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "136068368", - "SearchIndexName": "tyrjkwwv", + "SearchIndexName": "ypvyesat", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStatic.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStatic.json index df557287f494..331a96426de2 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStatic.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStatic.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027gxwjbown\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027mfcflcgs\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1384", + "Content-Length": "1458", "Content-Type": "application/json", - "traceparent": "00-a369e0283e8e924e99bcb04a7d1c4d06-253254486a68e74b-00", + "traceparent": "00-1054a82ad5271b469eff7e51976c1720-0a33d6e5ce8fa74e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d39c287266957a8ebdbeb57b7564a066", "x-ms-return-client-request-id": "true" @@ -34,6 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1999-09-06T00:00:00.0000000\u002B00:00", "rating": 3, + "location": { + "type": "Point", + "coordinates": [ + -78.940483, + 35.904159999999997 + ] + }, "address": { "streetAddress": "6910 Fayetteville Rd", "city": "Durham", @@ -73,16 +80,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "d39c2872-6695-7a8e-bdbe-b57b7564a066", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:45:58 GMT", - "elapsed-time": "112", + "Date": "Mon, 01 Jun 2020 12:05:15 GMT", + "elapsed-time": "102", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "d39c2872-6695-7a8e-bdbe-b57b7564a066", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d39c2872-6695-7a8e-bdbe-b57b7564a066" }, "ResponseBody": { "value": [ @@ -96,15 +105,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027gxwjbown\u0027)/docs(\u00272\u0027)?$select=description%2ChotelName%2Caddress%2Fcity%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027mfcflcgs\u0027)/docs(\u00272\u0027)?$select=description%2ChotelName%2Caddress%2Fcity%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-b2141010476efc46b8378dd8eef678dc-3786d22bbd50ba4b-00", + "traceparent": "00-fca13401e1100141a31f9f42a370228f-ed8bc2c8d3aefe42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3837244195ad9b6302a4eb63dab94f32", "x-ms-return-client-request-id": "true" @@ -113,43 +122,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "38372441-95ad-9b63-02a4-eb63dab94f32", "Content-Length": "288", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:46:00 GMT", - "elapsed-time": "7", + "Date": "Mon, 01 Jun 2020 12:05:17 GMT", + "elapsed-time": "9", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "38372441-95ad-9b63-02a4-eb63dab94f32", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "38372441-95ad-9b63-02a4-eb63dab94f32" }, - "ResponseBody": { - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "address": { - "city": "Durham" - }, - "rooms": [ - { - "baseRate": 2.44 - }, - { - "baseRate": 7.69 - } - ] - } + "ResponseBody": "{\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022address\u0022:{\u0022city\u0022:\u0022Durham\u0022},\u0022rooms\u0022:[{\u0022baseRate\u0022:2.44},{\u0022baseRate\u0022:7.69}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027gxwjbown\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027mfcflcgs\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-79b747968480d84bbabb3706aad42a35-a6ac1bade7d63e47-00", + "traceparent": "00-5167f74a2b49bb4f99309549f1ed59b2-0f02b0ba9d940343-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "7252a83a77138fbb185a69f8f222e0a6", "x-ms-return-client-request-id": "true" @@ -158,21 +155,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:46:00 GMT", - "elapsed-time": "320", + "client-request-id": "7252a83a-7713-8fbb-185a-69f8f222e0a6", + "Date": "Mon, 01 Jun 2020 12:05:17 GMT", + "elapsed-time": "897", "Expires": "-1", "Pragma": "no-cache", "request-id": "7252a83a-7713-8fbb-185a-69f8f222e0a6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "7252a83a-7713-8fbb-185a-69f8f222e0a6" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1560836648", - "SearchIndexName": "gxwjbown", + "SearchIndexName": "mfcflcgs", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStaticAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStaticAsync.json index 3850274594ef..db971c08027c 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStaticAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/GetDocumentTests/UnselectedFieldsNullStaticAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fcsqltcg\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027uuimiwom\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1384", + "Content-Length": "1458", "Content-Type": "application/json", - "traceparent": "00-0fb691263dc06546aa8874685a065e75-9da3005dba286247-00", + "traceparent": "00-62f986e7d8fe1e45b8fcd511bf31c12e-b87f93273684504b-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "4601d57268f632293dd1260264c08611", "x-ms-return-client-request-id": "true" @@ -34,6 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1999-09-06T00:00:00.0000000\u002B00:00", "rating": 3, + "location": { + "type": "Point", + "coordinates": [ + -78.940483, + 35.904159999999997 + ] + }, "address": { "streetAddress": "6910 Fayetteville Rd", "city": "Durham", @@ -73,16 +80,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "4601d572-68f6-3229-3dd1-260264c08611", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:50:38 GMT", - "elapsed-time": "112", + "Date": "Mon, 01 Jun 2020 12:05:45 GMT", + "elapsed-time": "100", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "4601d572-68f6-3229-3dd1-260264c08611", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "4601d572-68f6-3229-3dd1-260264c08611" }, "ResponseBody": { "value": [ @@ -96,15 +105,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fcsqltcg\u0027)/docs(\u00272\u0027)?$select=description%2ChotelName%2Caddress%2Fcity%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027uuimiwom\u0027)/docs(\u00272\u0027)?$select=description%2ChotelName%2Caddress%2Fcity%2Crooms%2FbaseRate\u0026api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-829b00ba73c63147a08b337cd2821644-ca850814e1072543-00", + "traceparent": "00-b2948efadc6d7547ad8266c08b2b4888-6fe354fef7eb5f4c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "630df8ec3f929a8179bffcb17ecb2dbb", "x-ms-return-client-request-id": "true" @@ -113,43 +122,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "630df8ec-3f92-9a81-79bf-fcb17ecb2dbb", "Content-Length": "288", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:50:40 GMT", - "elapsed-time": "7", + "Date": "Mon, 01 Jun 2020 12:05:47 GMT", + "elapsed-time": "10", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "630df8ec-3f92-9a81-79bf-fcb17ecb2dbb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "630df8ec-3f92-9a81-79bf-fcb17ecb2dbb" }, - "ResponseBody": { - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "address": { - "city": "Durham" - }, - "rooms": [ - { - "baseRate": 2.44 - }, - { - "baseRate": 7.69 - } - ] - } + "ResponseBody": "{\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022address\u0022:{\u0022city\u0022:\u0022Durham\u0022},\u0022rooms\u0022:[{\u0022baseRate\u0022:2.44},{\u0022baseRate\u0022:7.69}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fcsqltcg\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027uuimiwom\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-ed86a7ee137e5f4492f6b5b84d3f940a-70513738c463e145-00", + "traceparent": "00-9dcb347b33febf408d0ad71c82ca442e-d9a685fccce3b242-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ffc541c8c037b5bd6ff1a35b4863fc4b", "x-ms-return-client-request-id": "true" @@ -158,21 +155,23 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:50:40 GMT", - "elapsed-time": "262", + "client-request-id": "ffc541c8-c037-b5bd-6ff1-a35b4863fc4b", + "Date": "Mon, 01 Jun 2020 12:05:47 GMT", + "elapsed-time": "534", "Expires": "-1", "Pragma": "no-cache", "request-id": "ffc541c8-c037-b5bd-6ff1-a35b4863fc4b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ffc541c8-c037-b5bd-6ff1-a35b4863fc4b" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "495263731", - "SearchIndexName": "fcsqltcg", + "SearchIndexName": "uuimiwom", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_QUERY_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeys.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeys.json index 46cf418dc50f..b1d61a9a9afb 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeys.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeys.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027viighfmx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pxcphfjr\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "483", + "Content-Length": "515", "Content-Type": "application/json", - "traceparent": "00-abb96ac99ba30641846b512a9f944fa6-459d9e1bd28a2c42-00", + "traceparent": "00-78609929dc718448bdd600b09cd03dad-14d25bb55049274c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "24a4f4785ace54d0676f90da72dde4e1", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "24a4f478-5ace-54d0-676f-90da72dde4e1", "Content-Length": "137", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:51:23 GMT", - "elapsed-time": "95", + "Date": "Mon, 01 Jun 2020 11:30:43 GMT", + "elapsed-time": "111", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "24a4f478-5ace-54d0-676f-90da72dde4e1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "24a4f478-5ace-54d0-676f-90da72dde4e1" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027viighfmx\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pxcphfjr\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-4978088489c7f34e91be7e1efea4936c-174fb120219f5e40-00", + "traceparent": "00-f8f4353e677c7d4d9f990e5256a745bc-ce0141e3d4851b4e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "81c662216cffeed460af5d745e06a65b", "x-ms-return-client-request-id": "true" @@ -99,31 +103,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "81c66221-6cff-eed4-60af-5d745e06a65b", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:51:25 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 11:30:46 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "81c66221-6cff-eed4-60af-5d745e06a65b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "81c66221-6cff-eed4-60af-5d745e06a65b" }, "ResponseBody": "\uFEFF2" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027viighfmx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pxcphfjr\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-863188836f75554c908ec61ea52e4301-b20cf4b4cdd0524d-00", + "traceparent": "00-d5b618822c56c649b58482a028c3274c-2a96d689bb641d4e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d842c065667af648595940b29f832ee7", "x-ms-return-client-request-id": "true" @@ -143,16 +149,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "d842c065-667a-f648-5959-40b29f832ee7", "Content-Length": "137", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:51:25 GMT", - "elapsed-time": "29", + "Date": "Mon, 01 Jun 2020 11:30:46 GMT", + "elapsed-time": "58", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "d842c065-667a-f648-5959-40b29f832ee7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d842c065-667a-f648-5959-40b29f832ee7" }, "ResponseBody": { "value": [ @@ -172,15 +180,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027viighfmx\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pxcphfjr\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-33e77824c427b740aab499e5d5226fb6-40b6fcc28dfae940-00", + "traceparent": "00-2015c9640016c24e9e765ac65652de2b-b676db28c2610744-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3fcd5e96716e0b8820b6c41ffd5bf660", "x-ms-return-client-request-id": "true" @@ -189,29 +197,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "3fcd5e96-716e-0b88-20b6-c41ffd5bf660", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:51:26 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 11:30:48 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "3fcd5e96-716e-0b88-20b6-c41ffd5bf660", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "3fcd5e96-716e-0b88-20b6-c41ffd5bf660" }, "ResponseBody": "\uFEFF0" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027viighfmx\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pxcphfjr\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-a0bdb3272dd90b43aa96196eb38647f2-ee32c82a41599449-00", + "traceparent": "00-8e0008d7a750b34ba9a0853f03932957-49684d61e4f7ee4f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "b17534c90c9bba6619cf28a52b214edc", "x-ms-return-client-request-id": "true" @@ -220,20 +230,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:51:26 GMT", - "elapsed-time": "240", + "client-request-id": "b17534c9-0c9b-ba66-19cf-28a52b214edc", + "Date": "Mon, 01 Jun 2020 11:30:48 GMT", + "elapsed-time": "527", "Expires": "-1", "Pragma": "no-cache", "request-id": "b17534c9-0c9b-ba66-19cf-28a52b214edc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b17534c9-0c9b-ba66-19cf-28a52b214edc" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "432976220", - "SearchIndexName": "viighfmx", + "SearchIndexName": "pxcphfjr", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeysAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeysAsync.json index 5f7d79ebf635..df7736302a61 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeysAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DeleteByKeysAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vhswvwow\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027udllcene\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "483", + "Content-Length": "515", "Content-Type": "application/json", - "traceparent": "00-6c78ff6f9615da4983eeaacf594024e9-1639a8d64599784d-00", + "traceparent": "00-ac3ff4906b8dca48b9212ee36580aac1-b500bf651c6a2540-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "9a1bff16231abc751588e22f1bb62dd1", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "9a1bff16-231a-bc75-1588-e22f1bb62dd1", "Content-Length": "137", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:56:48 GMT", - "elapsed-time": "75", + "Date": "Mon, 01 Jun 2020 11:34:12 GMT", + "elapsed-time": "102", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "9a1bff16-231a-bc75-1588-e22f1bb62dd1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "9a1bff16-231a-bc75-1588-e22f1bb62dd1" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vhswvwow\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027udllcene\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-0d26764757bc5c4db59029733c16ddc0-ea78223bff47bd4a-00", + "traceparent": "00-394d1947bece674d94fbbead644c92be-f57a1fcf0588e243-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2a68e09fe70929f94e44de948f12181c", "x-ms-return-client-request-id": "true" @@ -99,31 +103,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "2a68e09f-e709-29f9-4e44-de948f12181c", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:56:50 GMT", - "elapsed-time": "5", + "Date": "Mon, 01 Jun 2020 11:34:14 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "2a68e09f-e709-29f9-4e44-de948f12181c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2a68e09f-e709-29f9-4e44-de948f12181c" }, "ResponseBody": "\uFEFF2" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vhswvwow\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027udllcene\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "95", "Content-Type": "application/json", - "traceparent": "00-795527e0d5f55d4291164dba59756ff1-da0317fd0cc32349-00", + "traceparent": "00-7011038ffaa5bc408fe03ba96c60358e-8058369ee830eb4b-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2e8060ad12fd20dd69d256285fe0c3f1", "x-ms-return-client-request-id": "true" @@ -143,16 +149,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "2e8060ad-12fd-20dd-69d2-56285fe0c3f1", "Content-Length": "137", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:56:50 GMT", - "elapsed-time": "24", + "Date": "Mon, 01 Jun 2020 11:34:14 GMT", + "elapsed-time": "49", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "2e8060ad-12fd-20dd-69d2-56285fe0c3f1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2e8060ad-12fd-20dd-69d2-56285fe0c3f1" }, "ResponseBody": { "value": [ @@ -172,15 +180,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vhswvwow\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027udllcene\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-46e11dedff9a074b97f1066d8bd18fff-e6b304696a206c48-00", + "traceparent": "00-7cc66c5cdd6f3b40a21e4963b2bbc21b-8861d97968165d42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "b614be8be5c02fbb05f14bd545e02d03", "x-ms-return-client-request-id": "true" @@ -189,29 +197,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "b614be8b-e5c0-2fbb-05f1-4bd545e02d03", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:56:52 GMT", + "Date": "Mon, 01 Jun 2020 11:34:16 GMT", "elapsed-time": "3", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "b614be8b-e5c0-2fbb-05f1-4bd545e02d03", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b614be8b-e5c0-2fbb-05f1-4bd545e02d03" }, "ResponseBody": "\uFEFF0" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vhswvwow\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027udllcene\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-24e0efe1978aa247b4229e54c6f574fd-46c47fbd9da09e4f-00", + "traceparent": "00-d3d4516cef966e41bf08497642db5dc8-49b686a14fe93445-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "bb82c56fff358dd30348c13790d0ca6d", "x-ms-return-client-request-id": "true" @@ -220,20 +230,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:56:52 GMT", - "elapsed-time": "184", + "client-request-id": "bb82c56f-ff35-8dd3-0348-c13790d0ca6d", + "Date": "Mon, 01 Jun 2020 11:34:16 GMT", + "elapsed-time": "526", "Expires": "-1", "Pragma": "no-cache", "request-id": "bb82c56f-ff35-8dd3-0348-c13790d0ca6d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "bb82c56f-ff35-8dd3-0348-c13790d0ca6d" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "282699616", - "SearchIndexName": "vhswvwow", + "SearchIndexName": "udllcene", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStatic.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStatic.json index bf7a141861cf..a05af7600c4e 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStatic.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStatic.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dvlapiia\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bykgcspy\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "251", + "Content-Length": "267", "Content-Type": "application/json", - "traceparent": "00-b7d991d51515e941b8dcae354b4d2bd4-8e3342da93b78a48-00", + "traceparent": "00-a35b389c7bc6ea4585132e9e15b98c90-1457f410b79ac748-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "cf1fd8bb01689a78c8f190efb0c92648", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "cf1fd8bb-0168-9a78-c8f1-90efb0c92648", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:52:14 GMT", - "elapsed-time": "79", + "Date": "Mon, 01 Jun 2020 11:31:12 GMT", + "elapsed-time": "113", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "cf1fd8bb-0168-9a78-c8f1-90efb0c92648", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "cf1fd8bb-0168-9a78-c8f1-90efb0c92648" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dvlapiia\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bykgcspy\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-8622fa876d597c46b260db2f71be3f5a-d690b18d7d68c642-00", + "traceparent": "00-a87facff25c8ab41be9cf18a1e20be4e-28ebd13b6fd4294a-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5d0d15f30a0e1bd97d67a268e54982b2", "x-ms-return-client-request-id": "true" @@ -78,31 +81,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5d0d15f3-0a0e-1bd9-7d67-a268e54982b2", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:52:16 GMT", - "elapsed-time": "5", + "Date": "Mon, 01 Jun 2020 11:31:13 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5d0d15f3-0a0e-1bd9-7d67-a268e54982b2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5d0d15f3-0a0e-1bd9-7d67-a268e54982b2" }, "ResponseBody": "\uFEFF1" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dvlapiia\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bykgcspy\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "252", + "Content-Length": "268", "Content-Type": "application/json", - "traceparent": "00-a83570598540ca4fa51eb45862446656-fcc5d1a7ced7524d-00", + "traceparent": "00-62bd18bce080744fbcdec749069bcb43-a736050c8c262945-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5f4cc33dfde379a6066cc6a2ec65fe82", "x-ms-return-client-request-id": "true" @@ -121,6 +126,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -129,16 +135,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5f4cc33d-fde3-79a6-066c-c6a2ec65fe82", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:52:16 GMT", - "elapsed-time": "28", + "Date": "Mon, 01 Jun 2020 11:31:13 GMT", + "elapsed-time": "51", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5f4cc33d-fde3-79a6-066c-c6a2ec65fe82", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5f4cc33d-fde3-79a6-066c-c6a2ec65fe82" }, "ResponseBody": { "value": [ @@ -152,15 +160,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dvlapiia\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bykgcspy\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-bfb98ba84d53f34d9430a33db3b25284-6a378a776ea37649-00", + "traceparent": "00-a369f6a1375ba743a1c0644f4d7d162d-c9c9e104d24ce94a-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "7ebc7de48b9ab094ff0451005e10b47e", "x-ms-return-client-request-id": "true" @@ -169,29 +177,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "7ebc7de4-8b9a-b094-ff04-51005e10b47e", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:52:18 GMT", + "Date": "Mon, 01 Jun 2020 11:31:16 GMT", "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "7ebc7de4-8b9a-b094-ff04-51005e10b47e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "7ebc7de4-8b9a-b094-ff04-51005e10b47e" }, "ResponseBody": "\uFEFF0" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dvlapiia\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bykgcspy\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-d70a72504ea3034ab9f661e01ab0c4c9-613e37afb5d7674c-00", + "traceparent": "00-84869a006378ed44a2bdf4dfa1627cdf-06f508dc84ff7f46-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ecb2de6fc67cf5656e9356a144372e18", "x-ms-return-client-request-id": "true" @@ -200,20 +210,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:52:18 GMT", - "elapsed-time": "162", + "client-request-id": "ecb2de6f-c67c-f565-6e93-56a144372e18", + "Date": "Mon, 01 Jun 2020 11:31:16 GMT", + "elapsed-time": "523", "Expires": "-1", "Pragma": "no-cache", "request-id": "ecb2de6f-c67c-f565-6e93-56a144372e18", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ecb2de6f-c67c-f565-6e93-56a144372e18" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "170080043", - "SearchIndexName": "dvlapiia", + "SearchIndexName": "bykgcspy", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStaticAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStaticAsync.json index 08b51b570b14..bc76b41515fa 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStaticAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowDeletingExtraStaticAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027bvmydjqk\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fqhhfxso\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "251", + "Content-Length": "267", "Content-Type": "application/json", - "traceparent": "00-4c787cf88ebd4f4b9a0d1c5d11326fc9-84afe56c946cde49-00", + "traceparent": "00-5ad1a586f18f064ba8c2ad3c783cbf44-19d1b4282dc90d4f-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ef71c43eb239eb400f7b0539411e1a36", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "ef71c43e-b239-eb40-0f7b-0539411e1a36", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:57:39 GMT", - "elapsed-time": "109", + "Date": "Mon, 01 Jun 2020 11:34:40 GMT", + "elapsed-time": "123", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "ef71c43e-b239-eb40-0f7b-0539411e1a36", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ef71c43e-b239-eb40-0f7b-0539411e1a36" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027bvmydjqk\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fqhhfxso\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-da4966ae170dfc43bdd702514aba823c-5697e1611473a147-00", + "traceparent": "00-620b08a8466f2f489f290fdba568d81a-df74348fd317fa48-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "edbe3f1d740eaf2e72ba0901f3d523b6", "x-ms-return-client-request-id": "true" @@ -78,31 +81,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "edbe3f1d-740e-af2e-72ba-0901f3d523b6", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:57:41 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 11:34:42 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "edbe3f1d-740e-af2e-72ba-0901f3d523b6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "edbe3f1d-740e-af2e-72ba-0901f3d523b6" }, "ResponseBody": "\uFEFF1" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027bvmydjqk\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fqhhfxso\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "252", + "Content-Length": "268", "Content-Type": "application/json", - "traceparent": "00-d7402b3dd7407a4ab9542c6ddfd159df-6aa753820b264f4c-00", + "traceparent": "00-abfa848cf919b24397b0f855792e2d63-5d1390a8443c1b49-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5c80a3c88e4ef62bcc2fb47d85b4ef83", "x-ms-return-client-request-id": "true" @@ -121,6 +126,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -129,16 +135,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5c80a3c8-8e4e-f62b-cc2f-b47d85b4ef83", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:57:41 GMT", - "elapsed-time": "26", + "Date": "Mon, 01 Jun 2020 11:34:42 GMT", + "elapsed-time": "50", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5c80a3c8-8e4e-f62b-cc2f-b47d85b4ef83", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5c80a3c8-8e4e-f62b-cc2f-b47d85b4ef83" }, "ResponseBody": { "value": [ @@ -152,15 +160,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027bvmydjqk\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fqhhfxso\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-599897cf6aa99b438196942a21a27e8d-521552c0b0ab2c44-00", + "traceparent": "00-f3d5a82c10fcc04680c8d37b50086923-0a0f42c1fb167242-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "95be6eda6d3bc97d95c17c7fa93ef839", "x-ms-return-client-request-id": "true" @@ -169,29 +177,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "95be6eda-6d3b-c97d-95c1-7c7fa93ef839", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:57:43 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 11:34:44 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "95be6eda-6d3b-c97d-95c1-7c7fa93ef839", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "95be6eda-6d3b-c97d-95c1-7c7fa93ef839" }, "ResponseBody": "\uFEFF0" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027bvmydjqk\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fqhhfxso\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-d06a8470b9240e4fb56aa5e641fc43d4-c6857b0e34b0d345-00", + "traceparent": "00-6aae3ee529ecb440819bb15121a674c6-410cf8033d6d3f45-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "9d714f57be9d8ee714c720debfb029be", "x-ms-return-client-request-id": "true" @@ -200,20 +210,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:57:43 GMT", - "elapsed-time": "191", + "client-request-id": "9d714f57-be9d-8ee7-14c7-20debfb029be", + "Date": "Mon, 01 Jun 2020 11:34:44 GMT", + "elapsed-time": "663", "Expires": "-1", "Pragma": "no-cache", "request-id": "9d714f57-be9d-8ee7-14c7-20debfb029be", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "9d714f57-be9d-8ee7-14c7-20debfb029be" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "836785609", - "SearchIndexName": "bvmydjqk", + "SearchIndexName": "fqhhfxso", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccess.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccess.json index e8489bc0af5d..0bfaf7e414fb 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccess.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccess.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vlqmnnsq\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027lkknldeb\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "482", + "Content-Length": "514", "Content-Type": "application/json", - "traceparent": "00-323183303138c14eba2e5969ffee9f69-a046e77e3d09be4e-00", + "traceparent": "00-86e57d62c69e8b458ac44de7376e63a9-ac96f7697d73a44b-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "6e910c0169b1aa35c735dc9af96c6957", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "6e910c01-69b1-aa35-c735-dc9af96c6957", "Content-Length": "155", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:52:39 GMT", - "elapsed-time": "130", + "Date": "Mon, 01 Jun 2020 11:31:42 GMT", + "elapsed-time": "121", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "6e910c01-69b1-aa35-c735-dc9af96c6957", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "6e910c01-69b1-aa35-c735-dc9af96c6957" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vlqmnnsq\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027lkknldeb\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-38861e27ca08b7498fc753b37fc847f5-89102d7325a30046-00", + "traceparent": "00-55e1bd4b8db2aa4997d7d52c6dcbf31f-28e2484bd7a3764d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "68f1a98ae169fec5658ba5e97fcee7b7", "x-ms-return-client-request-id": "true" @@ -99,20 +103,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:52:39 GMT", - "elapsed-time": "169", + "client-request-id": "68f1a98a-e169-fec5-658b-a5e97fcee7b7", + "Date": "Mon, 01 Jun 2020 11:31:42 GMT", + "elapsed-time": "547", "Expires": "-1", "Pragma": "no-cache", "request-id": "68f1a98a-e169-fec5-658b-a5e97fcee7b7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "68f1a98a-e169-fec5-658b-a5e97fcee7b7" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "552340877", - "SearchIndexName": "vlqmnnsq", + "SearchIndexName": "lkknldeb", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccessAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccessAsync.json index 25f0bb5adacf..7d155eb24718 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccessAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnPartialSuccessAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fqtgkyic\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ywspvntt\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "482", + "Content-Length": "514", "Content-Type": "application/json", - "traceparent": "00-6e9ac19abc916a42a396177bda5ad072-dca593f46846fe49-00", + "traceparent": "00-4e47cc672c2b554597428dfa2933dbad-27465cdb1f8e3040-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "7f9dfcb9835f94b6255a180359a28d05", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "7f9dfcb9-835f-94b6-255a-180359a28d05", "Content-Length": "155", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:58:05 GMT", - "elapsed-time": "154", + "Date": "Mon, 01 Jun 2020 11:35:08 GMT", + "elapsed-time": "173", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "7f9dfcb9-835f-94b6-255a-180359a28d05", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "7f9dfcb9-835f-94b6-255a-180359a28d05" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027fqtgkyic\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ywspvntt\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-a744320a535f9e4db2dd342bece387d0-bf6d82d434945e45-00", + "traceparent": "00-aa0c8f30e9ac9440a24c0786e1168904-b2ee49d4b68c874c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "7ed8d396f9e8061defb2d1e49dbe7014", "x-ms-return-client-request-id": "true" @@ -99,20 +103,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:58:05 GMT", - "elapsed-time": "249", + "client-request-id": "7ed8d396-f9e8-061d-efb2-d1e49dbe7014", + "Date": "Mon, 01 Jun 2020 11:35:08 GMT", + "elapsed-time": "819", "Expires": "-1", "Pragma": "no-cache", "request-id": "7ed8d396-f9e8-061d-efb2-d1e49dbe7014", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "7ed8d396-f9e8-061d-efb2-d1e49dbe7014" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1834614957", - "SearchIndexName": "fqtgkyic", + "SearchIndexName": "ywspvntt", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccess.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccess.json index 03237008700b..f914c402010a 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccess.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccess.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027xhgsabry\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027jqhgwoeg\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "247", + "Content-Length": "263", "Content-Type": "application/json", - "traceparent": "00-bb6994bf8f823444a9f10c996a9a4c93-ba3c218720961843-00", + "traceparent": "00-ca19f004c3b5f54ebafbb07b3a486280-40390004477cbe44-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1e447e2f19ca569dc22e5e7fcb4b8ebd", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "1e447e2f-19ca-569d-c22e-5e7fcb4b8ebd", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:00 GMT", - "elapsed-time": "134", + "Date": "Mon, 01 Jun 2020 11:32:06 GMT", + "elapsed-time": "133", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "1e447e2f-19ca-569d-c22e-5e7fcb4b8ebd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "1e447e2f-19ca-569d-c22e-5e7fcb4b8ebd" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027xhgsabry\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027jqhgwoeg\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-a8f524281283f74fbc0566c02f23b6a5-68dcb37a33e0154b-00", + "traceparent": "00-952dc14445ae4f4ba498976d727eef6b-e36c1ed92c040d4e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "61f7043e44940beb50485010ec005ba3", "x-ms-return-client-request-id": "true" @@ -78,20 +81,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:53:00 GMT", - "elapsed-time": "235", + "client-request-id": "61f7043e-4494-0beb-5048-5010ec005ba3", + "Date": "Mon, 01 Jun 2020 11:32:06 GMT", + "elapsed-time": "610", "Expires": "-1", "Pragma": "no-cache", "request-id": "61f7043e-4494-0beb-5048-5010ec005ba3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "61f7043e-4494-0beb-5048-5010ec005ba3" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "683326896", - "SearchIndexName": "xhgsabry", + "SearchIndexName": "jqhgwoeg", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccessAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccessAsync.json index 138874344cf3..3103d3ffa2f0 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccessAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DoesNotThrowOnSuccessAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027mrvkcmrl\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ndqkaowd\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "247", + "Content-Length": "263", "Content-Type": "application/json", - "traceparent": "00-e21d49be064eca448c950aaf9dd00c08-03b0aec2f675bd4d-00", + "traceparent": "00-5d2457bf8fcefa41930e8429b667e383-3670b5746ba9b14e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "c055820da40e85843eade3fe89eb38c1", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -38,16 +39,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "c055820d-a40e-8584-3ead-e3fe89eb38c1", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:58:26 GMT", - "elapsed-time": "80", + "Date": "Mon, 01 Jun 2020 11:35:31 GMT", + "elapsed-time": "126", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "c055820d-a40e-8584-3ead-e3fe89eb38c1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "c055820d-a40e-8584-3ead-e3fe89eb38c1" }, "ResponseBody": { "value": [ @@ -61,15 +64,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027mrvkcmrl\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027ndqkaowd\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-7265b234228c704b92831a5d405cb901-a5c0fae4d4a7fc49-00", + "traceparent": "00-2b252aaab02407499216bc8d7dfc1b50-ea111d000e21684e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "65b0cdbe1d286f2ca1f3272e2444350b", "x-ms-return-client-request-id": "true" @@ -78,20 +81,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:58:26 GMT", - "elapsed-time": "199", + "client-request-id": "65b0cdbe-1d28-6f2c-a1f3-272e2444350b", + "Date": "Mon, 01 Jun 2020 11:35:33 GMT", + "elapsed-time": "810", "Expires": "-1", "Pragma": "no-cache", "request-id": "65b0cdbe-1d28-6f2c-a1f3-272e2444350b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "65b0cdbe-1d28-6f2c-a1f3-272e2444350b" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "109207449", - "SearchIndexName": "mrvkcmrl", + "SearchIndexName": "ndqkaowd", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocuments.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocuments.json index f2721aa35fdf..30bdc852aba1 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocuments.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocuments.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027otdhouhx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bcqighys\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "3611", + "Content-Length": "3727", "Content-Type": "application/json", - "traceparent": "00-14551297b9be9b409900a5bde9228d18-194282349fc95348-00", + "traceparent": "00-609535944a83f444a5cad58c0115fb78-3697fa1213d74442-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a7af2b74fd49d414bf6ea5e587749ab2", "x-ms-return-client-request-id": "true" @@ -34,7 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -86,7 +92,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -150,16 +162,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "a7af2b74-fd49-d414-bf6e-a5e587749ab2", "Content-Length": "344", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:22 GMT", - "elapsed-time": "140", + "Date": "Mon, 01 Jun 2020 12:05:54 GMT", + "elapsed-time": "102", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "a7af2b74-fd49-d414-bf6e-a5e587749ab2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "a7af2b74-fd49-d414-bf6e-a5e587749ab2" }, "ResponseBody": { "value": [ @@ -197,15 +211,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027otdhouhx\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bcqighys\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-e87730447af05544942d4641eb8312af-04ca626f19742845-00", + "traceparent": "00-03a165cceba9e34fa70266855a0c2f67-aa805a1ddbd4ec46-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "73e8cc089da49d8c2b7873a9306c9898", "x-ms-return-client-request-id": "true" @@ -214,29 +228,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "73e8cc08-9da4-9d8c-2b78-73a9306c9898", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:53:24 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:05:57 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "73e8cc08-9da4-9d8c-2b78-73a9306c9898", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "73e8cc08-9da4-9d8c-2b78-73a9306c9898" }, "ResponseBody": "\uFEFF3" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027otdhouhx\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027bcqighys\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-a7e1d6cacb448f45ac221e1e079dffa5-fe3893ef7240a34a-00", + "traceparent": "00-f6901611e1dfe14c8048838d001f705e-06db9304fb921348-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e8e6c8afd0812399ba28b88051dac8ee", "x-ms-return-client-request-id": "true" @@ -245,20 +261,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:53:24 GMT", - "elapsed-time": "274", + "client-request-id": "e8e6c8af-d081-2399-ba28-b88051dac8ee", + "Date": "Mon, 01 Jun 2020 12:05:57 GMT", + "elapsed-time": "547", "Expires": "-1", "Pragma": "no-cache", "request-id": "e8e6c8af-d081-2399-ba28-b88051dac8ee", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "e8e6c8af-d081-2399-ba28-b88051dac8ee" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1983224603", - "SearchIndexName": "otdhouhx", + "SearchIndexName": "bcqighys", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocumentsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocumentsAsync.json index 37aaab4ae75c..f714d8c735b3 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocumentsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/DynamicDocumentsAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027pydyisjd\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hhtsuuco\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "3611", + "Content-Length": "3727", "Content-Type": "application/json", - "traceparent": "00-71fa4c724241754a8b9b0d3125a02d1e-8bc1100078c92a41-00", + "traceparent": "00-3c7bfad22d8c9e4791488d3e1fd3e99c-b65e0ce2a4344e48-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "842adc2eefd236b7f3dd2173d1bbdd5c", "x-ms-return-client-request-id": "true" @@ -34,7 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -86,7 +92,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -150,16 +162,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "842adc2e-efd2-36b7-f3dd-2173d1bbdd5c", "Content-Length": "344", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:58:47 GMT", - "elapsed-time": "90", + "Date": "Mon, 01 Jun 2020 12:06:39 GMT", + "elapsed-time": "105", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "842adc2e-efd2-36b7-f3dd-2173d1bbdd5c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "842adc2e-efd2-36b7-f3dd-2173d1bbdd5c" }, "ResponseBody": { "value": [ @@ -197,15 +211,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027pydyisjd\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hhtsuuco\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-07c1ba8efa33394998adf95a7c6fe725-39f4d783a776c047-00", + "traceparent": "00-38d4ca5a24089d46bd92657cb12208b8-7736e0f5179a0d46-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "64f08d5b49f31b48855a8f36b28f9b3e", "x-ms-return-client-request-id": "true" @@ -214,29 +228,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "64f08d5b-49f3-1b48-855a-8f36b28f9b3e", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:58:49 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:06:42 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "64f08d5b-49f3-1b48-855a-8f36b28f9b3e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "64f08d5b-49f3-1b48-855a-8f36b28f9b3e" }, "ResponseBody": "\uFEFF3" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027pydyisjd\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hhtsuuco\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-3c6aa8c71c6f244997b41c227ca261f5-9fbcda28f2444945-00", + "traceparent": "00-0db18ebfd9ec4f4b9f7415b6e35cb3fe-f7b118120cee6940-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "09a530da1c2d8ab913e49b209ca030b2", "x-ms-return-client-request-id": "true" @@ -245,20 +261,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:58:49 GMT", - "elapsed-time": "300", + "client-request-id": "09a530da-1c2d-8ab9-13e4-9b209ca030b2", + "Date": "Mon, 01 Jun 2020 12:06:42 GMT", + "elapsed-time": "702", "Expires": "-1", "Pragma": "no-cache", "request-id": "09a530da-1c2d-8ab9-13e4-9b209ca030b2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "09a530da-1c2d-8ab9-13e4-9b209ca030b2" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1113032202", - "SearchIndexName": "pydyisjd", + "SearchIndexName": "hhtsuuco", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamic.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamic.json index 9fce4312644d..890ba2062a4a 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamic.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamic.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1680", + "Content-Length": "1738", "Content-Type": "application/json", - "traceparent": "00-893b5ee7c547e045be89e909dc11a4c2-49581700f397b641-00", + "traceparent": "00-cd66a50788380544b749b76f39c31999-e776a1d8ec1d7640-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5de7cd27daaba6e6951bc0eddceaac08", "x-ms-return-client-request-id": "true" @@ -34,7 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -75,16 +81,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5de7cd27-daab-a6e6-951b-c0eddceaac08", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:45 GMT", - "elapsed-time": "117", + "Date": "Mon, 01 Jun 2020 12:10:20 GMT", + "elapsed-time": "115", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5de7cd27-daab-a6e6-951b-c0eddceaac08", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5de7cd27-daab-a6e6-951b-c0eddceaac08" }, "ResponseBody": { "value": [ @@ -98,17 +106,17 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "378", "Content-Type": "application/json", - "traceparent": "00-964d3587988e694c894576c98d95e4a0-a8a9d46784fbac47-00", + "traceparent": "00-aad6be920540c64cbddd3af3cdce3bc0-4cb09032f11aa341-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8638f76bb865265973c5f5169a34ec22", "x-ms-return-client-request-id": "true" @@ -149,16 +157,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "8638f76b-b865-2659-73c5-f5169a34ec22", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:47 GMT", - "elapsed-time": "29", + "Date": "Mon, 01 Jun 2020 12:10:22 GMT", + "elapsed-time": "62", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "8638f76b-b865-2659-73c5-f5169a34ec22", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "8638f76b-b865-2659-73c5-f5169a34ec22" }, "ResponseBody": { "value": [ @@ -172,15 +182,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-516365db8951f04db3e77b1d6ac86663-310b140d22b3e040-00", + "traceparent": "00-7568f9f8af42524c9cee45ed7d956b65-5efb27d0b1a9cc43-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "71a8a1f43dd9dc410cc30f0d308050fb", "x-ms-return-client-request-id": "true" @@ -189,68 +199,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "71a8a1f4-3dd9-dc41-0cc3-0f0d308050fb", "Content-Length": "894", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:49 GMT", - "elapsed-time": "10", + "Date": "Mon, 01 Jun 2020 12:10:24 GMT", + "elapsed-time": "14", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "71a8a1f4-3dd9-dc41-0cc3-0f0d308050fb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "71a8a1f4-3dd9-dc41-0cc3-0f0d308050fb" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Secret Point Motel", - "description": null, - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Economy", - "tags": [ - "pool", - "air conditioning" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": null, - "rating": 3, - "location": null, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": null, - "descriptionFr": null, - "type": "Budget Room", - "baseRate": 10.5, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "balcony" - ] - } - ] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:null,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Economy\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:3,\u0022location\u0022:null,\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:null,\u0022descriptionFr\u0022:null,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:10.5,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022balcony\u0022]}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1680", + "Content-Length": "1738", "Content-Type": "application/json", - "traceparent": "00-787aa064f8f8184fb0e938f92c3a4146-1ee5a2e5a11e5b49-00", + "traceparent": "00-2acabe4a415a3e4bb3cd58d0a89e3a04-75dbd4257b986043-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ebf2967c7a9e6fd973c1e9e6e4d00b61", "x-ms-return-client-request-id": "true" @@ -273,7 +248,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -314,16 +295,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "ebf2967c-7a9e-6fd9-73c1-e9e6e4d00b61", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:49 GMT", - "elapsed-time": "29", + "Date": "Mon, 01 Jun 2020 12:10:24 GMT", + "elapsed-time": "49", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "ebf2967c-7a9e-6fd9-73c1-e9e6e4d00b61", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ebf2967c-7a9e-6fd9-73c1-e9e6e4d00b61" }, "ResponseBody": { "value": [ @@ -337,15 +320,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-bbd2a35c1503574f8aa3121771c6e406-4dc8fff67419ef40-00", + "traceparent": "00-57140447b53b53409893d4b64b973462-cbb55e9b13140d4b-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3bf99d2e3b422e2eb65b79a1a94bf5f2", "x-ms-return-client-request-id": "true" @@ -354,79 +337,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "1559", + "client-request-id": "3bf99d2e-3b42-2e2e-b65b-79a1a94bf5f2", + "Content-Length": "1664", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:53:52 GMT", - "elapsed-time": "5", + "Date": "Mon, 01 Jun 2020 12:10:26 GMT", + "elapsed-time": "6", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "3bf99d2e-3b42-2e2e-b65b-79a1a94bf5f2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "3bf99d2e-3b42-2e2e-b65b-79a1a94bf5f2" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": null, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027iaefcaam\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027wuaihhjd\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-8786b708978a6f43a41ee88ed34265ba-1ab8a8196af0dd43-00", + "traceparent": "00-46b6db0678b2f948b1eecb57ec685d8d-4dc6e3b8fb213848-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "049af97501417983c739fd18535af73c", "x-ms-return-client-request-id": "true" @@ -435,20 +370,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:53:52 GMT", - "elapsed-time": "204", + "client-request-id": "049af975-0141-7983-c739-fd18535af73c", + "Date": "Mon, 01 Jun 2020 12:10:26 GMT", + "elapsed-time": "603", "Expires": "-1", "Pragma": "no-cache", "request-id": "049af975-0141-7983-c739-fd18535af73c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "049af975-0141-7983-c739-fd18535af73c" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1403851089", - "SearchIndexName": "iaefcaam", + "SearchIndexName": "wuaihhjd", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamicAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamicAsync.json index 8ffb21478c1b..2d26f258c7a8 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamicAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/MergeDocumentsDynamicAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1680", + "Content-Length": "1738", "Content-Type": "application/json", - "traceparent": "00-6aa0e5ea2c8bda40a4d92baeb29e604f-0e29b0b180a00a48-00", + "traceparent": "00-196bcb294b4f6a4d809400fbcd9fea36-5ec963cbad8a3d4c-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "aaded8341d193314acc7cc8e594a9eb0", "x-ms-return-client-request-id": "true" @@ -34,7 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -75,16 +81,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "aaded834-1d19-3314-acc7-cc8e594a9eb0", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:11 GMT", - "elapsed-time": "86", + "Date": "Mon, 01 Jun 2020 12:10:43 GMT", + "elapsed-time": "95", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "aaded834-1d19-3314-acc7-cc8e594a9eb0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "aaded834-1d19-3314-acc7-cc8e594a9eb0" }, "ResponseBody": { "value": [ @@ -98,17 +106,17 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "378", "Content-Type": "application/json", - "traceparent": "00-9af8f0d6f7683a46a23f9f885283de12-b89d78f5a1f0544f-00", + "traceparent": "00-c33e0cd939ca7f47bbcf16299e2d422c-5445f09bbff58f49-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d137a2fc58d88813aacc117216d4d3d6", "x-ms-return-client-request-id": "true" @@ -149,16 +157,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "d137a2fc-58d8-8813-aacc-117216d4d3d6", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:13 GMT", - "elapsed-time": "27", + "Date": "Mon, 01 Jun 2020 12:10:46 GMT", + "elapsed-time": "49", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "d137a2fc-58d8-8813-aacc-117216d4d3d6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d137a2fc-58d8-8813-aacc-117216d4d3d6" }, "ResponseBody": { "value": [ @@ -172,15 +182,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-7aa0c8588084534782ef3db801538e3a-2a73eae665c0aa4e-00", + "traceparent": "00-dd30f064e29bcb459a88093991956718-3a777b15a8f74d45-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f7125fc117c4ba3a654fd02ab3fee744", "x-ms-return-client-request-id": "true" @@ -189,68 +199,33 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "f7125fc1-17c4-ba3a-654f-d02ab3fee744", "Content-Length": "894", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:15 GMT", - "elapsed-time": "29", + "Date": "Mon, 01 Jun 2020 12:10:48 GMT", + "elapsed-time": "15", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "f7125fc1-17c4-ba3a-654f-d02ab3fee744", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f7125fc1-17c4-ba3a-654f-d02ab3fee744" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Secret Point Motel", - "description": null, - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Economy", - "tags": [ - "pool", - "air conditioning" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": null, - "rating": 3, - "location": null, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": null, - "descriptionFr": null, - "type": "Budget Room", - "baseRate": 10.5, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "balcony" - ] - } - ] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:null,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Economy\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:3,\u0022location\u0022:null,\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:null,\u0022descriptionFr\u0022:null,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:10.5,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022balcony\u0022]}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "1680", + "Content-Length": "1738", "Content-Type": "application/json", - "traceparent": "00-c371bc6d63325f4cbc83f79b56f610a5-72b46cf1cae4984b-00", + "traceparent": "00-e7a89bb7c81b9f46bf75bd796ad477f6-2166ea025a50ed41-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "3a50e2b9e73cdb67c556004d0ba11dd8", "x-ms-return-client-request-id": "true" @@ -273,7 +248,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -314,16 +295,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "3a50e2b9-e73c-db67-c556-004d0ba11dd8", "Content-Length": "74", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:15 GMT", - "elapsed-time": "41", + "Date": "Mon, 01 Jun 2020 12:10:48 GMT", + "elapsed-time": "55", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "3a50e2b9-e73c-db67-c556-004d0ba11dd8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "3a50e2b9-e73c-db67-c556-004d0ba11dd8" }, "ResponseBody": { "value": [ @@ -337,15 +320,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-5c210ee441a836499dff6f46d613b2c2-f364dcdc66471441-00", + "traceparent": "00-5ca0d91aa12ebe4d93f6c806fb528e6d-cc42f2398a26e244-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "facdf5f3a637e5ec677d6c8888e9d4ab", "x-ms-return-client-request-id": "true" @@ -354,79 +337,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "1559", + "client-request-id": "facdf5f3-a637-e5ec-677d-6c8888e9d4ab", + "Content-Length": "1664", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:17 GMT", - "elapsed-time": "7", + "Date": "Mon, 01 Jun 2020 12:10:50 GMT", + "elapsed-time": "6", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "facdf5f3-a637-e5ec-677d-6c8888e9d4ab", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "facdf5f3-a637-e5ec-677d-6c8888e9d4ab" }, - "ResponseBody": { - "hotelId": "1", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": null, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - } + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]}" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ssosqhvl\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027gysyigju\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-8ae9d5d939c9204ebb309011ae86bf32-deea4a2753010b4e-00", + "traceparent": "00-c599b7a7f7b628489b876259ace46fd8-307ca480a3923441-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "34b8cde49983d99af737326d17edaec3", "x-ms-return-client-request-id": "true" @@ -435,20 +370,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:59:17 GMT", - "elapsed-time": "206", + "client-request-id": "34b8cde4-9983-d99a-f737-326d17edaec3", + "Date": "Mon, 01 Jun 2020 12:10:51 GMT", + "elapsed-time": "735", "Expires": "-1", "Pragma": "no-cache", "request-id": "34b8cde4-9983-d99a-f737-326d17edaec3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "34b8cde4-9983-d99a-f737-326d17edaec3" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "660557965", - "SearchIndexName": "ssosqhvl", + "SearchIndexName": "gysyigju", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValues.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValues.json index 757526ded205..5dcf252b6307 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValues.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValues.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "2425", + "Content-Length": "2625", "Content-Type": "application/json", - "traceparent": "00-26e70986fe91124c9f77921a20a9b8d2-51ec6d3d8765b646-00", + "traceparent": "00-289f062f67aa764b98e416ea038c8c07-6a6002ca74b19c47-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "04d36a16c97e66b037fb770aff04a144", "x-ms-return-client-request-id": "true" @@ -30,6 +30,13 @@ "smokingAllowed": null, "lastRenovationDate": "0001-01-01T00:00:00.0000000\u002B00:00", "rating": -2147483648, + "location": { + "type": "Point", + "coordinates": [ + -180, + -90 + ] + }, "address": { "streetAddress": null, "city": null, @@ -64,6 +71,13 @@ "smokingAllowed": null, "lastRenovationDate": "9999-12-31T23:59:59.9999999\u002B00:00", "rating": 2147483647, + "location": { + "type": "Point", + "coordinates": [ + 180, + 90 + ] + }, "address": { "streetAddress": null, "city": "Maximum", @@ -96,6 +110,13 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, "address": null, "rooms": [ { @@ -122,6 +143,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [ { @@ -148,6 +170,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [ { @@ -174,6 +197,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -182,16 +206,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "04d36a16-c97e-66b0-37fb-770aff04a144", "Content-Length": "389", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:12 GMT", - "elapsed-time": "121", + "Date": "Mon, 01 Jun 2020 12:15:28 GMT", + "elapsed-time": "128", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "04d36a16-c97e-66b0-37fb-770aff04a144", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "04d36a16-c97e-66b0-37fb-770aff04a144" }, "ResponseBody": { "value": [ @@ -235,15 +261,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-d3a9673c5f1c834687a97f01df07289f-025530eea8b94a47-00", + "traceparent": "00-7698673402921049b091665a266daaf4-67781c4e38bf6f44-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "8912016614f3ab8d8fa07c2e886b82ca", "x-ms-return-client-request-id": "true" @@ -252,16 +278,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "491", + "client-request-id": "89120166-14f3-ab8d-8fa0-7c2e886b82ca", + "Content-Length": "588", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", "elapsed-time": "18", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "89120166-14f3-ab8d-8fa0-7c2e886b82ca", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "89120166-14f3-ab8d-8fa0-7c2e886b82ca" }, "ResponseBody": { "hotelId": "1", @@ -274,7 +302,19 @@ "smokingAllowed": null, "lastRenovationDate": "0001-01-01T00:00:00Z", "rating": -2147483648, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -180.0, + -90.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": { "streetAddress": null, "city": null, @@ -297,15 +337,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-19569509b8286a439e2b748dba5e6da6-456dc7d6b6beb84b-00", + "traceparent": "00-ae79f59e2feceb4fa89e4d708048e623-2172927828e30f49-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e960a71a2fdc418f552f994610082ea1", "x-ms-return-client-request-id": "true" @@ -314,16 +354,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "507", + "client-request-id": "e960a71a-2fdc-418f-552f-994610082ea1", + "Content-Length": "602", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "6", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "e960a71a-2fdc-418f-552f-994610082ea1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "e960a71a-2fdc-418f-552f-994610082ea1" }, "ResponseBody": { "hotelId": "2", @@ -338,7 +380,19 @@ "smokingAllowed": null, "lastRenovationDate": "9999-12-31T23:59:59.999Z", "rating": 2147483647, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + 180.0, + 90.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": { "streetAddress": null, "city": "Maximum", @@ -361,15 +415,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00273\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00273\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-9cd1f84b0356a74499873b52b7004254-938bad4eb0e4484a-00", + "traceparent": "00-33e5899dc2cef0408909de124b40c16a-bcd1e6ac23e23848-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a0ac7bbf95ce016bdd2875dd4d82decb", "x-ms-return-client-request-id": "true" @@ -378,16 +432,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "365", + "client-request-id": "a0ac7bbf-95ce-016b-dd28-75dd4d82decb", + "Content-Length": "457", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", + "elapsed-time": "25", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "a0ac7bbf-95ce-016b-dd28-75dd4d82decb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "a0ac7bbf-95ce-016b-dd28-75dd4d82decb" }, "ResponseBody": { "hotelId": "3", @@ -400,7 +456,19 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + 0.0, + 0.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": null, "rooms": [ { @@ -417,15 +485,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00274\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00274\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-7c460bbd617cdc44af3eb563f4fdde05-f74c1d8b4e8fd541-00", + "traceparent": "00-8faa8b86ef11a7439c7ef44e0830622e-3ed63563a81fd746-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "58f0ac78b7a4366871d134c47b469a86", "x-ms-return-client-request-id": "true" @@ -434,16 +502,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "58f0ac78-b7a4-3668-71d1-34c47b469a86", "Content-Length": "364", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "5", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "58f0ac78-b7a4-3668-71d1-34c47b469a86", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "58f0ac78-b7a4-3668-71d1-34c47b469a86" }, "ResponseBody": { "hotelId": "4", @@ -473,15 +543,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00275\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00275\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-b465e3bd053f9f4aa96d19bc1e271359-5b0d7f3adac37449-00", + "traceparent": "00-fe640959a18f874baf5dd6a69d6eb3b5-b2a7210c69b48848-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "0c6fda72e2bf84fc3b5e0bb4bab1f3d3", "x-ms-return-client-request-id": "true" @@ -490,16 +560,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "0c6fda72-e2bf-84fc-3b5e-0bb4bab1f3d3", "Content-Length": "364", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "6", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "0c6fda72-e2bf-84fc-3b5e-0bb4bab1f3d3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "0c6fda72-e2bf-84fc-3b5e-0bb4bab1f3d3" }, "ResponseBody": { "hotelId": "5", @@ -529,15 +601,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)/docs(\u00276\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)/docs(\u00276\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-17717b650e472745b9b9d059634c3ad7-d4374effb8efdf47-00", + "traceparent": "00-6ee2c19a080e3f48a03332f36261ac19-8a142ff2f600d94a-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "64cecd50d51807fc13752efd61a78597", "x-ms-return-client-request-id": "true" @@ -546,16 +618,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "64cecd50-d518-07fc-1375-2efd61a78597", "Content-Length": "225", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 12:15:30 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "64cecd50-d518-07fc-1375-2efd61a78597", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "64cecd50-d518-07fc-1375-2efd61a78597" }, "ResponseBody": { "hotelId": "6", @@ -574,15 +648,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027ahjvoakx\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027orseflxn\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-f5547858feb35d4a97dcf28d3f4c8031-d27def927432514e-00", + "traceparent": "00-084d7fd23e333147a9f2eeb461bd4539-76434c4c0d16c94e-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "726bee8dd113960cb06c1c45acb37bbf", "x-ms-return-client-request-id": "true" @@ -591,20 +665,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:54:15 GMT", - "elapsed-time": "189", + "client-request-id": "726bee8d-d113-960c-b06c-1c45acb37bbf", + "Date": "Mon, 01 Jun 2020 12:15:31 GMT", + "elapsed-time": "603", "Expires": "-1", "Pragma": "no-cache", "request-id": "726bee8d-d113-960c-b06c-1c45acb37bbf", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "726bee8d-d113-960c-b06c-1c45acb37bbf" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1585493960", - "SearchIndexName": "ahjvoakx", + "SearchIndexName": "orseflxn", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValuesAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValuesAsync.json index e8983331c734..28a9f232d58b 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValuesAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/RoundtripBoundaryValuesAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "2425", + "Content-Length": "2625", "Content-Type": "application/json", - "traceparent": "00-79f27a3466d93344a385352c33359065-81bccee32a4a0645-00", + "traceparent": "00-e68929da54782f4fb3171e5e8a3bf70a-514aa32b28fff540-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "266e1dfb8c0a70eae757f2c253b6bb2a", "x-ms-return-client-request-id": "true" @@ -30,6 +30,13 @@ "smokingAllowed": null, "lastRenovationDate": "0001-01-01T00:00:00.0000000\u002B00:00", "rating": -2147483648, + "location": { + "type": "Point", + "coordinates": [ + -180, + -90 + ] + }, "address": { "streetAddress": null, "city": null, @@ -64,6 +71,13 @@ "smokingAllowed": null, "lastRenovationDate": "9999-12-31T23:59:59.9999999\u002B00:00", "rating": 2147483647, + "location": { + "type": "Point", + "coordinates": [ + 180, + 90 + ] + }, "address": { "streetAddress": null, "city": "Maximum", @@ -96,6 +110,13 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": { + "type": "Point", + "coordinates": [ + 0, + 0 + ] + }, "address": null, "rooms": [ { @@ -122,6 +143,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [ { @@ -148,6 +170,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [ { @@ -174,6 +197,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -182,16 +206,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "266e1dfb-8c0a-70ea-e757-f2c253b6bb2a", "Content-Length": "389", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:38 GMT", - "elapsed-time": "125", + "Date": "Mon, 01 Jun 2020 12:15:46 GMT", + "elapsed-time": "128", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "266e1dfb-8c0a-70ea-e757-f2c253b6bb2a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "266e1dfb-8c0a-70ea-e757-f2c253b6bb2a" }, "ResponseBody": { "value": [ @@ -235,15 +261,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-c266ad9d6afebe4f9308cdbe8cb091ba-10c8aaab09836f4b-00", + "traceparent": "00-23466512231cdd4bbc9dceba2e137577-f62db014c21a6746-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "81ecb5b70e5ac29d617ad34b9959389c", "x-ms-return-client-request-id": "true" @@ -252,16 +278,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "491", + "client-request-id": "81ecb5b7-0e5a-c29d-617a-d34b9959389c", + "Content-Length": "588", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "12", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "14", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "81ecb5b7-0e5a-c29d-617a-d34b9959389c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "81ecb5b7-0e5a-c29d-617a-d34b9959389c" }, "ResponseBody": { "hotelId": "1", @@ -274,7 +302,19 @@ "smokingAllowed": null, "lastRenovationDate": "0001-01-01T00:00:00Z", "rating": -2147483648, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + -180.0, + -90.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": { "streetAddress": null, "city": null, @@ -297,15 +337,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00272\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-a8220665d412ae4688ffb8b8ee342ccf-0a2b88186ca6cd4f-00", + "traceparent": "00-36346d483603e04bb415e8bc9fe0eae3-f97051c5edfb0f4a-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "ec4c78bad13408b7c2cb3ea22762c253", "x-ms-return-client-request-id": "true" @@ -314,16 +354,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "507", + "client-request-id": "ec4c78ba-d134-08b7-c2cb-3ea22762c253", + "Content-Length": "602", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "ec4c78ba-d134-08b7-c2cb-3ea22762c253", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "ec4c78ba-d134-08b7-c2cb-3ea22762c253" }, "ResponseBody": { "hotelId": "2", @@ -338,7 +380,19 @@ "smokingAllowed": null, "lastRenovationDate": "9999-12-31T23:59:59.999Z", "rating": 2147483647, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + 180.0, + 90.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": { "streetAddress": null, "city": "Maximum", @@ -361,15 +415,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00273\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00273\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-280518a544977b4caeff2ce2d92d0c49-e1f7eae1370dd849-00", + "traceparent": "00-c18a5ab66490f54bb047ce04e9cc7f63-e2fe14a3023b4e42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1605a8916cc2ed437facc490b89fd68d", "x-ms-return-client-request-id": "true" @@ -378,16 +432,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "365", + "client-request-id": "1605a891-6cc2-ed43-7fac-c490b89fd68d", + "Content-Length": "457", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "6", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "1605a891-6cc2-ed43-7fac-c490b89fd68d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "1605a891-6cc2-ed43-7fac-c490b89fd68d" }, "ResponseBody": { "hotelId": "3", @@ -400,7 +456,19 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, - "location": null, + "location": { + "type": "Point", + "coordinates": [ + 0.0, + 0.0 + ], + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + } + }, "address": null, "rooms": [ { @@ -417,15 +485,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00274\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00274\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-f8c606924f667849b4ce5695a190f52a-82c3367e5989c54f-00", + "traceparent": "00-06ec9f51f04a4844a826f1465776bfea-0afc759767d7e548-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "da07561fce69e5f6fee3bf8fcffb9bff", "x-ms-return-client-request-id": "true" @@ -434,16 +502,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "da07561f-ce69-e5f6-fee3-bf8fcffb9bff", "Content-Length": "364", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "da07561f-ce69-e5f6-fee3-bf8fcffb9bff", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "da07561f-ce69-e5f6-fee3-bf8fcffb9bff" }, "ResponseBody": { "hotelId": "4", @@ -473,15 +543,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00275\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00275\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-d883aba1a60c7e428c0fa371888e2115-af8353fe61523b4b-00", + "traceparent": "00-dbb5ef7eb1157040b9fdd0c77eaa8abf-7af261e4c4ec5d42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f0b980b721544ed9355e6d880d265023", "x-ms-return-client-request-id": "true" @@ -490,16 +560,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "f0b980b7-2154-4ed9-355e-6d880d265023", "Content-Length": "364", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "4", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "6", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "f0b980b7-2154-4ed9-355e-6d880d265023", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f0b980b7-2154-4ed9-355e-6d880d265023" }, "ResponseBody": { "hotelId": "5", @@ -529,15 +601,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)/docs(\u00276\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)/docs(\u00276\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-cca53c79cbff9546a91f5c3b3643f93e-c2417b044145ae42-00", + "traceparent": "00-4f563239004eff48a113e7415ce0d4e0-064f693a0d868947-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d082b0f4e85ac2eab21f18deacb41e83", "x-ms-return-client-request-id": "true" @@ -546,16 +618,18 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "d082b0f4-e85a-c2ea-b21f-18deacb41e83", "Content-Length": "225", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:15:48 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "d082b0f4-e85a-c2ea-b21f-18deacb41e83", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d082b0f4-e85a-c2ea-b21f-18deacb41e83" }, "ResponseBody": { "hotelId": "6", @@ -574,15 +648,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027qhqfcilx\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rgtkdayl\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-aef1ddbcab80da4198dca63ad0e377f7-74402bfe4094294b-00", + "traceparent": "00-ab2f3f242a7994448bb77cfa4a50f22e-8849f9161caa7541-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "38d9c411e6e5fd397cb9a40a616dd8d7", "x-ms-return-client-request-id": "true" @@ -591,20 +665,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:59:40 GMT", - "elapsed-time": "192", + "client-request-id": "38d9c411-e6e5-fd39-7cb9-a40a616dd8d7", + "Date": "Mon, 01 Jun 2020 12:15:49 GMT", + "elapsed-time": "713", "Expires": "-1", "Pragma": "no-cache", "request-id": "38d9c411-e6e5-fd39-7cb9-a40a616dd8d7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "38d9c411-e6e5-fd39-7cb9-a40a616dd8d7" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1917208391", - "SearchIndexName": "qhqfcilx", + "SearchIndexName": "rgtkdayl", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocuments.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocuments.json index edec06af1233..65664aa56b17 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocuments.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocuments.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027kmjpmvhb\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vbjpstku\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "3987", + "Content-Length": "4183", "Content-Type": "application/json", - "traceparent": "00-6127eb213edc334aad13f6b6a58f6ef0-0d647f4be272e449-00", + "traceparent": "00-f6090f0a332af74d817c9a31928c8433-83f52d01e8b9dd42-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a0024a861f497bcd454835c9d5f04869", "x-ms-return-client-request-id": "true" @@ -34,6 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -85,6 +92,13 @@ "smokingAllowed": true, "lastRenovationDate": "1999-09-06T00:00:00.0000000\u002B00:00", "rating": 3, + "location": { + "type": "Point", + "coordinates": [ + -78.940483, + 35.904159999999997 + ] + }, "address": { "streetAddress": "6910 Fayetteville Rd", "city": "Durham", @@ -131,6 +145,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -146,6 +161,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -161,6 +177,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": { "streetAddress": null, "city": null, @@ -186,16 +203,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "a0024a86-1f49-7bcd-4548-35c9d5f04869", "Content-Length": "344", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:54:36 GMT", - "elapsed-time": "272", + "Date": "Mon, 01 Jun 2020 12:06:29 GMT", + "elapsed-time": "117", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "a0024a86-1f49-7bcd-4548-35c9d5f04869", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "a0024a86-1f49-7bcd-4548-35c9d5f04869" }, "ResponseBody": { "value": [ @@ -233,15 +252,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027kmjpmvhb\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vbjpstku\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-8915bb68e71814448645e8f85d9881e5-e5e1c7716cc21a45-00", + "traceparent": "00-f1cef72324922e4a88e70da64d809564-6f2bc8c7fbef4847-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "5f6c2fedab3301fcb3d186229e3aefec", "x-ms-return-client-request-id": "true" @@ -250,29 +269,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "5f6c2fed-ab33-01fc-b3d1-86229e3aefec", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 06:54:38 GMT", - "elapsed-time": "5", + "Date": "Mon, 01 Jun 2020 12:06:32 GMT", + "elapsed-time": "4", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "5f6c2fed-ab33-01fc-b3d1-86229e3aefec", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "5f6c2fed-ab33-01fc-b3d1-86229e3aefec" }, "ResponseBody": "\uFEFF3" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027kmjpmvhb\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027vbjpstku\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-e3815d248ae32346b614be888c069d9a-d899abf39323a649-00", + "traceparent": "00-8311a4d5851d7e4490bf5609bb004baf-106450ddeaa2a74d-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2ea803d3fe165584f08121d368813050", "x-ms-return-client-request-id": "true" @@ -281,20 +302,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:54:39 GMT", - "elapsed-time": "284", + "client-request-id": "2ea803d3-fe16-5584-f081-21d368813050", + "Date": "Mon, 01 Jun 2020 12:06:32 GMT", + "elapsed-time": "564", "Expires": "-1", "Pragma": "no-cache", "request-id": "2ea803d3-fe16-5584-f081-21d368813050", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2ea803d3-fe16-5584-f081-21d368813050" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "216418330", - "SearchIndexName": "kmjpmvhb", + "SearchIndexName": "vbjpstku", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsAsync.json index 256d442f5d97..2fd2d42f8ae8 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dffkrygn\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fslewiae\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "3987", + "Content-Length": "4183", "Content-Type": "application/json", - "traceparent": "00-3b3da68800703941a8e0b584b117d957-b87b3060f84a3d4e-00", + "traceparent": "00-b839df41971c4c479de756cfb3f15ac0-0e51723f6fe0d045-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "29f6f4a77f5e31d972d6cd1564c8ad19", "x-ms-return-client-request-id": "true" @@ -34,6 +34,13 @@ "smokingAllowed": true, "lastRenovationDate": "1970-01-18T00:00:00.0000000-05:00", "rating": 4, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, "address": { "streetAddress": "677 5th Ave", "city": "New York", @@ -85,6 +92,13 @@ "smokingAllowed": true, "lastRenovationDate": "1999-09-06T00:00:00.0000000\u002B00:00", "rating": 3, + "location": { + "type": "Point", + "coordinates": [ + -78.940483, + 35.904159999999997 + ] + }, "address": { "streetAddress": "6910 Fayetteville Rd", "city": "Durham", @@ -131,6 +145,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -146,6 +161,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -161,6 +177,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": { "streetAddress": null, "city": null, @@ -186,16 +203,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "29f6f4a7-7f5e-31d9-72d6-cd1564c8ad19", "Content-Length": "344", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 07:00:02 GMT", - "elapsed-time": "90", + "Date": "Mon, 01 Jun 2020 12:07:14 GMT", + "elapsed-time": "107", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "29f6f4a7-7f5e-31d9-72d6-cd1564c8ad19", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "29f6f4a7-7f5e-31d9-72d6-cd1564c8ad19" }, "ResponseBody": { "value": [ @@ -233,15 +252,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dffkrygn\u0027)/docs/$count?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fslewiae\u0027)/docs/$count?api-version=2019-05-06-Preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "traceparent": "00-b9f99d1200f3f84ca50f60d614426bff-0066f0850615ef43-00", + "traceparent": "00-f6354468818cba41b7943c09a6f38650-e71e7e4d5fbfe247-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "af1f911a22849c17a2de57a0c0a6b790", "x-ms-return-client-request-id": "true" @@ -250,29 +269,31 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "af1f911a-2284-9c17-a2de-57a0c0a6b790", "Content-Length": "4", "Content-Type": "text/plain", - "Date": "Fri, 08 May 2020 07:00:04 GMT", - "elapsed-time": "3", + "Date": "Mon, 01 Jun 2020 12:07:16 GMT", + "elapsed-time": "5", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "af1f911a-2284-9c17-a2de-57a0c0a6b790", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "af1f911a-2284-9c17-a2de-57a0c0a6b790" }, "ResponseBody": "\uFEFF3" }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027dffkrygn\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027fslewiae\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-d70de6d0cdd29f458d88101afd34bf9d-3d124b572302ee47-00", + "traceparent": "00-0a408d236d081449b5aaef51de740140-48f1b6ed2edda642-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "2429633e754415328f09316c404368ac", "x-ms-return-client-request-id": "true" @@ -281,20 +302,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 07:00:04 GMT", - "elapsed-time": "207", + "client-request-id": "2429633e-7544-1532-8f09-316c404368ac", + "Date": "Mon, 01 Jun 2020 12:07:16 GMT", + "elapsed-time": "767", "Expires": "-1", "Pragma": "no-cache", "request-id": "2429633e-7544-1532-8f09-316c404368ac", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "2429633e-7544-1532-8f09-316c404368ac" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "1761363080", - "SearchIndexName": "dffkrygn", + "SearchIndexName": "fslewiae", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsWithCustomSerializer.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsWithCustomSerializer.json new file mode 100644 index 000000000000..aa504d859106 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsWithCustomSerializer.json @@ -0,0 +1,178 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027nbledbxk\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "1723", + "Content-Type": "application/json", + "traceparent": "00-ef7d206a84b923449da6cbb7f4f93f86-116eabd16d73e94b-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": "c8e9b9c67f63aadb0e6bf6eb18bc47be", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "hotelId": "1", + "hotelName": "Secret Point Motel", + "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", + "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", + "category": "Boutique", + "tags": [ + "pool", + "air conditioning", + "concierge" + ], + "parkingIncluded": false, + "smokingAllowed": true, + "lastRenovationDate": "1970-01-18T00:00:00-05:00", + "rating": 4, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, + "address": { + "streetAddress": "677 5th Ave", + "city": "New York", + "stateProvince": "NY", + "country": "USA", + "postalCode": "10022" + }, + "rooms": [ + { + "description": "Budget Room, 1 Queen Bed (Cityside)", + "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", + "type": "Budget Room", + "baseRate": 9.6899999999999995, + "bedOptions": "1 Queen Bed", + "sleepsCount": 2, + "smokingAllowed": true, + "tags": [ + "vcr/dvd" + ] + }, + { + "description": "Budget Room, 1 King Bed (Mountain View)", + "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", + "type": "Budget Room", + "baseRate": 8.0899999999999999, + "bedOptions": "1 King Bed", + "sleepsCount": 2, + "smokingAllowed": true, + "tags": [ + "vcr/dvd", + "jacuzzi tub" + ] + } + ] + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "c8e9b9c6-7f63-aadb-0e6b-f6eb18bc47be", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:43:38 GMT", + "elapsed-time": "107", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "c8e9b9c6-7f63-aadb-0e6b-f6eb18bc47be", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "c8e9b9c6-7f63-aadb-0e6b-f6eb18bc47be" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027nbledbxk\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-1bf62192bf74674585123ef789a25c60-c311844218f05145-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": "49f86160a889777af9bc347f99fadf50", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "49f86160-a889-777a-f9bc-347f99fadf50", + "Content-Length": "1664", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:43:40 GMT", + "elapsed-time": "14", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "49f86160-a889-777a-f9bc-347f99fadf50", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "49f86160-a889-777a-f9bc-347f99fadf50" + }, + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]}" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027nbledbxk\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-4f9116f41e4523428133e4ef2fe10c52-7cb5ebb630051841-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": "39742dd9385e6cc960a5d241bb91dc0d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "39742dd9-385e-6cc9-60a5-d241bb91dc0d", + "Date": "Mon, 08 Jun 2020 14:43:40 GMT", + "elapsed-time": "640", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "39742dd9-385e-6cc9-60a5-d241bb91dc0d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "39742dd9-385e-6cc9-60a5-d241bb91dc0d" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1820603944", + "SearchIndexName": "nbledbxk", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_QUERY_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/StaticDocumentsWithCustomSerializerAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsWithCustomSerializerAsync.json new file mode 100644 index 000000000000..3a4a0e622619 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/StaticDocumentsWithCustomSerializerAsync.json @@ -0,0 +1,178 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027shbrxcgf\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "1723", + "Content-Type": "application/json", + "traceparent": "00-4ce3deb07d116543b8643569ef0de6c1-d34fef8e64355848-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": "237d40090ba058628eadb62cfb545a2f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "hotelId": "1", + "hotelName": "Secret Point Motel", + "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", + "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", + "category": "Boutique", + "tags": [ + "pool", + "air conditioning", + "concierge" + ], + "parkingIncluded": false, + "smokingAllowed": true, + "lastRenovationDate": "1970-01-18T00:00:00-05:00", + "rating": 4, + "location": { + "type": "Point", + "coordinates": [ + -73.975403, + 40.760586000000004 + ] + }, + "address": { + "streetAddress": "677 5th Ave", + "city": "New York", + "stateProvince": "NY", + "country": "USA", + "postalCode": "10022" + }, + "rooms": [ + { + "description": "Budget Room, 1 Queen Bed (Cityside)", + "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", + "type": "Budget Room", + "baseRate": 9.6899999999999995, + "bedOptions": "1 Queen Bed", + "sleepsCount": 2, + "smokingAllowed": true, + "tags": [ + "vcr/dvd" + ] + }, + { + "description": "Budget Room, 1 King Bed (Mountain View)", + "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", + "type": "Budget Room", + "baseRate": 8.0899999999999999, + "bedOptions": "1 King Bed", + "sleepsCount": 2, + "smokingAllowed": true, + "tags": [ + "vcr/dvd", + "jacuzzi tub" + ] + } + ] + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "237d4009-0ba0-5862-8ead-b62cfb545a2f", + "Content-Length": "74", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:43:47 GMT", + "elapsed-time": "114", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "237d4009-0ba0-5862-8ead-b62cfb545a2f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "237d4009-0ba0-5862-8ead-b62cfb545a2f" + }, + "ResponseBody": { + "value": [ + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027shbrxcgf\u0027)/docs(\u00271\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "traceparent": "00-1bc910470064954ab061664145098d50-160a0f858178bd46-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": "8535fcb3fde47b276e81545ce15932d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "8535fcb3-fde4-7b27-6e81-545ce15932d4", + "Content-Length": "1664", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:43:50 GMT", + "elapsed-time": "12", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "8535fcb3-fde4-7b27-6e81-545ce15932d4", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "8535fcb3-fde4-7b27-6e81-545ce15932d4" + }, + "ResponseBody": "{\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]}" + }, + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027shbrxcgf\u0027)?api-version=2019-05-06-Preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-cca98efc027d254d874b3ed8670ef192-bec6a583a3092f4b-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": "45f7a50138f6355a3b1da0fb8dc52d3e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "45f7a501-38f6-355a-3b1d-a0fb8dc52d3e", + "Date": "Mon, 08 Jun 2020 14:43:50 GMT", + "elapsed-time": "525", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "45f7a501-38f6-355a-3b1d-a0fb8dc52d3e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "45f7a501-38f6-355a-3b1d-a0fb8dc52d3e" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1121913965", + "SearchIndexName": "shbrxcgf", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_QUERY_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/ThrowsAggregateException.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateException.json index 52663a415be3..bfed29aa2386 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateException.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateException.json @@ -1,16 +1,16 @@ { "Entries": [ { - "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hxjxrdfk\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027dlbklxly\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "721", + "Content-Length": "769", "Content-Type": "application/json", - "traceparent": "00-c928cc5447c24640a2de2f811995bbe1-f2d6f0defc02804f-00", + "traceparent": "00-56538a70e05fb145a5d36fa30be3582c-91ae2dcdd8fd9248-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "azsdk-net-Search.Documents/1.0.0-dev.20200609.1", "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f96451fd9a9bb6aa27a641cc3cfd13f5", @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -60,6 +62,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -71,8 +74,8 @@ "client-request-id": "f96451fd-9a9b-b6aa-27a6-41cc3cfd13f5", "Content-Length": "236", "Content-Type": "application/json; odata.metadata=none", - "Date": "Tue, 09 Jun 2020 02:06:51 GMT", - "elapsed-time": "114", + "Date": "Tue, 09 Jun 2020 17:49:55 GMT", + "elapsed-time": "149", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", @@ -105,14 +108,14 @@ } }, { - "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027hxjxrdfk\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027dlbklxly\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-03b400423afaf445852d86e414dc9373-6824875b5ffee74a-00", + "traceparent": "00-1025e9b5b0f4a541ac49a0886253db5d-eb1072ae1d911b44-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "azsdk-net-Search.Documents/1.0.0-dev.20200609.1", "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "a64b5fc1cb1f757cc93173215f4860fa", @@ -123,8 +126,8 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "client-request-id": "a64b5fc1-cb1f-757c-c931-73215f4860fa", - "Date": "Tue, 09 Jun 2020 02:06:51 GMT", - "elapsed-time": "602", + "Date": "Tue, 09 Jun 2020 17:49:55 GMT", + "elapsed-time": "562", "Expires": "-1", "Pragma": "no-cache", "request-id": "a64b5fc1-cb1f-757c-c931-73215f4860fa", @@ -136,7 +139,7 @@ ], "Variables": { "RandomSeed": "824277234", - "SearchIndexName": "hxjxrdfk", + "SearchIndexName": "dlbklxly", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_SERVICE_NAME": "azs-net-teglaza" } diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateExceptionAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateExceptionAsync.json index 83e64f554908..f7493f254824 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateExceptionAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsAggregateExceptionAsync.json @@ -1,16 +1,16 @@ { "Entries": [ { - "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rliglujs\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tyfrjlun\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "721", + "Content-Length": "769", "Content-Type": "application/json", - "traceparent": "00-8fe9a6c3a8b2124388c78af7da6ad21d-4adc82b6820d1c4b-00", + "traceparent": "00-69894115f0c4f84d968942ce8ad0ae23-362ded8726065a46-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "azsdk-net-Search.Documents/1.0.0-dev.20200609.1", "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e1dc2a35bb449e391f375bd48651e32e", @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -60,6 +62,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -71,8 +74,8 @@ "client-request-id": "e1dc2a35-bb44-9e39-1f37-5bd48651e32e", "Content-Length": "236", "Content-Type": "application/json; odata.metadata=none", - "Date": "Tue, 09 Jun 2020 02:07:00 GMT", - "elapsed-time": "103", + "Date": "Tue, 09 Jun 2020 17:50:03 GMT", + "elapsed-time": "108", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", @@ -105,14 +108,14 @@ } }, { - "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027rliglujs\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tyfrjlun\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-27f4d82c584b98418b149c3dac3c00ca-66864749eea99042-00", + "traceparent": "00-8444f103170938408ca1e45d39aceb92-fbe40280ed9fd548-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200608.1", + "azsdk-net-Search.Documents/1.0.0-dev.20200609.1", "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e7e1f3e58ea4e2d056c9eda841626f26", @@ -123,8 +126,8 @@ "ResponseHeaders": { "Cache-Control": "no-cache", "client-request-id": "e7e1f3e5-8ea4-e2d0-56c9-eda841626f26", - "Date": "Tue, 09 Jun 2020 02:07:00 GMT", - "elapsed-time": "555", + "Date": "Tue, 09 Jun 2020 17:50:03 GMT", + "elapsed-time": "563", "Expires": "-1", "Pragma": "no-cache", "request-id": "e7e1f3e5-8ea4-e2d0-56c9-eda841626f26", @@ -136,7 +139,7 @@ ], "Variables": { "RandomSeed": "1044182692", - "SearchIndexName": "rliglujs", + "SearchIndexName": "tyfrjlun", "SEARCH_ADMIN_API_KEY": "Sanitized", "SEARCH_SERVICE_NAME": "azs-net-teglaza" } diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAsked.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAsked.json index fc759d9ad286..43be178eb24a 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAsked.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAsked.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027htssruko\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tagqwctl\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "486", + "Content-Length": "518", "Content-Type": "application/json", - "traceparent": "00-a97a604623afed45929e982bbac3795e-da508c3155183747-00", + "traceparent": "00-be93223e203af2428a6cf179c6cf8ed7-835690a2b730a946-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "d5ce6a6c5c540ae091560e3e47589eb7", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "d5ce6a6c-5c54-0ae0-9156-0e3e47589eb7", "Content-Length": "155", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 06:55:44 GMT", - "elapsed-time": "136", + "Date": "Mon, 01 Jun 2020 11:33:48 GMT", + "elapsed-time": "255", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "d5ce6a6c-5c54-0ae0-9156-0e3e47589eb7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d5ce6a6c-5c54-0ae0-9156-0e3e47589eb7" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027htssruko\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027tagqwctl\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-501c0e5c7c03f04dab05961ea32bc6cb-9ef69c4c2bdd9546-00", + "traceparent": "00-71d6d0fe18a6a948b27464b9b5724e35-cb4307ed29713549-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "b9cae2ededf3fe00a43fefa9d149d916", "x-ms-return-client-request-id": "true" @@ -99,20 +103,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 06:55:44 GMT", - "elapsed-time": "192", + "client-request-id": "b9cae2ed-edf3-fe00-a43f-efa9d149d916", + "Date": "Mon, 01 Jun 2020 11:33:48 GMT", + "elapsed-time": "816", "Expires": "-1", "Pragma": "no-cache", "request-id": "b9cae2ed-edf3-fe00-a43f-efa9d149d916", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b9cae2ed-edf3-fe00-a43f-efa9d149d916" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "276729186", - "SearchIndexName": "htssruko", + "SearchIndexName": "tagqwctl", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAskedAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAskedAsync.json index a82178205a29..3a6ae5eeeb9b 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAskedAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/IndexingTests/ThrowsOnPartialSuccessWhenAskedAsync.json @@ -1,17 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vkstulig\u0027)/docs/search.index?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027jqwxncep\u0027)/docs/search.index?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", - "Content-Length": "486", + "Content-Length": "518", "Content-Type": "application/json", - "traceparent": "00-ef4c1b6e87f7bb46b649741724da830f-5d20da9b69e0104c-00", + "traceparent": "00-d6fb8140f0a7b34a91eceef41019b2b8-a4f1942ef2b88149-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "04bc46f5376814253de8557a155fc3da", "x-ms-return-client-request-id": "true" @@ -30,6 +30,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] }, @@ -45,6 +46,7 @@ "smokingAllowed": null, "lastRenovationDate": null, "rating": null, + "location": null, "address": null, "rooms": [] } @@ -53,16 +55,18 @@ "StatusCode": 207, "ResponseHeaders": { "Cache-Control": "no-cache", + "client-request-id": "04bc46f5-3768-1425-3de8-557a155fc3da", "Content-Length": "155", "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 08 May 2020 07:01:11 GMT", - "elapsed-time": "94", + "Date": "Mon, 01 Jun 2020 11:37:14 GMT", + "elapsed-time": "177", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "04bc46f5-3768-1425-3de8-557a155fc3da", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "04bc46f5-3768-1425-3de8-557a155fc3da" }, "ResponseBody": { "value": [ @@ -82,15 +86,15 @@ } }, { - "RequestUri": "https://azs-net-heathsearch2.search.windows.net/indexes(\u0027vkstulig\u0027)?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027jqwxncep\u0027)?api-version=2019-05-06-Preview", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "traceparent": "00-d4b33bdccdcb17489a4b35e9d4b84653-71c44de2a019be42-00", + "traceparent": "00-5b68f732e363304dbe150feb32b47f9f-33986510e0c4d443-00", "User-Agent": [ - "azsdk-net-Search.Documents/1.0.0-dev.20200507.1", - "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.19041 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200601.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "bcb8b5d8fbdfb9ec92ad1c84186d8e7f", "x-ms-return-client-request-id": "true" @@ -99,20 +103,22 @@ "StatusCode": 204, "ResponseHeaders": { "Cache-Control": "no-cache", - "Date": "Fri, 08 May 2020 07:01:11 GMT", - "elapsed-time": "180", + "client-request-id": "bcb8b5d8-fbdf-b9ec-92ad-1c84186d8e7f", + "Date": "Mon, 01 Jun 2020 11:37:14 GMT", + "elapsed-time": "535", "Expires": "-1", "Pragma": "no-cache", "request-id": "bcb8b5d8-fbdf-b9ec-92ad-1c84186d8e7f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "bcb8b5d8-fbdf-b9ec-92ad-1c84186d8e7f" }, "ResponseBody": [] } ], "Variables": { "RandomSeed": "500651422", - "SearchIndexName": "vkstulig", + "SearchIndexName": "jqwxncep", "SEARCH_ADMIN_API_KEY": "Sanitized", - "SEARCH_SERVICE_NAME": "azs-net-heathsearch2" + "SEARCH_SERVICE_NAME": "azs-net-teglaza" } } \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocuments.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocuments.json index 9e669c004727..b04be461c0e1 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocuments.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocuments.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "49", "Content-Type": "application/json", - "traceparent": "00-84104daedc522e46ae04dcd6678365ca-b220f4fce8d63f45-00", + "traceparent": "00-5fced8adcf49a243aa3ef8b5fdee47ad-3778ac6afc77e54e-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "af3d72c5229a545aa2a106b6d4f1c2e8", "x-ms-return-client-request-id": "true" @@ -23,359 +24,27 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:35:36 GMT", - "elapsed-time": "9", + "client-request-id": "af3d72c5-229a-545a-a2a1-06b6d4f1c2e8", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:41 GMT", + "elapsed-time": "89", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "af3d72c5-229a-545a-a2a1-06b6d4f1c2e8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "af3d72c5-229a-545a-a2a1-06b6d4f1c2e8" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" } ], "Variables": { "RandomSeed": "2078391119", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_QUERY_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/SearchTests/DynamicDocumentsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocumentsAsync.json index 589ac4ffaaa4..581a9f7c7879 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocumentsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/DynamicDocumentsAsync.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "49", "Content-Type": "application/json", - "traceparent": "00-3497ddc47abdd242b6cc82b43bf00eae-b45210a87e9bff4e-00", + "traceparent": "00-62ea22ce791255489e70a5e3774d7102-d18b2baa0f2c084b-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "f1be1cfc524710cf6f64f12e2324d803", "x-ms-return-client-request-id": "true" @@ -23,359 +24,26 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:37:48 GMT", - "elapsed-time": "9", + "client-request-id": "f1be1cfc-5247-10cf-6f64-f12e2324d803", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:42 GMT", + "elapsed-time": "32", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "f1be1cfc-5247-10cf-6f64-f12e2324d803", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f1be1cfc-5247-10cf-6f64-f12e2324d803" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" } ], "Variables": { "RandomSeed": "1699543880", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_QUERY_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/SearchTests/OrderByProgressivelyBreaksTies.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTies.json index f6c05cb2986b..ab3ed047bfc9 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTies.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTies.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "160", "Content-Type": "application/json", - "traceparent": "00-5b84ab814dd2824fb016727ec85fd72e-df0db2d553adf049-00", + "traceparent": "00-90f0efc525a74b41a0cd1ff5d1f9e1bc-a4790405f6848446-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "1a47832c488da3c259cce68d142373d9", "x-ms-return-client-request-id": "true" @@ -24,359 +25,26 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:35:37 GMT", - "elapsed-time": "79", + "client-request-id": "1a47832c-488d-a3c2-59cc-e68d142373d9", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:41 GMT", + "elapsed-time": "13", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "1a47832c-488d-a3c2-59cc-e68d142373d9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "1a47832c-488d-a3c2-59cc-e68d142373d9" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]}]}" } ], "Variables": { "RandomSeed": "1887389748", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_QUERY_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/SearchTests/OrderByProgressivelyBreaksTiesAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTiesAsync.json index 90ed429b57c7..dbb54d5a034a 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTiesAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/OrderByProgressivelyBreaksTiesAsync.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "160", "Content-Type": "application/json", - "traceparent": "00-3f14efbf68a6bf439044b203a44c8804-05bcf8d161788a4f-00", + "traceparent": "00-f57f4d5f7f17d443b1b795ec5c12a8e8-797bddb4ddb21c46-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "e05214803ce43a086e16d650d3aad6f4", "x-ms-return-client-request-id": "true" @@ -24,359 +25,26 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:37:48 GMT", - "elapsed-time": "57", + "client-request-id": "e0521480-3ce4-3a08-6e16-d650d3aad6f4", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:42 GMT", + "elapsed-time": "8", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "e0521480-3ce4-3a08-6e16-d650d3aad6f4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "e0521480-3ce4-3a08-6e16-d650d3aad6f4" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]}]}" } ], "Variables": { "RandomSeed": "1861346366", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_QUERY_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/SearchTests/StaticDocuments.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocuments.json index cb4fbec9f772..5a3ed2330e38 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocuments.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocuments.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "49", "Content-Type": "application/json", - "traceparent": "00-8665ac9362df774489ba7676bdcc4f2a-c1514e04df08194f-00", + "traceparent": "00-433b687f4c13de42a6c89f3275caa2e5-71d52fabcb4cb945-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "466c481f1cabba59864cce05b755caec", "x-ms-return-client-request-id": "true" @@ -23,359 +24,26 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:37:48 GMT", - "elapsed-time": "8", + "client-request-id": "466c481f-1cab-ba59-864c-ce05b755caec", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:41 GMT", + "elapsed-time": "7", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "466c481f-1cab-ba59-864c-ce05b755caec", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "466c481f-1cab-ba59-864c-ce05b755caec" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" } ], "Variables": { "RandomSeed": "661409870", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_QUERY_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/SearchTests/StaticDocumentsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsAsync.json index 95fbfe0ab1bf..6e76f706ffce 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsAsync.json @@ -1,16 +1,17 @@ { "Entries": [ { - "RequestUri": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027qphdytqm\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", "RequestMethod": "POST", "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", "api-key": "Sanitized", "Content-Length": "49", "Content-Type": "application/json", - "traceparent": "00-9443a291c01a1d4ebb87cd57c8b2c47f-6da6f22da2312343-00", + "traceparent": "00-7b65eec0e6155946898c9ee60d042371-5db428eac7f45a40-00", "User-Agent": [ - "azsdk-net-Search/11.0.0-dev.20200311.1", - "(.NET Core 4.6.28325.01; Microsoft Windows 10.0.18363 )" + "azsdk-net-Search.Documents/1.0.0-dev.20200605.1", + "(.NET Core 4.6.28801.04; Microsoft Windows 10.0.18363 )" ], "x-ms-client-request-id": "fc8b9f516b4a8c6008b5bcb7ba1b7bdb", "x-ms-return-client-request-id": "true" @@ -23,359 +24,26 @@ "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "7177", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 11 Mar 2020 18:39:36 GMT", - "elapsed-time": "9", + "client-request-id": "fc8b9f51-6b4a-8c60-08b5-bcb7ba1b7bdb", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Sat, 06 Jun 2020 02:01:42 GMT", + "elapsed-time": "6", "Expires": "-1", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", "request-id": "fc8b9f51-6b4a-8c60-08b5-bcb7ba1b7bdb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "fc8b9f51-6b4a-8c60-08b5-bcb7ba1b7bdb" }, - "ResponseBody": { - "@odata.context": "https://azs-net-amyysbpg.search.windows.net/indexes(\u0027gerhvwda\u0027)/$metadata#docs(*)", - "value": [ - { - "@search.score": 1.0, - "hotelId": "1", - "hotelName": "Fancy Stay", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "5", - "hotelName": "Comfy Place", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "7", - "hotelName": "Modern Stay", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.0, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T05:00:00Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 1.0, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - } + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" } ], "Variables": { "RandomSeed": "1422612215", - "SearchIndexName": "gerhvwda", - "SearchServiceName": "azs-net-amyysbpg" + "SearchIndexName": "qphdytqm", + "SEARCH_QUERY_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/SearchTests/StaticDocumentsWithCustomSerializer.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsWithCustomSerializer.json new file mode 100644 index 000000000000..f6f0e83e0626 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsWithCustomSerializer.json @@ -0,0 +1,50 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pybitseg\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "49", + "Content-Type": "application/json", + "traceparent": "00-a136ace68a5519409a3b3c74fe5f6472-9e26abb0f640c145-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": "af18bd458a8748f174608b8f7fd86649", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "facets": [], + "scoringParameters": [], + "search": "*" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "af18bd45-8a87-48f1-7460-8b8f7fd86649", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:32:32 GMT", + "elapsed-time": "120", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "af18bd45-8a87-48f1-7460-8b8f7fd86649", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "af18bd45-8a87-48f1-7460-8b8f7fd86649" + }, + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" + } + ], + "Variables": { + "RandomSeed": "251878370", + "SearchIndexName": "pybitseg", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_QUERY_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/SearchTests/StaticDocumentsWithCustomSerializerAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsWithCustomSerializerAsync.json new file mode 100644 index 000000000000..eb1cb63cbfc3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchTests/StaticDocumentsWithCustomSerializerAsync.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-teglaza.search.windows.net/indexes(\u0027pybitseg\u0027)/docs/search.post.search?api-version=2019-05-06-Preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "49", + "Content-Type": "application/json", + "traceparent": "00-d7a650c0abe5a7468c6d9d1c7b9826c6-5cbee725ed368445-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": "f7b96544cc84bac6bda5e8eb2d107dcc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "facets": [], + "scoringParameters": [], + "search": "*" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "f7b96544-cc84-bac6-bda5-e8eb2d107dcc", + "Content-Length": "7076", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Mon, 08 Jun 2020 14:32:32 GMT", + "elapsed-time": "7", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "f7b96544-cc84-bac6-bda5-e8eb2d107dcc", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "f7b96544-cc84-bac6-bda5-e8eb2d107dcc" + }, + "ResponseBody": "{\u0022value\u0022:[{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00221\u0022,\u0022hotelName\u0022:\u0022Fancy Stay\u0022,\u0022description\u0022:\u0022Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\u0022,\u0022descriptionFr\u0022:\u0022Meilleur h\\u00f4tel en ville si vous aimez les h\\u00f4tels de luxe. Ils ont une magnifique piscine \\u00e0 d\\u00e9bordement, un spa et un concierge tr\\u00e8s utile. L\u0027emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\u0022,\u0022category\u0022:\u0022Luxury\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022view\u0022,\u0022wifi\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222010-06-27T00:00:00Z\u0022,\u0022rating\u0022:5,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,47.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00222\u0022,\u0022hotelName\u0022:\u0022Roach Motel\u0022,\u0022description\u0022:\u0022Cheapest hotel in town. Infact, a motel.\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le moins cher en ville. Infact, un motel.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022motel\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221982-04-28T00:00:00Z\u0022,\u0022rating\u0022:1,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,49.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00223\u0022,\u0022hotelName\u0022:\u0022EconoStay\u0022,\u0022description\u0022:\u0022Very popular hotel in town\u0022,\u0022descriptionFr\u0022:\u0022H\\u00f4tel le plus populaire en ville\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,46.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00224\u0022,\u0022hotelName\u0022:\u0022Express Rooms\u0022,\u0022description\u0022:\u0022Pretty good hotel\u0022,\u0022descriptionFr\u0022:\u0022Assez bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00221995-07-01T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00225\u0022,\u0022hotelName\u0022:\u0022Comfy Place\u0022,\u0022description\u0022:\u0022Another good hotel\u0022,\u0022descriptionFr\u0022:\u0022Un autre bon h\\u00f4tel\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u0022wifi\u0022,\u0022budget\u0022],\u0022parkingIncluded\u0022:true,\u0022smokingAllowed\u0022:false,\u0022lastRenovationDate\u0022:\u00222012-08-12T00:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-122.131577,48.678581],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00226\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Surprisingly expensive. Model suites have an ocean-view.\u0022,\u0022descriptionFr\u0022:null,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00227\u0022,\u0022hotelName\u0022:\u0022Modern Stay\u0022,\u0022description\u0022:\u0022Modern architecture, very polite staff and very clean. Also very affordable.\u0022,\u0022descriptionFr\u0022:\u0022Architecture moderne, personnel poli et tr\\u00e8s propre. Aussi tr\\u00e8s abordable.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00228\u0022,\u0022hotelName\u0022:null,\u0022description\u0022:\u0022Has some road noise and is next to the very police station. Bathrooms had morel coverings.\u0022,\u0022descriptionFr\u0022:\u0022Il y a du bruit de la route et se trouve \\u00e0 c\\u00f4t\\u00e9 de la station de police. Les salles de bain avaient des rev\\u00eatements de morilles.\u0022,\u0022category\u0022:null,\u0022tags\u0022:[],\u0022parkingIncluded\u0022:null,\u0022smokingAllowed\u0022:null,\u0022lastRenovationDate\u0022:null,\u0022rating\u0022:null,\u0022location\u0022:null,\u0022address\u0022:null,\u0022rooms\u0022:[]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u00229\u0022,\u0022hotelName\u0022:\u0022Secret Point Motel\u0022,\u0022description\u0022:\u0022The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.\u0022,\u0022descriptionFr\u0022:\u0022L\u0027h\\u00f4tel est id\\u00e9alement situ\\u00e9 sur la principale art\\u00e8re commerciale de la ville en plein c\\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\\u00e9r\\u00eat qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\\u00e9rique.\u0022,\u0022category\u0022:\u0022Boutique\u0022,\u0022tags\u0022:[\u0022pool\u0022,\u0022air conditioning\u0022,\u0022concierge\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221970-01-18T05:00:00Z\u0022,\u0022rating\u0022:4,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-73.975403,40.760586],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u0022677 5th Ave\u0022,\u0022city\u0022:\u0022New York\u0022,\u0022stateProvince\u0022:\u0022NY\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002210022\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Cityside)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (c\\u00f4t\\u00e9 ville)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:9.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 King Bed (Mountain View)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 tr\\u00e8s grand lit (Mountain View)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:8.09,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022vcr/dvd\u0022,\u0022jacuzzi tub\u0022]}]},{\u0022@search.score\u0022:1.0,\u0022hotelId\u0022:\u002210\u0022,\u0022hotelName\u0022:\u0022Countryside Hotel\u0022,\u0022description\u0022:\u0022Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.\u0022,\u0022descriptionFr\u0022:\u0022\\u00c9conomisez jusqu\u0027\\u00e0 50% sur les h\\u00f4tels traditionnels. WiFi gratuit, tr\\u00e8s bien situ\\u00e9 pr\\u00e8s du centre-ville, cuisine compl\\u00e8te, laveuse \u0026 s\\u00e9cheuse, support 24/7, bowling, centre de fitness et plus encore.\u0022,\u0022category\u0022:\u0022Budget\u0022,\u0022tags\u0022:[\u002224-hour front desk service\u0022,\u0022coffee in lobby\u0022,\u0022restaurant\u0022],\u0022parkingIncluded\u0022:false,\u0022smokingAllowed\u0022:true,\u0022lastRenovationDate\u0022:\u00221999-09-06T00:00:00Z\u0022,\u0022rating\u0022:3,\u0022location\u0022:{\u0022type\u0022:\u0022Point\u0022,\u0022coordinates\u0022:[-78.940483,35.90416],\u0022crs\u0022:{\u0022type\u0022:\u0022name\u0022,\u0022properties\u0022:{\u0022name\u0022:\u0022EPSG:4326\u0022}}},\u0022address\u0022:{\u0022streetAddress\u0022:\u00226910 Fayetteville Rd\u0022,\u0022city\u0022:\u0022Durham\u0022,\u0022stateProvince\u0022:\u0022NC\u0022,\u0022country\u0022:\u0022USA\u0022,\u0022postalCode\u0022:\u002227713\u0022},\u0022rooms\u0022:[{\u0022description\u0022:\u0022Suite, 1 King Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Suite, 1 tr\\u00e8s grand lit (Services)\u0022,\u0022type\u0022:\u0022Suite\u0022,\u0022baseRate\u0022:2.44,\u0022bedOptions\u0022:\u00221 King Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:true,\u0022tags\u0022:[\u0022coffee maker\u0022]},{\u0022description\u0022:\u0022Budget Room, 1 Queen Bed (Amenities)\u0022,\u0022descriptionFr\u0022:\u0022Chambre \\u00c9conomique, 1 grand lit (Services)\u0022,\u0022type\u0022:\u0022Budget Room\u0022,\u0022baseRate\u0022:7.69,\u0022bedOptions\u0022:\u00221 Queen Bed\u0022,\u0022sleepsCount\u0022:2,\u0022smokingAllowed\u0022:false,\u0022tags\u0022:[\u0022coffee maker\u0022]}]}]}" + } + ], + "Variables": { + "RandomSeed": "716347721", + "SearchIndexName": "pybitseg", + "SEARCH_QUERY_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-teglaza" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs index f29128cd631c..bfc02081eedb 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs @@ -6,7 +6,11 @@ using System.Text.Json.Serialization; using Azure.Search.Documents.Models; using Azure.Search.Documents.Indexes.Models; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#else using Microsoft.Spatial; +#endif #pragma warning disable SA1402 // File may only contain a single type @@ -111,7 +115,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = false, LastRenovationDate = new DateTimeOffset(2010, 6, 27, 0, 0, 0, TimeSpan.Zero), Rating = 5, - Location = GeographyPoint.Create(47.678581, -122.131577) + Location = TestExtensions.CreatePoint(-122.131577, 47.678581) }, new Hotel() { @@ -125,7 +129,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1982, 4, 28, 0, 0, 0, TimeSpan.Zero), //aka.ms/sre-codescan/disable Rating = 1, - Location = GeographyPoint.Create(49.678581, -122.131577) + Location = TestExtensions.CreatePoint(-122.131577, 49.678581) }, new Hotel() { @@ -139,7 +143,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = false, LastRenovationDate = new DateTimeOffset(1995, 7, 1, 0, 0, 0, TimeSpan.Zero), Rating = 4, - Location = GeographyPoint.Create(46.678581, -122.131577) + Location = TestExtensions.CreatePoint(-122.131577, 46.678581) }, new Hotel() { @@ -153,7 +157,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = false, LastRenovationDate = new DateTimeOffset(1995, 7, 1, 0, 0, 0, TimeSpan.Zero), Rating = 4, - Location = GeographyPoint.Create(48.678581, -122.131577) + Location = TestExtensions.CreatePoint(-122.131577, 48.678581) }, new Hotel() { @@ -167,7 +171,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = false, LastRenovationDate = new DateTimeOffset(2012, 8, 12, 0, 0, 0, TimeSpan.Zero), Rating = 4, - Location = GeographyPoint.Create(48.678581, -122.131577) + Location = TestExtensions.CreatePoint(-122.131577, 48.678581) }, new Hotel() { @@ -200,7 +204,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.FromHours(-5)), Rating = 4, - Location = GeographyPoint.Create(40.760586, -73.975403), + Location = TestExtensions.CreatePoint(-73.975403, 40.760586), Address = new HotelAddress() { StreetAddress = "677 5th Ave", @@ -247,7 +251,7 @@ internal static SearchIndex GetHotelIndex(string name) => SmokingAllowed = true, LastRenovationDate = new DateTimeOffset(1999, 9, 6, 0, 0, 0, TimeSpan.Zero), //aka.ms/sre-codescan/disable Rating = 3, - Location = GeographyPoint.Create(35.904160, -78.940483), + Location = TestExtensions.CreatePoint(-78.940483, 35.904160), Address = new HotelAddress() { StreetAddress = "6910 Fayetteville Rd", @@ -318,9 +322,13 @@ internal class Hotel [JsonPropertyName("rating")] public int? Rating { get; set; } - // TODO: #10592- Unify on an Azure.Core spatial type +#if EXPERIMENTAL_SPATIAL + [JsonPropertyName("location")] + public PointGeometry Location { get; set; } +#else [JsonIgnore] public GeographyPoint Location { get; set; } = null; +#endif [JsonPropertyName("address")] public HotelAddress Address { get; set; } @@ -341,7 +349,11 @@ obj is Hotel other && SmokingAllowed == other.SmokingAllowed && LastRenovationDate.EqualsDateTimeOffset(other.LastRenovationDate) && Rating == other.Rating && +#if EXPERIMENTAL_SPATIAL + (Location?.Position ?? default).Equals(other.Location?.Position ?? default) && +#else Location.EqualsNullSafe(other.Location) && +#endif Address.EqualsNullSafe(other.Address) && Rooms.SequenceEqualsNullSafe(other.Rooms); @@ -355,7 +367,11 @@ public override string ToString() $"Description (French): {DescriptionFr}; Category: {Category}; " + $"Tags: {Tags?.ToCommaSeparatedString() ?? "null"}; Parking: {ParkingIncluded}; " + $"Smoking: {SmokingAllowed}; LastRenovationDate: {LastRenovationDate}; Rating: {Rating}; " + +#if EXPERIMENTAL_SPATIAL + $"Location: [{Location?.Position.Longitude ?? 0}, {Location?.Position.Latitude ?? 0}]; " + +#else $"Location: [{Location?.Longitude ?? 0}, {Location?.Latitude ?? 0}]; " + +#endif $"Address: {{ {Address} }}; Rooms: [{string.Join("; ", Rooms?.Select(FormatRoom) ?? new string[0])}]"; } @@ -372,27 +388,57 @@ public SearchDocument AsDocument() => ["smokingAllowed"] = SmokingAllowed, ["lastRenovationDate"] = LastRenovationDate, ["rating"] = Rating, - // TODO: #10592- Unify on an Azure.Core spatial type - // ["location"] = Location, - ["location"] = Location == null ? null : new SearchDocument() - { - ["type"] = "Point", - ["coordinates"] = new double[] { Location.Longitude, Location.Latitude }, - ["crs"] = new SearchDocument() - { - ["type"] = "name", - ["properties"] = new SearchDocument() - { - ["name"] = "EPSG:4326" - } - } - }, + ["location"] = Location, ["address"] = Address?.AsDocument(), // With no elements to infer the type during deserialization, we must assume object[]. ["rooms"] = Rooms?.Select(r => r.AsDocument())?.ToArray() ?? new object[0] }; } + // Same structure as Hotel, but without attributes that change to camelCase + internal class UncasedHotel + { + public string HotelId { get; set; } + public string HotelName { get; set; } + public string Description { get; set; } + public string DescriptionFr { get; set; } + public string Category { get; set; } + // TODO: #10596 - Investigate JsonConverter for null arrays + public string[] Tags { get; set; } = new string[] { }; + public bool? ParkingIncluded { get; set; } + public bool? SmokingAllowed { get; set; } + public DateTimeOffset? LastRenovationDate { get; set; } + public int? Rating { get; set; } +#if EXPERIMENTAL_SPATIAL + public PointGeometry Location { get; set; } +#else + public GeographyPoint Location { get; set; } = null; +#endif + public HotelAddress Address { get; set; } + public HotelRoom[] Rooms { get; set; } = new HotelRoom[] { }; + + public override bool Equals(object obj) => + obj is Hotel other && + HotelId == other.HotelId && + HotelName == other.HotelName && + Description == other.Description && + DescriptionFr == other.DescriptionFr && + Category == other.Category && + Tags.SequenceEqualsNullSafe(other.Tags) && + ParkingIncluded == other.ParkingIncluded && + SmokingAllowed == other.SmokingAllowed && + LastRenovationDate.EqualsDateTimeOffset(other.LastRenovationDate) && + Rating == other.Rating && +#if EXPERIMENTAL_SPATIAL + (Location?.Position ?? default).Equals(other.Location?.Position ?? default) && +#else + Location.EqualsNullSafe(other.Location) && +#endif + Address.EqualsNullSafe(other.Address) && + Rooms.SequenceEqualsNullSafe(other.Rooms); + public override int GetHashCode() => HotelId?.GetHashCode() ?? 0; + } + internal class HotelAddress { [JsonPropertyName("streetAddress")] diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs index d9a41f608842..9c6d1e998107 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs @@ -391,7 +391,7 @@ private async Task CreateHotelsBlobContainerAsync() { using MemoryStream stream = new MemoryStream(); await JsonSerializer - .SerializeAsync(stream, hotel, JsonExtensions.SerializerOptions, cts.Token) + .SerializeAsync(stream, hotel, JsonSerialization.SerializerOptions, cts.Token) .ConfigureAwait(false); stream.Seek(0, SeekOrigin.Begin); diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs index f4ee7d72c06d..9e65b12a4260 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs @@ -2,12 +2,14 @@ // Licensed under the MIT License. using System; -using System.Diagnostics; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#endif using Azure.Core.TestFramework; using Azure.Search.Documents.Models; using NUnit.Framework; @@ -138,21 +140,38 @@ public static async Task CatchAsync(Func action) /// Dynamic documents will ignore any extra fields on the actual /// document that weren't present on the expected document. /// - /// The type of documents. /// The expected document. /// The actual document. - public static void AssertApproximate(T expected, T actual) + /// Optional expression path. + public static void AssertApproximate(object expected, object actual, string path = null) { if (expected is SearchDocument e && actual is SearchDocument a) { foreach (string key in e.Keys) { - Assert.AreEqual(e[key], a[key]); + object eValue = e[key]; + object aValue = + (eValue is DateTimeOffset) ? a.GetDateTimeOffset(key) : + (eValue is double) ? a.GetDouble(key) : + a[key]; + AssertApproximate(eValue, aValue, path != null ? path + "." + key : key); } } +#if EXPERIMENTAL_SPATIAL + else if (expected is PointGeometry ePt && actual is PointGeometry aPt) + { + AssertEqual(ePt.Position, aPt.Position, path != null ? path + ".Position" : "Position"); + } +#endif else { - Assert.AreEqual(expected, actual); + AssertEqual(expected, actual, path); + } + + static void AssertEqual(object e, object a, string path) + { + string location = path != null ? " at path " + path : ""; + Assert.AreEqual(e, a, $"Expected value `{e}`{location}, not `{a}`."); } } } diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/TestExtensions.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/TestExtensions.cs index ea067820633d..64c302de4904 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/TestExtensions.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/TestExtensions.cs @@ -5,6 +5,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +#if EXPERIMENTAL_SPATIAL +using Azure.Core.Spatial; +#else +using Microsoft.Spatial; +#endif using NUnit.Framework; namespace Azure.Search.Documents.Tests @@ -148,5 +153,20 @@ public static string ToCommaSeparatedString(this IEnumerable seq) => (seq == null || !seq.Any()) ? null : string.Join(",", seq); + + /// + /// Create a Geometry Point. + /// + /// The latitude. + /// The longitude. + /// +#if EXPERIMENTAL_SPATIAL + public static PointGeometry CreatePoint(double longitude, double latitude) => + new PointGeometry(new GeometryPosition(longitude, latitude)); +#else + public static GeographyPoint CreatePoint(double longitude, double latitude) => + // Note: GeographyPoint takes latitude first, unlike PointGeometry + GeographyPoint.Create(latitude, longitude); +#endif } }