diff --git a/sdk/search/Microsoft.Azure.Search.Common/src/Microsoft.Azure.Search.Common.csproj b/sdk/search/Microsoft.Azure.Search.Common/src/Microsoft.Azure.Search.Common.csproj
index 4116123514677..622c439edcd58 100644
--- a/sdk/search/Microsoft.Azure.Search.Common/src/Microsoft.Azure.Search.Common.csproj
+++ b/sdk/search/Microsoft.Azure.Search.Common/src/Microsoft.Azure.Search.Common.csproj
@@ -4,7 +4,7 @@
Common types needed by the Azure Search .NET libraries. This is not the package you are looking for; It is only meant to be used as a dependency.
Microsoft Azure Search Common Library
$(RequiredTargetFrameworks)
- 9.0.2
See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.
+
\ No newline at end of file
diff --git a/sdk/search/Microsoft.Azure.Search.Data/src/Microsoft.Azure.Search.Data.csproj b/sdk/search/Microsoft.Azure.Search.Data/src/Microsoft.Azure.Search.Data.csproj
index c069180dae077..6e9e686f31332 100644
--- a/sdk/search/Microsoft.Azure.Search.Data/src/Microsoft.Azure.Search.Data.csproj
+++ b/sdk/search/Microsoft.Azure.Search.Data/src/Microsoft.Azure.Search.Data.csproj
@@ -4,16 +4,9 @@
Use this package if you're developing a .NET application using Azure Search, and you only need to query or update documents in your indexes. If you also need to create or update indexes, synonym maps, or other service-level resources, use the Microsoft.Azure.Search package instead.
Microsoft Azure Search Data Library
$(RequiredTargetFrameworks)
- 9.0.2
See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.
-
-
-
- true
- $(RepoEngPath)\MSSharedLibKey.snk
-
-
+
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/AnalyzerAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/AnalyzerAttribute.cs
index 017126d306ed7..11bfc64481926 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/AnalyzerAttribute.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/AnalyzerAttribute.cs
@@ -2,11 +2,11 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using Microsoft.Azure.Search.Models;
+
namespace Microsoft.Azure.Search
{
- using System;
- using Microsoft.Azure.Search.Models;
-
///
/// Indicates that the generated by for
/// the target property should have its property set to the
@@ -19,7 +19,7 @@ public class AnalyzerAttribute : Attribute
/// Indicates that the specified analyzer should be used.
///
///
- /// The name of the analyzer. Use one of the names in
+ /// The name of the analyzer. Use one of the names in AnalyzerName.AsString
/// or the name of a custom analyzer.
///
public AnalyzerAttribute(string analyzerName)
@@ -27,6 +27,9 @@ public AnalyzerAttribute(string analyzerName)
Name = analyzerName;
}
+ ///
+ /// The name of the analyzer.
+ ///
public string Name { get; }
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilder.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilder.cs
index ab7edb2afb9ac..d65216fbff20b 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilder.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilder.cs
@@ -2,18 +2,18 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Microsoft.Azure.Search.Models;
+using Microsoft.Spatial;
+using Newtonsoft.Json.Serialization;
+using Newtonsoft.Json;
+using System.Collections.ObjectModel;
+
namespace Microsoft.Azure.Search
{
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using Microsoft.Azure.Search.Models;
- using Microsoft.Spatial;
- using Newtonsoft.Json.Serialization;
- using Newtonsoft.Json;
- using System.Collections.ObjectModel;
-
///
/// Builds field definitions for an Azure Search index by reflecting over a user-defined model type.
///
@@ -92,37 +92,61 @@ public static IList BuildForType(Type modelType)
/// consistent with the way the model will be serialized.
///
/// A collection of fields.
- public static IList BuildForType(Type modelType, IContractResolver contractResolver) =>
- BuildForTypeRecursive(modelType, contractResolver, new Stack(new[] { modelType })); // Avoiding dependency on ImmutableStack for now.
-
- private static IList BuildForTypeRecursive(Type modelType, IContractResolver contractResolver, Stack processedTypes)
+ public static IList BuildForType(Type modelType, IContractResolver contractResolver)
{
- var contract = (JsonObjectContract)contractResolver.ResolveContract(modelType);
- var fields = new List();
- foreach (JsonProperty prop in contract.Properties)
+ ArgumentException FailOnNonObjectDataType()
{
- IList attributes = prop.AttributeProvider.GetAttributes(true);
- if (attributes.Any(attr => attr is JsonIgnoreAttribute))
+ string errorMessage =
+ $"Type '{modelType}' does not have properties which map to fields of an Azure Search index. Please use a " +
+ "class or struct with public properties.";
+
+ throw new ArgumentException(errorMessage, nameof(modelType));
+ }
+
+ if (contractResolver.ResolveContract(modelType) is JsonObjectContract contract)
+ {
+ if (contract.Properties.Count == 0)
{
- continue;
+ throw FailOnNonObjectDataType();
}
- DataTypeInfo dataTypeInfo = GetDataTypeInfo(prop.PropertyType);
- DataType dataType = dataTypeInfo.DataType;
- Type underlyingClrType = dataTypeInfo.UnderlyingClrType;
+ // Use Stack to avoid a dependency on ImmutableStack for now.
+ return BuildForTypeRecursive(modelType, contract, contractResolver, new Stack(new[] { modelType }));
+ }
+
+ throw FailOnNonObjectDataType();
+ }
- if (processedTypes.Contains(underlyingClrType))
+ private static IList BuildForTypeRecursive(
+ Type modelType,
+ JsonObjectContract contract,
+ IContractResolver contractResolver,
+ Stack processedTypes)
+ {
+ Field BuildField(JsonProperty prop)
+ {
+ bool ShouldIgnore(Attribute attribute) =>
+ attribute is JsonIgnoreAttribute || attribute is FieldBuilderIgnoreAttribute;
+
+ IList attributes = prop.AttributeProvider.GetAttributes(true);
+ if (attributes.Any(ShouldIgnore))
{
- // Skip recursive types.
- continue;
+ return null;
}
- Field CreateComplexField()
+ Field CreateComplexField(DataType dataType, Type underlyingClrType, JsonObjectContract jsonObjectContract)
{
try
{
+ if (processedTypes.Contains(underlyingClrType))
+ {
+ // Skip recursive types.
+ return null;
+ }
+
processedTypes.Push(underlyingClrType);
- IList subFields = BuildForTypeRecursive(underlyingClrType, contractResolver, processedTypes);
+ IList subFields =
+ BuildForTypeRecursive(underlyingClrType, jsonObjectContract, contractResolver, processedTypes);
return new Field(prop.PropertyName, dataType, subFields);
}
finally
@@ -131,7 +155,7 @@ Field CreateComplexField()
}
}
- Field CreateSimpleField()
+ Field CreateSimpleField(DataType dataType)
{
var field = new Field(prop.PropertyName, dataType);
@@ -176,10 +200,14 @@ Field CreateSimpleField()
break;
default:
+ Type attributeType = attribute.GetType();
+
// Match on name to avoid dependency - don't want to force people not using
// this feature to bring in the annotations component.
- Type attributeType = attribute.GetType();
- if (attributeType.FullName == "System.ComponentModel.DataAnnotations.KeyAttribute")
+ //
+ // Also, ignore key attributes on sub-fields.
+ if (attributeType.FullName == "System.ComponentModel.DataAnnotations.KeyAttribute" &&
+ processedTypes.Count <= 1)
{
field.IsKey = true;
}
@@ -190,33 +218,52 @@ Field CreateSimpleField()
return field;
}
- fields.Add(dataType.IsComplex() ? CreateComplexField() : CreateSimpleField());
+ ArgumentException FailOnUnknownDataType()
+ {
+ string errorMessage =
+ $"Property '{prop.PropertyName}' is of type '{prop.PropertyType}', which does not map to an " +
+ "Azure Search data type. Please use a supported data type or mark the property with [JsonIgnore] or " +
+ "[FieldBuilderIgnore] and define the field by creating a Field object.";
+
+ return new ArgumentException(errorMessage, nameof(modelType));
+ }
+
+ IDataTypeInfo dataTypeInfo = GetDataTypeInfo(prop.PropertyType, contractResolver);
+
+ return dataTypeInfo.Match(
+ onUnknownDataType: () => throw FailOnUnknownDataType(),
+ onSimpleDataType: CreateSimpleField,
+ onComplexDataType: CreateComplexField);
}
- return fields;
+ return contract.Properties.Select(BuildField).Where(field => field != null).ToArray();
}
- private static DataTypeInfo GetDataTypeInfo(Type propertyType)
+ private static IDataTypeInfo GetDataTypeInfo(Type propertyType, IContractResolver contractResolver)
{
bool IsNullableType(Type type) =>
type.IsConstructedGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>);
if (PrimitiveTypeMap.TryGetValue(propertyType, out DataType dataType))
{
- return new DataTypeInfo(dataType, propertyType);
+ return DataTypeInfo.Simple(dataType);
}
else if (IsNullableType(propertyType))
{
- return GetDataTypeInfo(propertyType.GenericTypeArguments[0]);
+ return GetDataTypeInfo(propertyType.GenericTypeArguments[0], contractResolver);
}
else if (TryGetEnumerableElementType(propertyType, out Type elementType))
{
- DataTypeInfo elementTypeInfo = GetDataTypeInfo(elementType);
- return new DataTypeInfo(DataType.Collection(elementTypeInfo.DataType), elementTypeInfo.UnderlyingClrType);
+ IDataTypeInfo elementTypeInfo = GetDataTypeInfo(elementType, contractResolver);
+ return DataTypeInfo.AsCollection(elementTypeInfo);
+ }
+ else if (contractResolver.ResolveContract(propertyType) is JsonObjectContract jsonContract)
+ {
+ return DataTypeInfo.Complex(DataType.Complex, propertyType, jsonContract);
}
else
{
- return new DataTypeInfo(DataType.Complex, propertyType);
+ return DataTypeInfo.Unknown;
}
}
@@ -253,18 +300,78 @@ Type GetElementTypeIfIEnumerable(Type t) =>
}
}
- // Avoid dependency on ValueTuple for now.
- private struct DataTypeInfo
+ private interface IDataTypeInfo
{
- public DataTypeInfo(DataType dataType, Type underlyingClrType)
+ T Match(
+ Func onUnknownDataType,
+ Func onSimpleDataType,
+ Func onComplexDataType);
+ }
+
+ private static class DataTypeInfo
+ {
+ public static IDataTypeInfo Unknown { get; } = new UnknownDataTypeInfo();
+
+ public static IDataTypeInfo Simple(DataType dataType) => new SimpleDataTypeInfo(dataType);
+
+ public static IDataTypeInfo Complex(DataType dataType, Type underlyingClrType, JsonObjectContract jsonContract) =>
+ new ComplexDataTypeInfo(dataType, underlyingClrType, jsonContract);
+
+ public static IDataTypeInfo AsCollection(IDataTypeInfo dataTypeInfo) =>
+ dataTypeInfo.Match(
+ onUnknownDataType: () => Unknown,
+ onSimpleDataType: dataType => Simple(DataType.Collection(dataType)),
+ onComplexDataType: (dataType, underlyingClrType, jsonContract) =>
+ Complex(DataType.Collection(dataType), underlyingClrType, jsonContract));
+
+ private sealed class UnknownDataTypeInfo : IDataTypeInfo
{
- DataType = dataType;
- UnderlyingClrType = underlyingClrType;
+ public UnknownDataTypeInfo()
+ {
+ }
+
+ public T Match(
+ Func onUnknownDataType,
+ Func onSimpleDataType,
+ Func onComplexDataType)
+ => onUnknownDataType();
}
- public DataType DataType { get; }
+ private sealed class SimpleDataTypeInfo : IDataTypeInfo
+ {
+ private readonly DataType _dataType;
+
+ public SimpleDataTypeInfo(DataType dataType)
+ {
+ _dataType = dataType;
+ }
+
+ public T Match(
+ Func onUnknownDataType,
+ Func onSimpleDataType,
+ Func onComplexDataType)
+ => onSimpleDataType(_dataType);
+ }
- public Type UnderlyingClrType { get; }
+ private sealed class ComplexDataTypeInfo : IDataTypeInfo
+ {
+ private readonly DataType _dataType;
+ private readonly Type _underlyingClrType;
+ private readonly JsonObjectContract _jsonContract;
+
+ public ComplexDataTypeInfo(DataType dataType, Type underlyingClrType, JsonObjectContract jsonContract)
+ {
+ _dataType = dataType;
+ _underlyingClrType = underlyingClrType;
+ _jsonContract = jsonContract;
+ }
+
+ public T Match(
+ Func onUnknownDataType,
+ Func onSimpleDataType,
+ Func onComplexDataType)
+ => onComplexDataType(_dataType, _underlyingClrType, _jsonContract);
+ }
}
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilderIgnoreAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilderIgnoreAttribute.cs
new file mode 100644
index 0000000000000..87e3d69c2ab75
--- /dev/null
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/FieldBuilderIgnoreAttribute.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+
+namespace Microsoft.Azure.Search
+{
+ using System;
+ using Microsoft.Azure.Search.Models;
+
+ ///
+ /// Indicates that the target property should be ignored by FieldBuilder.
+ ///
+ ///
+ /// This attribute is useful in situations where a property definition doesn't cleanly map to a Field
+ /// object, but its values still need to be converted to and from JSON. In that case,
+ /// JsonIgnore can't be used since it would disable JSON conversion.
+ /// An example of a scenario where this is useful is when mapping between a string field in Azure Search and an enum
+ /// property.
+ ///
+ [AttributeUsage(AttributeTargets.Property)]
+ public class FieldBuilderIgnoreAttribute : Attribute
+ {
+ }
+}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IndexAnalyzerAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IndexAnalyzerAttribute.cs
index 0bd996da7a061..68f5d895e2c92 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IndexAnalyzerAttribute.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IndexAnalyzerAttribute.cs
@@ -2,11 +2,11 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using Microsoft.Azure.Search.Models;
+
namespace Microsoft.Azure.Search
{
- using System;
- using Microsoft.Azure.Search.Models;
-
///
/// Indicates that the generated by for
/// the target property should have its property set to the
@@ -19,7 +19,7 @@ public class IndexAnalyzerAttribute : Attribute
/// Indicates that the specified analyzer should be used.
///
///
- /// The name of the analyzer. Use one of the names in
+ /// The name of the analyzer. Use one of the names in AnalyzerName.AsString
/// or the name of a custom analyzer.
///
public IndexAnalyzerAttribute(string analyzerName)
@@ -27,6 +27,9 @@ public IndexAnalyzerAttribute(string analyzerName)
Name = analyzerName;
}
+ ///
+ /// The name of the analyzer.
+ ///
public string Name { get; }
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IsRetrievableAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IsRetrievableAttribute.cs
index bf29bc2799275..c6b5ddfff319b 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IsRetrievableAttribute.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/IsRetrievableAttribute.cs
@@ -2,11 +2,11 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using Microsoft.Azure.Search.Models;
+
namespace Microsoft.Azure.Search
{
- using System;
- using Microsoft.Azure.Search.Models;
-
///
/// Indicates whether the field can be returned in a search result. This
/// defaults to true, so this attribute only has any effect if you use it
@@ -15,11 +15,20 @@ namespace Microsoft.Azure.Search
[AttributeUsage(AttributeTargets.Property)]
public class IsRetrievableAttribute : Attribute
{
+ ///
+ /// Indicates that the specified value should be used for the IsRetrievable
+ /// flag of the target field.
+ ///
+ /// true if the target field should be included in
+ /// search results, false otherwise.
public IsRetrievableAttribute(bool isRetrievable)
{
IsRetrievable = isRetrievable;
}
+ ///
+ /// true if the target field should be included in search results, false otherwise.
+ ///
public bool IsRetrievable { get; }
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SearchAnalyzerAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SearchAnalyzerAttribute.cs
index 426d7e9595a36..18f3d0ac902c7 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SearchAnalyzerAttribute.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SearchAnalyzerAttribute.cs
@@ -2,11 +2,11 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using Microsoft.Azure.Search.Models;
+
namespace Microsoft.Azure.Search
{
- using System;
- using Microsoft.Azure.Search.Models;
-
///
/// Indicates that the generated by for
/// the target property should have its property set to the
@@ -19,7 +19,7 @@ public class SearchAnalyzerAttribute : Attribute
/// Indicates that the specified analyzer should be used.
///
///
- /// The name of the analyzer. Use one of the names in
+ /// The name of the analyzer. Use one of the names in AnalyzerName.AsString
/// or the name of a custom analyzer.
///
public SearchAnalyzerAttribute(string analyzerName)
@@ -27,6 +27,9 @@ public SearchAnalyzerAttribute(string analyzerName)
Name = analyzerName;
}
+ ///
+ /// The name of the analyzer.
+ ///
public string Name { get; }
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SynonymMapsAttribute.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SynonymMapsAttribute.cs
index 18e30a1b2acc5..75ca97afe3975 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SynonymMapsAttribute.cs
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Customizations/Indexes/FieldBuilder/SynonymMapsAttribute.cs
@@ -2,12 +2,12 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using System.Collections.Generic;
+using Microsoft.Azure.Search.Models;
+
namespace Microsoft.Azure.Search
{
- using System;
- using System.Collections.Generic;
- using Microsoft.Azure.Search.Models;
-
///
/// Indicates that the generated by for
/// the target property should have its property set to the
@@ -29,6 +29,9 @@ public SynonymMapsAttribute(params string[] synonymMaps)
SynonymMaps = synonymMaps;
}
+ ///
+ /// A list of synonym map names that associates synonym maps with the field.
+ ///
public IList SynonymMaps { get; }
}
}
diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Microsoft.Azure.Search.Service.csproj b/sdk/search/Microsoft.Azure.Search.Service/src/Microsoft.Azure.Search.Service.csproj
index 103a1ce19e510..f480d16b34b59 100644
--- a/sdk/search/Microsoft.Azure.Search.Service/src/Microsoft.Azure.Search.Service.csproj
+++ b/sdk/search/Microsoft.Azure.Search.Service/src/Microsoft.Azure.Search.Service.csproj
@@ -4,10 +4,9 @@
Use this package if you're developing automation in .NET to manage Azure Search indexes, synonym maps, indexers, data sources, or other service-level resources. If you only need to query or update documents in your indexes, use the Microsoft.Azure.Search.Data package instead. If you need all the functionality of Azure Search, use the Microsoft.Azure.Search package instead.
Microsoft Azure Search Service Library
$(RequiredTargetFrameworks)
- 9.0.2
See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.
-
+
diff --git a/sdk/search/Microsoft.Azure.Search.Version.props b/sdk/search/Microsoft.Azure.Search.Version.props
new file mode 100644
index 0000000000000..dffb511ee6318
--- /dev/null
+++ b/sdk/search/Microsoft.Azure.Search.Version.props
@@ -0,0 +1,5 @@
+
+
+ 9.0.2
+
+
diff --git a/sdk/search/Microsoft.Azure.Search/src/Microsoft.Azure.Search.csproj b/sdk/search/Microsoft.Azure.Search/src/Microsoft.Azure.Search.csproj
index e3b1cf7c8c2e5..65f513a3be134 100644
--- a/sdk/search/Microsoft.Azure.Search/src/Microsoft.Azure.Search.csproj
+++ b/sdk/search/Microsoft.Azure.Search/src/Microsoft.Azure.Search.csproj
@@ -3,10 +3,10 @@
Microsoft Azure Search;Search
Makes it easy to develop a .NET application that uses Azure Search.
Microsoft Azure Search Library
- 9.0.2
$(RequiredTargetFrameworks)
This is the newest major version of the Azure Search .NET SDK, based on version 2019-05-06 of the Azure Search REST API. New in this GA version is support for Cognitive Search, complex types for richer data modeling, the Autocomplete API, and additional parsing modes for Blob indexers. See this article for help on migrating to the latest version: http://aka.ms/search-sdk-upgrade. The 9.0.1 release includes a fix for the deadlock issue (https://github.com/Azure/azure-sdk-for-net/issues/6254) in the Search API.
+
diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.FieldBuilderTests/FieldBuilderCreatesIndexEquivalentToManuallyDefinedIndex.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.FieldBuilderTests/FieldBuilderCreatesIndexEquivalentToManuallyDefinedIndex.json
index 314f99e609b15..ea7bbd1b16d6c 100644
--- a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.FieldBuilderTests/FieldBuilderCreatesIndexEquivalentToManuallyDefinedIndex.json
+++ b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.FieldBuilderTests/FieldBuilderCreatesIndexEquivalentToManuallyDefinedIndex.json
@@ -7,15 +7,15 @@
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
- "e545ca01-2524-4d1a-a2b3-21c6d4b35742"
+ "8db5e3ad-e13f-4e9d-8574-f651425ee96a"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0"
]
},
@@ -23,23 +23,20 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:30:52 GMT"
- ],
"Pragma": [
"no-cache"
],
"x-ms-ratelimit-remaining-subscription-writes": [
- "1163"
+ "1199"
],
"x-ms-request-id": [
- "cca3bc56-c577-4d4f-8877-0ad14ef32158"
+ "9f2a83a5-e470-4053-b46b-a6272147b299"
],
"x-ms-correlation-request-id": [
- "cca3bc56-c577-4d4f-8877-0ad14ef32158"
+ "9f2a83a5-e470-4053-b46b-a6272147b299"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203053Z:cca3bc56-c577-4d4f-8877-0ad14ef32158"
+ "NORTHEUROPE:20190706T024753Z:9f2a83a5-e470-4053-b46b-a6272147b299"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@@ -47,6 +44,9 @@
"X-Content-Type-Options": [
"nosniff"
],
+ "Date": [
+ "Sat, 06 Jul 2019 02:47:53 GMT"
+ ],
"Content-Length": [
"2230"
],
@@ -61,21 +61,21 @@
"StatusCode": 200
},
{
- "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet5879?api-version=2016-09-01",
- "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ1ODc5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=",
+ "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet5982?api-version=2016-09-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ1OTgyP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"location\": \"West US\"\r\n}",
"RequestHeaders": {
"x-ms-client-request-id": [
- "205fdbdc-c902-4de0-bfbb-d991138f77c1"
+ "584d408f-5d50-4ab3-ab8c-4a44a6cc17ab"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0"
],
"Content-Type": [
@@ -89,23 +89,20 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:30:53 GMT"
- ],
"Pragma": [
"no-cache"
],
"x-ms-ratelimit-remaining-subscription-writes": [
- "1163"
+ "1199"
],
"x-ms-request-id": [
- "88f091fb-9b1a-4e7e-84c1-0a0e6a1ed809"
+ "fa1fceb8-157d-4c9c-b51a-8c7e601c8038"
],
"x-ms-correlation-request-id": [
- "88f091fb-9b1a-4e7e-84c1-0a0e6a1ed809"
+ "fa1fceb8-157d-4c9c-b51a-8c7e601c8038"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203054Z:88f091fb-9b1a-4e7e-84c1-0a0e6a1ed809"
+ "NORTHEUROPE:20190706T024755Z:fa1fceb8-157d-4c9c-b51a-8c7e601c8038"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
@@ -113,6 +110,9 @@
"X-Content-Type-Options": [
"nosniff"
],
+ "Date": [
+ "Sat, 06 Jul 2019 02:47:55 GMT"
+ ],
"Content-Length": [
"175"
],
@@ -123,25 +123,25 @@
"-1"
]
},
- "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879\",\r\n \"name\": \"azsmnet5879\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}",
+ "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982\",\r\n \"name\": \"azsmnet5982\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}",
"StatusCode": 201
},
{
- "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879/providers/Microsoft.Search/searchServices/azs-4771?api-version=2015-08-19",
- "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1ODc5L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy00NzcxP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=",
+ "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982/providers/Microsoft.Search/searchServices/azs-9194?api-version=2015-08-19",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1OTgyL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy05MTk0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"free\"\r\n },\r\n \"location\": \"West US\"\r\n}",
"RequestHeaders": {
"x-ms-client-request-id": [
- "80a9ebfb-88fe-4650-aa9e-1cad9c02acd1"
+ "47ae7e25-bf38-4209-aac5-56c54a90dd07"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0"
],
"Content-Type": [
@@ -155,39 +155,39 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:30:58 GMT"
- ],
"Pragma": [
"no-cache"
],
"ETag": [
- "W/\"datetime'2019-04-27T20%3A30%3A58.2452414Z'\""
+ "W/\"datetime'2019-07-06T02%3A48%3A06.766631Z'\""
],
"x-ms-request-id": [
- "80a9ebfb-88fe-4650-aa9e-1cad9c02acd1"
+ "47ae7e25-bf38-4209-aac5-56c54a90dd07"
],
"request-id": [
- "80a9ebfb-88fe-4650-aa9e-1cad9c02acd1"
+ "47ae7e25-bf38-4209-aac5-56c54a90dd07"
],
"elapsed-time": [
- "1895"
+ "6740"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-writes": [
- "1158"
+ "1199"
],
"x-ms-correlation-request-id": [
- "c42c1efa-4134-4ffc-ba32-961755544ce4"
+ "8ed38281-6d22-42b1-95f3-485fcdb6057a"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203058Z:c42c1efa-4134-4ffc-ba32-961755544ce4"
+ "NORTHEUROPE:20190706T024807Z:8ed38281-6d22-42b1-95f3-485fcdb6057a"
],
"X-Content-Type-Options": [
"nosniff"
],
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:07 GMT"
+ ],
"Content-Length": [
"385"
],
@@ -198,25 +198,25 @@
"-1"
]
},
- "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879/providers/Microsoft.Search/searchServices/azs-4771\",\r\n \"name\": \"azs-4771\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}",
+ "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982/providers/Microsoft.Search/searchServices/azs-9194\",\r\n \"name\": \"azs-9194\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}",
"StatusCode": 201
},
{
- "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879/providers/Microsoft.Search/searchServices/azs-4771/listAdminKeys?api-version=2015-08-19",
- "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1ODc5L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy00NzcxL2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==",
+ "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982/providers/Microsoft.Search/searchServices/azs-9194/listAdminKeys?api-version=2015-08-19",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1OTgyL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy05MTk0L2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==",
"RequestMethod": "POST",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
- "cb8cc43b-28a5-4358-b6f2-fa633714cd10"
+ "9662881f-991d-4863-82d1-70667bf01cda"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0"
]
},
@@ -224,9 +224,6 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:00 GMT"
- ],
"Pragma": [
"no-cache"
],
@@ -234,29 +231,32 @@
"Accept-Encoding"
],
"x-ms-request-id": [
- "cb8cc43b-28a5-4358-b6f2-fa633714cd10"
+ "9662881f-991d-4863-82d1-70667bf01cda"
],
"request-id": [
- "cb8cc43b-28a5-4358-b6f2-fa633714cd10"
+ "9662881f-991d-4863-82d1-70667bf01cda"
],
"elapsed-time": [
- "134"
+ "133"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-writes": [
- "1158"
+ "1199"
],
"x-ms-correlation-request-id": [
- "d6eb7cf1-3255-40d5-a448-4de051a1e6ff"
+ "27bed86a-e6e6-4a82-8147-9d6edcb265a0"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203101Z:d6eb7cf1-3255-40d5-a448-4de051a1e6ff"
+ "NORTHEUROPE:20190706T024811Z:27bed86a-e6e6-4a82-8147-9d6edcb265a0"
],
"X-Content-Type-Options": [
"nosniff"
],
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:10 GMT"
+ ],
"Content-Length": [
"99"
],
@@ -267,25 +267,25 @@
"-1"
]
},
- "ResponseBody": "{\r\n \"primaryKey\": \"C3CD12074707434D973095EBA5B65E13\",\r\n \"secondaryKey\": \"B2FAB4403E37A51C530B0BA92C942301\"\r\n}",
+ "ResponseBody": "{\r\n \"primaryKey\": \"770711472B2E15D26BB7FFFFFC9BFF2E\",\r\n \"secondaryKey\": \"4B0D3F9732BB9F3A21F20D01BBA30585\"\r\n}",
"StatusCode": 200
},
{
- "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879/providers/Microsoft.Search/searchServices/azs-4771/listQueryKeys?api-version=2015-08-19",
- "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1ODc5L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy00NzcxL2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==",
+ "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982/providers/Microsoft.Search/searchServices/azs-9194/listQueryKeys?api-version=2015-08-19",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1OTgyL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy05MTk0L2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
- "cfc8e1e2-42d0-4f47-a24d-428ea85d00ee"
+ "7872a39a-a32c-4080-8768-ec3c6750b2c2"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0"
]
},
@@ -293,9 +293,6 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:00 GMT"
- ],
"Pragma": [
"no-cache"
],
@@ -303,29 +300,32 @@
"Accept-Encoding"
],
"x-ms-request-id": [
- "cfc8e1e2-42d0-4f47-a24d-428ea85d00ee"
+ "7872a39a-a32c-4080-8768-ec3c6750b2c2"
],
"request-id": [
- "cfc8e1e2-42d0-4f47-a24d-428ea85d00ee"
+ "7872a39a-a32c-4080-8768-ec3c6750b2c2"
],
"elapsed-time": [
- "99"
+ "101"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
- "14978"
+ "14999"
],
"x-ms-correlation-request-id": [
- "5ce612ed-6e76-4f5a-8170-63fb68fa52a9"
+ "57d6c051-c62f-4f96-b21e-66df277b5285"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203101Z:5ce612ed-6e76-4f5a-8170-63fb68fa52a9"
+ "NORTHEUROPE:20190706T024811Z:57d6c051-c62f-4f96-b21e-66df277b5285"
],
"X-Content-Type-Options": [
"nosniff"
],
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:11 GMT"
+ ],
"Content-Length": [
"82"
],
@@ -336,29 +336,29 @@
"-1"
]
},
- "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"4A17D4CDCC7FA17A16CA656F8EDD6C9D\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"A4750DFE063A72FF6EBB1CADEE4DA497\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"StatusCode": 200
},
{
"RequestUri": "/indexes?api-version=2019-05-06",
"EncodedRequestUri": "L2luZGV4ZXM/YXBpLXZlcnNpb249MjAxOS0wNS0wNg==",
"RequestMethod": "POST",
- "RequestBody": "{\r\n \"name\": \"azsmnet4861\",\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"key\": true,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functions\": [\r\n {\r\n \"type\": \"distance\",\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"fieldName\": \"location\",\r\n \"boost\": 2.0\r\n }\r\n ],\r\n \"functionAggregation\": \"sum\"\r\n }\r\n ],\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ],\r\n \"searchMode\": \"analyzingInfixMatching\"\r\n }\r\n ]\r\n}",
+ "RequestBody": "{\r\n \"name\": \"azsmnet2622\",\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"key\": true,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functions\": [\r\n {\r\n \"type\": \"distance\",\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"fieldName\": \"location\",\r\n \"boost\": 2.0\r\n }\r\n ],\r\n \"functionAggregation\": \"sum\"\r\n }\r\n ],\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ],\r\n \"searchMode\": \"analyzingInfixMatching\"\r\n }\r\n ]\r\n}",
"RequestHeaders": {
"client-request-id": [
- "ef8629fa-cf80-408c-9577-77acc78d5bfa"
+ "d52ce686-ab9c-4798-8804-2816cb09f221"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"api-key": [
- "C3CD12074707434D973095EBA5B65E13"
+ "770711472B2E15D26BB7FFFFFC9BFF2E"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
- "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0"
+ "OSVersion/Microsoft.Windows.10.0.18362.",
+ "Microsoft.Azure.Search.SearchServiceClient/9.0.2.0"
],
"Content-Type": [
"application/json; charset=utf-8"
@@ -371,23 +371,20 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:04 GMT"
- ],
"Pragma": [
"no-cache"
],
"ETag": [
- "W/\"0x8D6CB4F44FA2A83\""
+ "W/\"0x8D701BC65B94665\""
],
"Location": [
- "https://azs-4771.search-dogfood.windows-int.net/indexes('azsmnet4861')?api-version=2019-05-06"
+ "https://azs-9194.search-dogfood.windows-int.net/indexes('azsmnet2622')?api-version=2019-05-06"
],
"request-id": [
- "ef8629fa-cf80-408c-9577-77acc78d5bfa"
+ "d52ce686-ab9c-4798-8804-2816cb09f221"
],
"elapsed-time": [
- "1440"
+ "2713"
],
"OData-Version": [
"4.0"
@@ -398,68 +395,68 @@
"Strict-Transport-Security": [
"max-age=15724800; includeSubDomains"
],
- "Content-Length": [
- "6126"
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:16 GMT"
],
"Content-Type": [
"application/json; odata.metadata=minimal"
],
"Expires": [
"-1"
+ ],
+ "Content-Length": [
+ "6126"
]
},
- "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-4771.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D6CB4F44FA2A83\\\"\",\r\n \"name\": \"azsmnet4861\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functionAggregation\": \"sum\",\r\n \"text\": null,\r\n \"functions\": [\r\n {\r\n \"fieldName\": \"location\",\r\n \"interpolation\": \"linear\",\r\n \"type\": \"distance\",\r\n \"boost\": 2.0,\r\n \"freshness\": null,\r\n \"magnitude\": null,\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"tag\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"corsOptions\": null,\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"searchMode\": \"analyzingInfixMatching\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ]\r\n }\r\n ],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
+ "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-9194.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D701BC65B94665\\\"\",\r\n \"name\": \"azsmnet2622\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functionAggregation\": \"sum\",\r\n \"text\": null,\r\n \"functions\": [\r\n {\r\n \"fieldName\": \"location\",\r\n \"interpolation\": \"linear\",\r\n \"type\": \"distance\",\r\n \"boost\": 2.0,\r\n \"freshness\": null,\r\n \"magnitude\": null,\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"tag\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"corsOptions\": null,\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"searchMode\": \"analyzingInfixMatching\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ]\r\n }\r\n ],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
"StatusCode": 201
},
{
"RequestUri": "/indexes?api-version=2019-05-06",
"EncodedRequestUri": "L2luZGV4ZXM/YXBpLXZlcnNpb249MjAxOS0wNS0wNg==",
"RequestMethod": "POST",
- "RequestBody": "{\r\n \"name\": \"azsmnet9170\",\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"key\": true,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n }\r\n ]\r\n }\r\n ]\r\n}",
+ "RequestBody": "{\r\n \"name\": \"azsmnet383\",\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"key\": true,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"en.lucene\"\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"analyzer\": \"fr.lucene\"\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"key\": false,\r\n \"retrievable\": true,\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true\r\n }\r\n ]\r\n }\r\n ]\r\n}",
"RequestHeaders": {
"client-request-id": [
- "3f472e02-dd16-4adc-a8d5-2265c6c92854"
+ "3db6a5c9-659e-490e-a963-c74f4db8cb8d"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"api-key": [
- "C3CD12074707434D973095EBA5B65E13"
+ "770711472B2E15D26BB7FFFFFC9BFF2E"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
- "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0"
+ "OSVersion/Microsoft.Windows.10.0.18362.",
+ "Microsoft.Azure.Search.SearchServiceClient/9.0.2.0"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Content-Length": [
- "6411"
+ "6410"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:26 GMT"
- ],
"Pragma": [
"no-cache"
],
"ETag": [
- "W/\"0x8D6CB4F5297FEC2\""
+ "W/\"0x8D701BC75E4ED02\""
],
"Location": [
- "https://azs-4771.search-dogfood.windows-int.net/indexes('azsmnet9170')?api-version=2019-05-06"
+ "https://azs-9194.search-dogfood.windows-int.net/indexes('azsmnet383')?api-version=2019-05-06"
],
"request-id": [
- "3f472e02-dd16-4adc-a8d5-2265c6c92854"
+ "3db6a5c9-659e-490e-a963-c74f4db8cb8d"
],
"elapsed-time": [
- "1344"
+ "1492"
],
"OData-Version": [
"4.0"
@@ -470,59 +467,59 @@
"Strict-Transport-Security": [
"max-age=15724800; includeSubDomains"
],
- "Content-Length": [
- "5763"
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:44 GMT"
],
"Content-Type": [
"application/json; odata.metadata=minimal"
],
"Expires": [
"-1"
+ ],
+ "Content-Length": [
+ "5762"
]
},
- "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-4771.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D6CB4F5297FEC2\\\"\",\r\n \"name\": \"azsmnet9170\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [],\r\n \"corsOptions\": null,\r\n \"suggesters\": [],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
+ "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-9194.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D701BC75E4ED02\\\"\",\r\n \"name\": \"azsmnet383\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [],\r\n \"corsOptions\": null,\r\n \"suggesters\": [],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
"StatusCode": 201
},
{
- "RequestUri": "/indexes('azsmnet4861')?api-version=2019-05-06",
- "EncodedRequestUri": "L2luZGV4ZXMoJ2F6c21uZXQ0ODYxJyk/YXBpLXZlcnNpb249MjAxOS0wNS0wNg==",
+ "RequestUri": "/indexes('azsmnet2622')?api-version=2019-05-06",
+ "EncodedRequestUri": "L2luZGV4ZXMoJ2F6c21uZXQyNjIyJyk/YXBpLXZlcnNpb249MjAxOS0wNS0wNg==",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"client-request-id": [
- "179d64cc-a704-4bcb-81c7-9f0b6477470d"
+ "8480ecfd-559d-466f-af32-8367c3bd0c0d"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"api-key": [
- "C3CD12074707434D973095EBA5B65E13"
+ "770711472B2E15D26BB7FFFFFC9BFF2E"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
- "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0"
+ "OSVersion/Microsoft.Windows.10.0.18362.",
+ "Microsoft.Azure.Search.SearchServiceClient/9.0.2.0"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:25 GMT"
- ],
"Pragma": [
"no-cache"
],
"ETag": [
- "W/\"0x8D6CB4F44FA2A83\""
+ "W/\"0x8D701BC65B94665\""
],
"request-id": [
- "179d64cc-a704-4bcb-81c7-9f0b6477470d"
+ "8480ecfd-559d-466f-af32-8367c3bd0c0d"
],
"elapsed-time": [
- "19"
+ "1514"
],
"OData-Version": [
"4.0"
@@ -533,59 +530,59 @@
"Strict-Transport-Security": [
"max-age=15724800; includeSubDomains"
],
- "Content-Length": [
- "6126"
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:41 GMT"
],
"Content-Type": [
"application/json; odata.metadata=minimal; odata.streaming=true"
],
"Expires": [
"-1"
+ ],
+ "Content-Length": [
+ "6126"
]
},
- "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-4771.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D6CB4F44FA2A83\\\"\",\r\n \"name\": \"azsmnet4861\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functionAggregation\": \"sum\",\r\n \"text\": null,\r\n \"functions\": [\r\n {\r\n \"fieldName\": \"location\",\r\n \"interpolation\": \"linear\",\r\n \"type\": \"distance\",\r\n \"boost\": 2.0,\r\n \"freshness\": null,\r\n \"magnitude\": null,\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"tag\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"corsOptions\": null,\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"searchMode\": \"analyzingInfixMatching\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ]\r\n }\r\n ],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
+ "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-9194.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D701BC65B94665\\\"\",\r\n \"name\": \"azsmnet2622\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [\r\n {\r\n \"name\": \"nearest\",\r\n \"functionAggregation\": \"sum\",\r\n \"text\": null,\r\n \"functions\": [\r\n {\r\n \"fieldName\": \"location\",\r\n \"interpolation\": \"linear\",\r\n \"type\": \"distance\",\r\n \"boost\": 2.0,\r\n \"freshness\": null,\r\n \"magnitude\": null,\r\n \"distance\": {\r\n \"referencePointParameter\": \"myloc\",\r\n \"boostingDistance\": 100.0\r\n },\r\n \"tag\": null\r\n }\r\n ]\r\n }\r\n ],\r\n \"corsOptions\": null,\r\n \"suggesters\": [\r\n {\r\n \"name\": \"sg\",\r\n \"searchMode\": \"analyzingInfixMatching\",\r\n \"sourceFields\": [\r\n \"description\",\r\n \"hotelName\"\r\n ]\r\n }\r\n ],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
"StatusCode": 200
},
{
- "RequestUri": "/indexes('azsmnet9170')?api-version=2019-05-06",
- "EncodedRequestUri": "L2luZGV4ZXMoJ2F6c21uZXQ5MTcwJyk/YXBpLXZlcnNpb249MjAxOS0wNS0wNg==",
+ "RequestUri": "/indexes('azsmnet383')?api-version=2019-05-06",
+ "EncodedRequestUri": "L2luZGV4ZXMoJ2F6c21uZXQzODMnKT9hcGktdmVyc2lvbj0yMDE5LTA1LTA2",
"RequestMethod": "GET",
"RequestBody": "",
"RequestHeaders": {
"client-request-id": [
- "87b8d4d0-05bc-40d1-987e-11d27f01dc20"
+ "6b98f8be-ffd1-4f7c-aa93-906b6bd237e4"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"api-key": [
- "C3CD12074707434D973095EBA5B65E13"
+ "770711472B2E15D26BB7FFFFFC9BFF2E"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
- "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0"
+ "OSVersion/Microsoft.Windows.10.0.18362.",
+ "Microsoft.Azure.Search.SearchServiceClient/9.0.2.0"
]
},
"ResponseHeaders": {
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:26 GMT"
- ],
"Pragma": [
"no-cache"
],
"ETag": [
- "W/\"0x8D6CB4F5297FEC2\""
+ "W/\"0x8D701BC75E4ED02\""
],
"request-id": [
- "87b8d4d0-05bc-40d1-987e-11d27f01dc20"
+ "6b98f8be-ffd1-4f7c-aa93-906b6bd237e4"
],
"elapsed-time": [
- "18"
+ "58"
],
"OData-Version": [
"4.0"
@@ -596,35 +593,38 @@
"Strict-Transport-Security": [
"max-age=15724800; includeSubDomains"
],
- "Content-Length": [
- "5763"
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:44 GMT"
],
"Content-Type": [
"application/json; odata.metadata=minimal; odata.streaming=true"
],
"Expires": [
"-1"
+ ],
+ "Content-Length": [
+ "5762"
]
},
- "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-4771.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D6CB4F5297FEC2\\\"\",\r\n \"name\": \"azsmnet9170\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [],\r\n \"corsOptions\": null,\r\n \"suggesters\": [],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
+ "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-9194.search-dogfood.windows-int.net/$metadata#indexes/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D701BC75E4ED02\\\"\",\r\n \"name\": \"azsmnet383\",\r\n \"defaultScoringProfile\": null,\r\n \"fields\": [\r\n {\r\n \"name\": \"hotelId\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": true,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"hotelName\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"category\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"parkingIncluded\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"lastRenovationDate\",\r\n \"type\": \"Edm.DateTimeOffset\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"rating\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"location\",\r\n \"type\": \"Edm.GeographyPoint\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"address\",\r\n \"type\": \"Edm.ComplexType\",\r\n \"fields\": [\r\n {\r\n \"name\": \"streetAddress\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"city\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"stateProvince\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"country\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"postalCode\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": true,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"rooms\",\r\n \"type\": \"Collection(Edm.ComplexType)\",\r\n \"fields\": [\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"en.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"descriptionFr\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": false,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": false,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": \"fr.lucene\",\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"type\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"baseRate\",\r\n \"type\": \"Edm.Double\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"bedOptions\",\r\n \"type\": \"Edm.String\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"sleepsCount\",\r\n \"type\": \"Edm.Int32\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"smokingAllowed\",\r\n \"type\": \"Edm.Boolean\",\r\n \"searchable\": false,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n },\r\n {\r\n \"name\": \"tags\",\r\n \"type\": \"Collection(Edm.String)\",\r\n \"searchable\": true,\r\n \"filterable\": true,\r\n \"retrievable\": true,\r\n \"sortable\": false,\r\n \"facetable\": true,\r\n \"key\": false,\r\n \"indexAnalyzer\": null,\r\n \"searchAnalyzer\": null,\r\n \"analyzer\": null,\r\n \"synonymMaps\": []\r\n }\r\n ]\r\n }\r\n ],\r\n \"scoringProfiles\": [],\r\n \"corsOptions\": null,\r\n \"suggesters\": [],\r\n \"analyzers\": [],\r\n \"tokenizers\": [],\r\n \"tokenFilters\": [],\r\n \"charFilters\": []\r\n}",
"StatusCode": 200
},
{
- "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5879/providers/Microsoft.Search/searchServices/azs-4771?api-version=2015-08-19",
- "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1ODc5L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy00NzcxP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=",
+ "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5982/providers/Microsoft.Search/searchServices/azs-9194?api-version=2015-08-19",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1OTgyL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy05MTk0P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=",
"RequestMethod": "DELETE",
"RequestBody": "",
"RequestHeaders": {
"x-ms-client-request-id": [
- "76e68b05-7bba-45ea-839f-3b4fdba6dd68"
+ "d7b4efb9-8259-463b-b432-0c90109af8ca"
],
- "accept-language": [
+ "Accept-Language": [
"en-US"
],
"User-Agent": [
- "FxVersion/4.6.26614.01",
+ "FxVersion/4.6.27617.04",
"OSName/Windows",
- "OSVersion/Microsoft.Windows.10.0.17763.",
+ "OSVersion/Microsoft.Windows.10.0.18362.",
"Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0"
]
},
@@ -632,41 +632,41 @@
"Cache-Control": [
"no-cache"
],
- "Date": [
- "Sat, 27 Apr 2019 20:31:30 GMT"
- ],
"Pragma": [
"no-cache"
],
"x-ms-request-id": [
- "76e68b05-7bba-45ea-839f-3b4fdba6dd68"
+ "d7b4efb9-8259-463b-b432-0c90109af8ca"
],
"request-id": [
- "76e68b05-7bba-45ea-839f-3b4fdba6dd68"
+ "d7b4efb9-8259-463b-b432-0c90109af8ca"
],
"elapsed-time": [
- "1653"
+ "4142"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-deletes": [
- "14943"
+ "14999"
],
"x-ms-correlation-request-id": [
- "8a615942-2aa0-4ff0-9f42-0e8406d4eb61"
+ "ff6e1c17-5e28-43a6-99a4-60cf22da9b97"
],
"x-ms-routing-request-id": [
- "NORTHEUROPE:20190427T203131Z:8a615942-2aa0-4ff0-9f42-0e8406d4eb61"
+ "NORTHEUROPE:20190706T024852Z:ff6e1c17-5e28-43a6-99a4-60cf22da9b97"
],
"X-Content-Type-Options": [
"nosniff"
],
- "Content-Length": [
- "0"
+ "Date": [
+ "Sat, 06 Jul 2019 02:48:52 GMT"
],
"Expires": [
"-1"
+ ],
+ "Content-Length": [
+ "0"
]
},
"ResponseBody": "",
@@ -675,12 +675,12 @@
],
"Names": {
"GenerateName": [
- "azsmnet5879",
- "azsmnet4861",
- "azsmnet9170"
+ "azsmnet5982",
+ "azsmnet2622",
+ "azsmnet383"
],
"GenerateServiceName": [
- "azs-4771"
+ "azs-9194"
]
},
"Variables": {
diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/FieldBuilderTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/FieldBuilderTests.cs
index 60d04e4fed9c2..ffcca76261367 100644
--- a/sdk/search/Microsoft.Azure.Search/tests/Tests/FieldBuilderTests.cs
+++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/FieldBuilderTests.cs
@@ -2,16 +2,18 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Azure.Search.Models;
+using Microsoft.Azure.Search.Tests.Utilities;
+using Microsoft.Rest.Serialization;
+using Newtonsoft.Json;
+using Xunit;
+using KeyFieldAttribute = System.ComponentModel.DataAnnotations.KeyAttribute;
+
namespace Microsoft.Azure.Search.Tests
{
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.Azure.Search.Models;
- using Microsoft.Azure.Search.Tests.Utilities;
- using Microsoft.Rest.Serialization;
- using Xunit;
-
public class FieldBuilderTests : SearchTestBase
{
private static IEnumerable TestModelTypes
@@ -25,13 +27,41 @@ private static IEnumerable TestModelTypes
}
}
- public static TheoryData TestModelTypeTestData => new TheoryData().PopulateFrom(TestModelTypes);
+ public static TheoryData TestModelTypeTestData =>
+ new TheoryData()
+ .PopulateFrom(
+ from useCustomResolver in new[] { true, false }
+ from type in TestModelTypes
+ select (useCustomResolver, type));
- public static TheoryData PrimitiveTypeTestData
+ public static TheoryData PrimitiveTypeTestData
{
get
{
- (DataType, string)[] primitivePropertyTestData = new[]
+ (DataType dataType, string fieldName)[] primitiveSubFieldTestData = new[]
+ {
+ (DataType.String, nameof(ReflectableComplexObject.Name)),
+ (DataType.Int32, nameof(ReflectableComplexObject.Rating)),
+ (DataType.String, nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
+ (DataType.String, nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country))
+ };
+
+ var complexFields = new[]
+ {
+ nameof(ReflectableModel.Complex),
+ nameof(ReflectableModel.ComplexArray),
+ nameof(ReflectableModel.ComplexIList),
+ nameof(ReflectableModel.ComplexList),
+ nameof(ReflectableModel.ComplexIEnumerable),
+ nameof(ReflectableModel.ComplexICollection)
+ };
+
+ var allSubFieldTestData =
+ from topLevelFieldName in complexFields
+ from typeAndField in primitiveSubFieldTestData
+ select (typeAndField.dataType, topLevelFieldName + "/" + typeAndField.fieldName);
+
+ (DataType, string)[] primitiveFieldTestData = new[]
{
(DataType.String, nameof(ReflectableModel.Text)),
(DataType.Int32, nameof(ReflectableModel.Id)),
@@ -40,34 +70,19 @@ public static TheoryData PrimitiveTypeTestData
(DataType.Boolean, nameof(ReflectableModel.Flag)),
(DataType.DateTimeOffset, nameof(ReflectableModel.Time)),
(DataType.DateTimeOffset, nameof(ReflectableModel.TimeWithoutOffset)),
- (DataType.GeographyPoint, nameof(ReflectableModel.GeographyPoint)),
- (DataType.AsString.String, nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Name)),
- (DataType.AsString.Int32, nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Rating)),
- (DataType.AsString.String, nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
- (DataType.AsString.String, nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Name)),
- (DataType.AsString.Int32, nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Rating)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Name)),
- (DataType.AsString.Int32, nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Rating)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Name)),
- (DataType.AsString.Int32, nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Rating)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Name)),
- (DataType.AsString.Int32, nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Rating)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City)),
- (DataType.AsString.String, nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country))
+ (DataType.GeographyPoint, nameof(ReflectableModel.GeographyPoint))
};
- return new TheoryData().PopulateFrom(CombineTestData(TestModelTypes, primitivePropertyTestData));
+ (DataType, string)[] primitivePropertyTestData =
+ primitiveFieldTestData.Concat(allSubFieldTestData).ToArray();
+
+ return
+ new TheoryData()
+ .PopulateFrom(CombineTestData(TestModelTypes, primitivePropertyTestData));
}
}
- public static TheoryData CollectionTypeTestData
+ public static TheoryData CollectionTypeTestData
{
get
{
@@ -77,45 +92,56 @@ public static TheoryData CollectionTypeTestData
(DataType.String, nameof(ReflectableModel.StringIList)),
(DataType.String, nameof(ReflectableModel.StringIEnumerable)),
(DataType.String, nameof(ReflectableModel.StringList)),
+ (DataType.String, nameof(ReflectableModel.StringICollection)),
(DataType.AsString.Int32, nameof(ReflectableModel.IntArray)),
(DataType.AsString.Int32, nameof(ReflectableModel.IntIList)),
(DataType.AsString.Int32, nameof(ReflectableModel.IntIEnumerable)),
(DataType.AsString.Int32, nameof(ReflectableModel.IntList)),
+ (DataType.AsString.Int32, nameof(ReflectableModel.IntICollection)),
(DataType.AsString.Int64, nameof(ReflectableModel.LongArray)),
(DataType.AsString.Int64, nameof(ReflectableModel.LongIList)),
(DataType.AsString.Int64, nameof(ReflectableModel.LongIEnumerable)),
(DataType.AsString.Int64, nameof(ReflectableModel.LongList)),
+ (DataType.AsString.Int64, nameof(ReflectableModel.LongICollection)),
(DataType.AsString.Double, nameof(ReflectableModel.DoubleArray)),
(DataType.AsString.Double, nameof(ReflectableModel.DoubleIList)),
(DataType.AsString.Double, nameof(ReflectableModel.DoubleIEnumerable)),
(DataType.AsString.Double, nameof(ReflectableModel.DoubleList)),
+ (DataType.AsString.Double, nameof(ReflectableModel.DoubleICollection)),
(DataType.AsString.Boolean, nameof(ReflectableModel.BoolArray)),
(DataType.AsString.Boolean, nameof(ReflectableModel.BoolIList)),
(DataType.AsString.Boolean, nameof(ReflectableModel.BoolIEnumerable)),
(DataType.AsString.Boolean, nameof(ReflectableModel.BoolList)),
+ (DataType.AsString.Boolean, nameof(ReflectableModel.BoolICollection)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeArray)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeIList)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeIEnumerable)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeList)),
+ (DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeICollection)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeOffsetArray)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeOffsetIList)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeOffsetIEnumerable)),
(DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeOffsetList)),
+ (DataType.AsString.DateTimeOffset, nameof(ReflectableModel.DateTimeOffsetICollection)),
(DataType.AsString.GeographyPoint, nameof(ReflectableModel.GeographyPointArray)),
(DataType.AsString.GeographyPoint, nameof(ReflectableModel.GeographyPointIList)),
(DataType.AsString.GeographyPoint, nameof(ReflectableModel.GeographyPointIEnumerable)),
(DataType.AsString.GeographyPoint, nameof(ReflectableModel.GeographyPointList)),
+ (DataType.AsString.GeographyPoint, nameof(ReflectableModel.GeographyPointICollection)),
(DataType.AsString.Complex, nameof(ReflectableModel.ComplexArray)),
(DataType.AsString.Complex, nameof(ReflectableModel.ComplexIList)),
(DataType.AsString.Complex, nameof(ReflectableModel.ComplexIEnumerable)),
- (DataType.AsString.Complex, nameof(ReflectableModel.ComplexList))
+ (DataType.AsString.Complex, nameof(ReflectableModel.ComplexList)),
+ (DataType.AsString.Complex, nameof(ReflectableModel.ComplexICollection))
};
- return new TheoryData().PopulateFrom(CombineTestData(TestModelTypes, collectionPropertyTestData));
+ return
+ new TheoryData()
+ .PopulateFrom(CombineTestData(TestModelTypes, collectionPropertyTestData));
}
}
- public static TheoryData ComplexTypeTestData
+ public static TheoryData ComplexTypeTestData
{
get
{
@@ -126,57 +152,72 @@ public static TheoryData ComplexTypeTestData
nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Address),
nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Address),
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address),
- nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address)
+ nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Address)
};
- return new TheoryData().PopulateFrom(
+ return new TheoryData().PopulateFrom(
+ from useCustomResolver in new[] { true, false }
from type in TestModelTypes
from fieldPath in complexPropertyTestData
- select (type, fieldPath));
+ select (useCustomResolver, type, fieldPath));
}
}
[Theory]
[MemberData(nameof(PrimitiveTypeTestData))]
- public void ReportsPrimitiveTypedProperties(Type modelType, DataType expectedDataType, string fieldName)
+ public void ReportsPrimitiveTypedProperties(
+ bool useCustomResolver,
+ Type modelType,
+ DataType expectedDataType,
+ string fieldName)
{
- Test(modelType, fields => Assert.Equal(expectedDataType, fields[fieldName].Type));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ Assert.Equal(expectedDataType, fields[fieldName].Type);
}
[Theory]
[MemberData(nameof(ComplexTypeTestData))]
- public void ReportsComplexTypedProperties(Type modelType, string fieldName)
+ public void ReportsComplexTypedProperties(bool useCustomResolver, Type modelType, string fieldName)
{
- Test(modelType, fields => Assert.Equal(DataType.Complex, fields[fieldName].Type));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ Assert.Equal(DataType.Complex, fields[fieldName].Type);
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void ReportsNullableInt32Properties(Type modelType)
+ public void ReportsNullableInt32Properties(bool useCustomResolver, Type modelType)
{
- Test(modelType, fields => Assert.Equal(DataType.Int32, fields[nameof(ReflectableModel.NullableInt)].Type));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ Assert.Equal(DataType.Int32, fields[nameof(ReflectableModel.NullableInt)].Type);
}
[Theory]
[MemberData(nameof(CollectionTypeTestData))]
- public void ReportsCollectionProperties(Type modelType, DataType expectedElementDataType, string fieldName)
+ public void ReportsCollectionProperties(
+ bool useCustomResolver,
+ Type modelType,
+ DataType expectedElementDataType,
+ string fieldName)
{
- Test(modelType, fields => Assert.Equal(DataType.Collection(expectedElementDataType), fields[fieldName].Type));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ Assert.Equal(DataType.Collection(expectedElementDataType), fields[fieldName].Type);
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void ReportsKeyOnlyOnPropertyWithKeyAttribute(Type modelType)
+ public void ReportsKeyOnlyOnPropertyWithKeyAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(modelType, field => field.IsKey.GetValueOrDefault(false), nameof(ReflectableModel.Id));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(field => field.IsKey.GetValueOrDefault(false), nameof(ReflectableModel.Id));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void ReportsIsSearchableOnlyOnPropertiesWithIsSearchableAttribute(Type modelType)
+ public void ReportsIsSearchableOnlyOnPropertiesWithIsSearchableAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(
- modelType,
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
field => field.IsSearchable.GetValueOrDefault(false),
nameof(ReflectableModel.Text),
nameof(ReflectableModel.MoreText),
@@ -189,15 +230,17 @@ public void ReportsIsSearchableOnlyOnPropertiesWithIsSearchableAttribute(Type mo
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Name),
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City),
nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Name),
- nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City));
+ nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Name),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void IsFilterableOnlyOnPropertiesWithIsFilterableAttribute(Type modelType)
+ public void IsFilterableOnlyOnPropertiesWithIsFilterableAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(
- modelType,
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
field => field.IsFilterable.GetValueOrDefault(false),
nameof(ReflectableModel.FilterableText),
nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Rating),
@@ -209,72 +252,89 @@ public void IsFilterableOnlyOnPropertiesWithIsFilterableAttribute(Type modelType
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Rating),
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Rating),
- nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country));
+ nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Rating),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void IsSortableOnlyOnPropertiesWithIsSortableAttribute(Type modelType)
+ public void IsSortableOnlyOnPropertiesWithIsSortableAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(modelType, field => field.IsSortable.GetValueOrDefault(false), nameof(ReflectableModel.SortableText));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(field => field.IsSortable.GetValueOrDefault(false), nameof(ReflectableModel.SortableText));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void IsFacetableOnlyOnPropertiesWithIsFacetableAttribute(Type modelType)
+ public void IsFacetableOnlyOnPropertiesWithIsFacetableAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(
- modelType,
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
field => field.IsFacetable.GetValueOrDefault(false),
nameof(ReflectableModel.FacetableText),
nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
- nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country));
+ nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void IsRetrievableOnAllPropertiesExceptOnesWithIsRetrievableAttributeSetToFalse(Type modelType)
+ public void IsRetrievableOnAllPropertiesExceptOnesWithIsRetrievableAttributeSetToFalse(
+ bool useCustomResolver,
+ Type modelType)
{
- OnlyFalseFor(modelType, field => field.IsRetrievable.GetValueOrDefault(true), nameof(ReflectableModel.IrretrievableText));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyFalseFor(
+ field => field.IsRetrievable.GetValueOrDefault(true),
+ nameof(ReflectableModel.IrretrievableText));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void AnalyzerSetOnlyOnPropertiesWithAnalyzerAttribute(Type modelType)
+ public void AnalyzerSetOnlyOnPropertiesWithAnalyzerAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(
- modelType,
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
field => field.Analyzer == AnalyzerName.EnMicrosoft,
nameof(ReflectableModel.TextWithAnalyzer),
nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Name),
nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Name),
nameof(ReflectableModel.ComplexIList) + "/" + nameof(ReflectableComplexObject.Name),
nameof(ReflectableModel.ComplexList) + "/" + nameof(ReflectableComplexObject.Name),
- nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Name));
+ nameof(ReflectableModel.ComplexIEnumerable) + "/" + nameof(ReflectableComplexObject.Name),
+ nameof(ReflectableModel.ComplexICollection) + "/" + nameof(ReflectableComplexObject.Name));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void SearchAnalyzerSetOnlyOnPropertiesWithSearchAnalyzerAttribute(Type modelType)
+ public void SearchAnalyzerSetOnlyOnPropertiesWithSearchAnalyzerAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(modelType, field => field.SearchAnalyzer == AnalyzerName.EsLucene, nameof(ReflectableModel.TextWithSearchAnalyzer));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
+ field => field.SearchAnalyzer == AnalyzerName.EsLucene,
+ nameof(ReflectableModel.TextWithSearchAnalyzer));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void IndexAnalyzerSetOnlyOnPropertiesWithIndexAnalyzerAttribute(Type modelType)
+ public void IndexAnalyzerSetOnlyOnPropertiesWithIndexAnalyzerAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(modelType, field => field.IndexAnalyzer == AnalyzerName.Whitespace, nameof(ReflectableModel.TextWithIndexAnalyzer));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(
+ field => field.IndexAnalyzer == AnalyzerName.Whitespace,
+ nameof(ReflectableModel.TextWithIndexAnalyzer));
}
[Theory]
[MemberData(nameof(TestModelTypeTestData))]
- public void SynonymMapsSetOnlyOnPropertiesWithSynonymMapsAttribute(Type modelType)
+ public void SynonymMapsSetOnlyOnPropertiesWithSynonymMapsAttribute(bool useCustomResolver, Type modelType)
{
- OnlyTrueFor(modelType, field => field.SynonymMaps?.Contains("myMap") ?? false, nameof(ReflectableModel.Text));
+ var fields = new FieldMap(BuildForType(modelType, useCustomResolver));
+ fields.OnlyTrueFor(field => field.SynonymMaps?.Contains("myMap") ?? false, nameof(ReflectableModel.Text));
}
[Theory]
@@ -282,31 +342,108 @@ public void SynonymMapsSetOnlyOnPropertiesWithSynonymMapsAttribute(Type modelTyp
[InlineData(typeof(ReflectableStructCamelCaseModel))]
public void HonoursSerializePropertyNamesAsCamelCaseAttribute(Type modelType)
{
- void RunTest(Dictionary fieldMap)
+ var fieldMap = new FieldMap(BuildForType(modelType, useCustomResolver: false));
+
+ Assert.True(fieldMap.ContainsKey("id"));
+ Assert.True(fieldMap.ContainsKey("myProperty"));
+ Assert.True(fieldMap.ContainsKey("inner"));
+ Assert.True(fieldMap.ContainsKey("inner/name"));
+ Assert.True(fieldMap.ContainsKey("innerCollection"));
+ Assert.True(fieldMap.ContainsKey("innerCollection/name"));
+ }
+
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void RecursivePropertiesAreIgnored(bool useCustomResolver)
+ {
+ var fieldMap = new FieldMap(BuildForType(typeof(RecursiveModel), useCustomResolver));
+
+ Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Data)));
+ Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Next)));
+ Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Next) + "/" + nameof(OtherRecursiveModel.Data)));
+ Assert.False(fieldMap.ContainsKey(nameof(RecursiveModel.Next) + "/" + nameof(OtherRecursiveModel.RecursiveReference)));
+ }
+
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void NestedKeyAttributesAreIgnored(bool useCustomResolver)
+ {
+ var expectedFields = new[]
{
- Assert.True(fieldMap.ContainsKey("id"));
- Assert.True(fieldMap.ContainsKey("myProperty"));
- Assert.True(fieldMap.ContainsKey("inner"));
- Assert.True(fieldMap.ContainsKey("inner/name"));
- Assert.True(fieldMap.ContainsKey("innerCollection"));
- Assert.True(fieldMap.ContainsKey("innerCollection/name"));
- }
+ Field.New(nameof(ModelWithNestedKey.ID), DataType.String, isKey: true),
+ Field.NewComplex(nameof(ModelWithNestedKey.Inner), isCollection: false, fields: new[]
+ {
+ Field.New(nameof(InnerModelWithKey.InnerID), DataType.String, isKey: false),
+ Field.New(nameof(InnerModelWithKey.OtherField), DataType.Int32, isFilterable: true)
+ })
+ };
+
+ IList actualFields = BuildForType(typeof(ModelWithNestedKey), useCustomResolver);
- TestForFields(RunTest, FieldBuilder.BuildForType(modelType));
+ Assert.Equal(expectedFields, actualFields, new DataPlaneModelComparer());
}
- [Fact]
- public void RecursivePropertiesAreIgnored()
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
+ public void PropertiesMarkedAsIgnoredAreIgnored(bool useCustomResolver)
{
- void RunTest(Dictionary fieldMap)
+ var expectedFields = new[]
{
- Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Data)));
- Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Next)));
- Assert.True(fieldMap.ContainsKey(nameof(RecursiveModel.Next) + "/" + nameof(OtherRecursiveModel.Data)));
- Assert.False(fieldMap.ContainsKey(nameof(RecursiveModel.Next) + "/" + nameof(OtherRecursiveModel.RecursiveReference)));
- }
+ Field.New(nameof(ModelWithIgnoredProperties.ID), DataType.String, isKey: true),
+ Field.NewComplex(nameof(ModelWithIgnoredProperties.Inner), isCollection: true, fields: new[]
+ {
+ Field.New(nameof(InnerModelWithIgnoredProperties.OtherField), DataType.Int32, isFilterable: true)
+ })
+ };
+
+ IList actualFields = BuildForType(typeof(ModelWithIgnoredProperties), useCustomResolver);
- Test(typeof(RecursiveModel), RunTest);
+ Assert.Equal(expectedFields, actualFields, new DataPlaneModelComparer());
+ }
+
+ [Theory]
+ [InlineData(typeof(ModelWithEnum), nameof(ModelWithEnum.Direction))]
+ [InlineData(typeof(ModelWithUnsupportedPrimitiveType), nameof(ModelWithUnsupportedPrimitiveType.Price))]
+ [InlineData(typeof(ModelWithUnsupportedEnumerableType), nameof(ModelWithUnsupportedEnumerableType.Buffer))]
+ [InlineData(typeof(ModelWithUnsupportedCollectionType), nameof(ModelWithUnsupportedCollectionType.Buffer))]
+ public void FieldBuilderFailsWithHelpfulErrorMessageOnUnsupportedPropertyTypes(Type modelType, string invalidPropertyName)
+ {
+ var e = Assert.Throws(() => FieldBuilder.BuildForType(modelType));
+
+ string expectedErrorMessage =
+ $"Property '{invalidPropertyName}' is of type '{modelType.GetProperty(invalidPropertyName).PropertyType}', " +
+ "which does not map to an Azure Search data type. Please use a supported data type or mark the property with " +
+ "[JsonIgnore] or [FieldBuilderIgnore] and define the field by creating a Field object." +
+ $"{Environment.NewLine}Parameter name: {nameof(modelType)}";
+
+ Assert.Equal(nameof(modelType), e.ParamName);
+ Assert.Equal(expectedErrorMessage, e.Message);
+ }
+
+ [Theory]
+ [InlineData(typeof(int))]
+ [InlineData(typeof(string))]
+ [InlineData(typeof(DateTimeOffset))]
+ [InlineData(typeof(Direction))]
+ [InlineData(typeof(object))]
+ [InlineData(typeof(int[]))]
+ [InlineData(typeof(IEnumerable))]
+ [InlineData(typeof(IList))]
+ [InlineData(typeof(List))]
+ [InlineData(typeof(ICollection))]
+ public void FieldBuilderFailsWithHelpfulErrorMessageOnUnsupportedTypes(Type modelType)
+ {
+ var e = Assert.Throws(() => FieldBuilder.BuildForType(modelType));
+
+ string expectedErrorMessage =
+ $"Type '{modelType}' does not have properties which map to fields of an Azure Search index. Please use a " +
+ $"class or struct with public properties.{Environment.NewLine}Parameter name: {nameof(modelType)}";
+
+ Assert.Equal(nameof(modelType), e.ParamName);
+ Assert.Equal(expectedErrorMessage, e.Message);
}
[Fact]
@@ -332,71 +469,159 @@ public void FieldBuilderCreatesIndexEquivalentToManuallyDefinedIndex()
});
}
- private static IEnumerable<(Type, DataType, string)> CombineTestData(
+ private static IEnumerable<(bool, Type, DataType, string)> CombineTestData(
IEnumerable modelTypes,
- IEnumerable<(DataType, string)> testData) =>
+ IEnumerable<(DataType dataType, string fieldName)> testData) =>
+ from useCustomResolver in new[] { true, false }
from type in modelTypes
from tuple in testData
- select (type, tuple.Item1, tuple.Item2);
+ select (useCustomResolver, type, tuple.dataType, tuple.fieldName);
+
+ private static IList BuildForType(Type modelType, bool useCustomResolver) =>
+ useCustomResolver ?
+ FieldBuilder.BuildForType(modelType, new ReadOnlyJsonContractResolver()) :
+ FieldBuilder.BuildForType(modelType);
+
+ private enum Direction
+ {
+ Up,
+ Down
+ }
- private void OnlyTrueFor(Type modelType, Func check, params string[] expectedFieldNames)
+ private class FieldMap
{
- Test(
- modelType,
- fields =>
+ private readonly IReadOnlyDictionary _map;
+
+ public FieldMap(IList fields)
+ {
+ IEnumerable> GetSelfAndDescendants(Field topLevelField)
{
- foreach (string fieldNameFromModel in fields.Keys)
+ IEnumerable> GetSelfAndDescendantsRecursive(Field field, string parentFieldPath)
{
- Field field = fields[fieldNameFromModel];
- bool result = check(field);
+ string currentFieldPath =
+ string.IsNullOrEmpty(parentFieldPath) ? field.Name : parentFieldPath + "/" + field.Name;
- if (expectedFieldNames.Contains(fieldNameFromModel))
- {
- Assert.True(result, $"Expected true for field {fieldNameFromModel}.");
- }
- else
+ yield return new KeyValuePair(currentFieldPath, field);
+
+ foreach (Field subField in field.Fields ?? Enumerable.Empty())
{
- Assert.False(result, $"Expected false for field {fieldNameFromModel}.");
+ foreach (var result in GetSelfAndDescendantsRecursive(subField, currentFieldPath))
+ {
+ yield return result;
+ }
}
}
- });
- }
- private void OnlyFalseFor(Type modelType, Func check, params string[] expectedFieldNames) =>
- OnlyTrueFor(modelType, f => !check(f), expectedFieldNames);
+ return GetSelfAndDescendantsRecursive(topLevelField, string.Empty);
+ }
- private void Test(Type modelType, Action> run)
- {
- // Test with both with and without bring-your-own-resolver.
- TestForFields(run, FieldBuilder.BuildForType(modelType, new ReadOnlyJsonContractResolver()));
- TestForFields(run, FieldBuilder.BuildForType(modelType));
- }
+ _map = fields.SelectMany(f => GetSelfAndDescendants(f)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
+ }
- private void TestForFields(Action> run, IList fields)
- {
- IEnumerable> GetSelfAndDescendants(Field topLevelField)
+ public Field this[string fieldName] => _map[fieldName];
+
+ public bool ContainsKey(string fieldName) => _map.ContainsKey(fieldName);
+
+ public void OnlyTrueFor(Func check, params string[] expectedFieldNames)
{
- IEnumerable> GetSelfAndDescendantsRecursive(Field field, string parentFieldPath)
+ foreach (string fieldNameFromModel in _map.Keys)
{
- string currentFieldPath =
- string.IsNullOrEmpty(parentFieldPath) ? field.Name : parentFieldPath + "/" + field.Name;
-
- yield return new KeyValuePair(currentFieldPath, field);
+ Field field = _map[fieldNameFromModel];
+ bool result = check(field);
- foreach (Field subField in field.Fields ?? Enumerable.Empty())
+ if (expectedFieldNames.Contains(fieldNameFromModel))
{
- foreach (var result in GetSelfAndDescendantsRecursive(subField, currentFieldPath))
- {
- yield return result;
- }
+ Assert.True(result, $"Expected true for field {fieldNameFromModel}.");
+ }
+ else
+ {
+ Assert.False(result, $"Expected false for field {fieldNameFromModel}.");
}
}
-
- return GetSelfAndDescendantsRecursive(topLevelField, string.Empty);
}
- var fieldMap = fields.SelectMany(f => GetSelfAndDescendants(f)).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
- run(fieldMap);
+ public void OnlyFalseFor(Func check, params string[] expectedFieldNames) =>
+ OnlyTrueFor(f => !check(f), expectedFieldNames);
+ }
+
+ private class ModelWithEnum
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ [IsFilterable, IsSearchable, IsSortable, IsFacetable]
+ public Direction Direction { get; set; }
+ }
+
+ private class ModelWithUnsupportedPrimitiveType
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ [IsFilterable]
+ public decimal Price { get; set; }
+ }
+
+ private class ModelWithUnsupportedEnumerableType
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ [IsFilterable]
+ public IEnumerable Buffer { get; set; }
+ }
+
+ private class ModelWithUnsupportedCollectionType
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ [IsFilterable]
+ public ICollection Buffer { get; set; }
+ }
+
+ private class InnerModelWithKey
+ {
+ [KeyField]
+ public string InnerID { get; set; }
+
+ [IsFilterable]
+ public int OtherField { get; set; }
+ }
+
+ private class ModelWithNestedKey
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ public InnerModelWithKey Inner { get; set; }
+ }
+
+ private class InnerModelWithIgnoredProperties
+ {
+ [IsFilterable]
+ public int OtherField { get; set; }
+
+ [JsonIgnore]
+ public string JsonIgnored { get; set; }
+
+ [FieldBuilderIgnore]
+ [JsonIgnore]
+ public DateTimeOffset[] FieldBuilderIgnored { get; set; }
+ }
+
+ private class ModelWithIgnoredProperties
+ {
+ [KeyField]
+ public string ID { get; set; }
+
+ [JsonIgnore]
+ public int[] JsonIgnored { get; set; }
+
+ [FieldBuilderIgnore]
+ public Direction FieldBuilderIgnored { get; set; }
+
+ public InnerModelWithIgnoredProperties[] Inner { get; set; }
}
}
}
diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableModel.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableModel.cs
index d0e7673f839e6..3b27920d0a0c5 100644
--- a/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableModel.cs
+++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableModel.cs
@@ -5,6 +5,7 @@
namespace Microsoft.Azure.Search.Tests
{
using System;
+ using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Microsoft.Azure.Search;
@@ -99,6 +100,8 @@ public class ReflectableModel
public IEnumerable StringIEnumerable { get; set; }
+ public ICollection StringICollection { get; set; }
+
public int? NullableInt { get; set; }
public GeographyPoint GeographyPoint { get; set; }
@@ -111,6 +114,8 @@ public class ReflectableModel
public IEnumerable IntIEnumerable { get; set; }
+ public ICollection IntICollection { get; set; }
+
public long[] LongArray { get; set; }
public IList LongIList { get; set; }
@@ -119,6 +124,8 @@ public class ReflectableModel
public IEnumerable LongIEnumerable { get; set; }
+ public ICollection LongICollection { get; set; }
+
public double[] DoubleArray { get; set; }
public IList DoubleIList { get; set; }
@@ -127,6 +134,8 @@ public class ReflectableModel
public IEnumerable DoubleIEnumerable { get; set; }
+ public ICollection DoubleICollection { get; set; }
+
public bool[] BoolArray { get; set; }
public IList BoolIList { get; set; }
@@ -135,6 +144,8 @@ public class ReflectableModel
public IEnumerable BoolIEnumerable { get; set; }
+ public ICollection BoolICollection { get; set; }
+
public DateTime[] DateTimeArray { get; set; }
public IList DateTimeIList { get; set; }
@@ -143,6 +154,8 @@ public class ReflectableModel
public IEnumerable DateTimeIEnumerable { get; set; }
+ public ICollection DateTimeICollection { get; set; }
+
public DateTimeOffset[] DateTimeOffsetArray { get; set; }
public IList DateTimeOffsetIList { get; set; }
@@ -151,6 +164,8 @@ public class ReflectableModel
public IEnumerable DateTimeOffsetIEnumerable { get; set; }
+ public ICollection DateTimeOffsetICollection { get; set; }
+
public GeographyPoint[] GeographyPointArray { get; set; }
public IList GeographyPointIList { get; set; }
@@ -159,6 +174,8 @@ public class ReflectableModel
public IEnumerable GeographyPointIEnumerable { get; set; }
+ public ICollection GeographyPointICollection { get; set; }
+
public ReflectableComplexObject Complex { get; set; }
public ReflectableComplexObject[] ComplexArray { get; set; }
@@ -169,6 +186,8 @@ public class ReflectableModel
public IEnumerable ComplexIEnumerable { get; set; }
+ public ICollection ComplexICollection { get; set; }
+
[JsonIgnore]
[IsRetrievable(false)]
#pragma warning disable IDE1006 // Naming Styles
diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableStructModel.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableStructModel.cs
index 6806b6ccd800c..6bd4dafb89e95 100644
--- a/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableStructModel.cs
+++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/Models/ReflectableStructModel.cs
@@ -99,6 +99,8 @@ public struct ReflectableStructModel
public IEnumerable StringIEnumerable { get; set; }
+ public ICollection StringICollection { get; set; }
+
public int? NullableInt { get; set; }
public GeographyPoint GeographyPoint { get; set; }
@@ -111,6 +113,8 @@ public struct ReflectableStructModel
public IEnumerable IntIEnumerable { get; set; }
+ public ICollection IntICollection { get; set; }
+
public long[] LongArray { get; set; }
public IList LongIList { get; set; }
@@ -119,6 +123,8 @@ public struct ReflectableStructModel
public IEnumerable LongIEnumerable { get; set; }
+ public ICollection LongICollection { get; set; }
+
public double[] DoubleArray { get; set; }
public IList DoubleIList { get; set; }
@@ -127,6 +133,8 @@ public struct ReflectableStructModel
public IEnumerable DoubleIEnumerable { get; set; }
+ public ICollection DoubleICollection { get; set; }
+
public bool[] BoolArray { get; set; }
public IList BoolIList { get; set; }
@@ -135,6 +143,8 @@ public struct ReflectableStructModel
public IEnumerable BoolIEnumerable { get; set; }
+ public ICollection BoolICollection { get; set; }
+
public DateTime[] DateTimeArray { get; set; }
public IList DateTimeIList { get; set; }
@@ -143,6 +153,8 @@ public struct ReflectableStructModel
public IEnumerable DateTimeIEnumerable { get; set; }
+ public ICollection DateTimeICollection { get; set; }
+
public DateTimeOffset[] DateTimeOffsetArray { get; set; }
public IList DateTimeOffsetIList { get; set; }
@@ -151,6 +163,8 @@ public struct ReflectableStructModel
public IEnumerable DateTimeOffsetIEnumerable { get; set; }
+ public ICollection DateTimeOffsetICollection { get; set; }
+
public GeographyPoint[] GeographyPointArray { get; set; }
public IList GeographyPointIList { get; set; }
@@ -159,6 +173,8 @@ public struct ReflectableStructModel
public IEnumerable GeographyPointIEnumerable { get; set; }
+ public ICollection GeographyPointICollection { get; set; }
+
public ReflectableComplexStruct? Complex { get; set; }
public ReflectableComplexStruct[] ComplexArray { get; set; }
@@ -169,6 +185,8 @@ public struct ReflectableStructModel
public IEnumerable ComplexIEnumerable { get; set; }
+ public ICollection ComplexICollection { get; set; }
+
[JsonIgnore]
[IsRetrievable(false)]
#pragma warning disable IDE1006 // Naming Styles
diff --git a/sdk/search/Microsoft.Azure.Search/tests/Utilities/TheoryDataExtensions.cs b/sdk/search/Microsoft.Azure.Search/tests/Utilities/TheoryDataExtensions.cs
index e6da026539cc0..6038519c3a92e 100644
--- a/sdk/search/Microsoft.Azure.Search/tests/Utilities/TheoryDataExtensions.cs
+++ b/sdk/search/Microsoft.Azure.Search/tests/Utilities/TheoryDataExtensions.cs
@@ -28,7 +28,9 @@ public static TheoryData PopulateFrom(this TheoryData te
return testData;
}
- public static TheoryData PopulateFrom(this TheoryData testData, IEnumerable<(T1, T2, T3)> source)
+ public static TheoryData PopulateFrom(
+ this TheoryData testData,
+ IEnumerable<(T1, T2, T3)> source)
{
foreach (var (t1, t2, t3) in source)
{
@@ -37,5 +39,17 @@ public static TheoryData PopulateFrom(this TheoryData PopulateFrom(
+ this TheoryData testData,
+ IEnumerable<(T1, T2, T3, T4)> source)
+ {
+ foreach (var (t1, t2, t3, t4) in source)
+ {
+ testData.Add(t1, t2, t3, t4);
+ }
+
+ return testData;
+ }
}
}