From 673f5bc2ecc26fd0cb1264ad0235a6e9039df2c8 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Thu, 23 Apr 2020 15:12:02 -0700 Subject: [PATCH] Return pageables from SearchServiceClient.GetIndexes(Async) (#11517) Fixes #11053 --- .../Azure.Search.Documents/CHANGELOG.md | 1 + .../Azure.Search.Documents.netstandard2.0.cs | 4 +- .../src/Azure.Search.Documents.csproj | 1 + .../src/SearchServiceClient.cs | 52 ++- .../tests/SearchServiceClientTests.cs | 32 ++ .../SearchServiceClientTests/GetIndexes.json | 441 ++++++++++++++++++ .../GetIndexesAsync.json | 436 +++++++++++++++++ .../GetIndexesNextPageThrowsAsync.json | 13 + 8 files changed, 957 insertions(+), 23 deletions(-) create mode 100644 sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexes.json create mode 100644 sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesAsync.json create mode 100644 sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesNextPageThrowsAsync.json diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 52454bc4021b..0cf980e7369a 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -5,6 +5,7 @@ ### Breaking Changes - Removed constructor from `SynonymMap` with `IEnumerable` parameter. +- `SearchServiceClient.GetIndexes` and `SearchServiceClient.GetIndexesAsync` now return `Pageable` and `AsyncPageable` respectively. ## 1.0.0-preview.2 (2020-04-06) diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index 85053204b7c9..436a8b67edb7 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -142,8 +142,8 @@ public SearchServiceClient(System.Uri endpoint, Azure.AzureKeyCredential credent public virtual System.Threading.Tasks.Task>> GetIndexersAsync(System.Collections.Generic.IEnumerable selectProperties = null, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndexerStatus(string indexerName, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexerStatusAsync(string indexerName, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetIndexes(System.Collections.Generic.IEnumerable selectProperties = null, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetIndexesAsync(System.Collections.Generic.IEnumerable selectProperties = null, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetIndexes(System.Collections.Generic.IEnumerable selectProperties = null, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetIndexesAsync(System.Collections.Generic.IEnumerable selectProperties = null, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndexStatistics(string indexName, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexStatisticsAsync(string indexName, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Search.Documents.SearchIndexClient GetSearchIndexClient(string indexName) { throw null; } diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index a9e15a6f3a87..acc27cb5acdc 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -32,6 +32,7 @@ + diff --git a/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs b/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs index db3d1891a71d..3a0c87762158 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchServiceClient.cs @@ -753,21 +753,26 @@ await IndexesClient.GetAsync( /// Optional property names to select. The default is all properties. /// Optional to customize the operation's behavior. /// Optional to propagate notifications that the operation should be canceled. - /// The from the server containing a list of . + /// The from the server containing a list of . /// Thrown when a failure is returned by the Search service. [ForwardsClientCalls] - public virtual Response> GetIndexes( + public virtual Pageable GetIndexes( IEnumerable selectProperties = null, SearchRequestOptions options = null, - CancellationToken cancellationToken = default) - { - Response result = IndexesClient.List( - selectProperties.CommaJoin() ?? Constants.All, - options?.ClientRequestId, - cancellationToken); + CancellationToken cancellationToken = default) => PageResponseEnumerator.CreateEnumerable((continuationToken) => + { + if (continuationToken != null) + { + throw new NotSupportedException("A continuation token is unexpected and unsupported at this time."); + } - return Response.FromValue(result.Value.Indexes, result.GetRawResponse()); - } + Response result = IndexesClient.List( + selectProperties.CommaJoin() ?? Constants.All, + options?.ClientRequestId, + cancellationToken); + + return Page.FromValues(result.Value.Indexes, null, result.GetRawResponse()); + }); /// /// Gets a list of all indexes. @@ -778,19 +783,24 @@ public virtual Response> GetIndexes( /// The from the server containing a list of . /// Thrown when a failure is returned by the Search service. [ForwardsClientCalls] - public virtual async Task>> GetIndexesAsync( + public virtual AsyncPageable GetIndexesAsync( IEnumerable selectProperties = null, SearchRequestOptions options = null, - CancellationToken cancellationToken = default) - { - Response result = await IndexesClient.ListAsync( - selectProperties.CommaJoin() ?? Constants.All, - options?.ClientRequestId, - cancellationToken) - .ConfigureAwait(false); - - return Response.FromValue(result.Value.Indexes, result.GetRawResponse()); - } + CancellationToken cancellationToken = default) => PageResponseEnumerator.CreateAsyncEnumerable(async (continuationToken) => + { + if (continuationToken != null) + { + throw new NotSupportedException("A continuation token is unexpected and unsupported at this time."); + } + + Response result = await IndexesClient.ListAsync( + selectProperties.CommaJoin() ?? Constants.All, + options?.ClientRequestId, + cancellationToken) + .ConfigureAwait(false); + + return Page.FromValues(result.Value.Indexes, null, result.GetRawResponse()); + }); /// /// Gets for the given index, including a document count and storage usage. diff --git a/sdk/search/Azure.Search.Documents/tests/SearchServiceClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchServiceClientTests.cs index 0e6e5bb20c40..21bb58da8a77 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchServiceClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchServiceClientTests.cs @@ -252,6 +252,38 @@ public async Task GetIndex() Assert.AreEqual(13, index.Fields.Count); } + [Test] + public async Task GetIndexes() + { + await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); + + SearchServiceClient client = resources.GetServiceClient(); + + bool found = false; + await foreach (SearchIndex index in client.GetIndexesAsync()) + { + found |= string.Equals(resources.IndexName, index.Name, StringComparison.InvariantCultureIgnoreCase); + } + + Assert.IsTrue(found, "Shared index not found"); + } + + [Test] + [AsyncOnly] + public async Task GetIndexesNextPageThrows() + { + await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); + + SearchServiceClient client = resources.GetServiceClient(); + AsyncPageable pageable = client.GetIndexesAsync(); + + string continuationToken = Recording.GenerateId(); + IAsyncEnumerator> e = pageable.AsPages(continuationToken).GetAsyncEnumerator(); + + // Given a continuationToken above, this actually starts with the second page. + Assert.ThrowsAsync(async () => await e.MoveNextAsync()); + } + [Test] public async Task CreateAzureBlobIndexer() { diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexes.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexes.json new file mode 100644 index 000000000000..8f988d4f40d0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexes.json @@ -0,0 +1,441 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-ypwrygpr.search.windows.net/indexes?$select=%2A\u0026api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "api-key": "Sanitized", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200422.1", + "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "e88bbfcc516ee73040fb1420e7a9ee12", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "6165", + "Content-Type": "application/json; odata.metadata=minimal; odata.streaming=true", + "Date": "Wed, 22 Apr 2020 23:17:51 GMT", + "elapsed-time": "152", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "e88bbfcc-516e-e730-40fb-1420e7a9ee12", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + }, + "ResponseBody": { + "@odata.context": "https://azs-net-ypwrygpr.search.windows.net/$metadata#indexes(*)", + "value": [ + { + "@odata.etag": "\u00220x8D7E71352C81C3C\u0022", + "name": "kmjauxxu", + "defaultScoringProfile": null, + "fields": [ + { + "name": "hotelId", + "type": "Edm.String", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": true, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "hotelName", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "description", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "en.lucene", + "synonymMaps": [] + }, + { + "name": "descriptionFr", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "fr.lucene", + "synonymMaps": [] + }, + { + "name": "category", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "tags", + "type": "Collection(Edm.String)", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "parkingIncluded", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "smokingAllowed", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "lastRenovationDate", + "type": "Edm.DateTimeOffset", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "rating", + "type": "Edm.Int32", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "location", + "type": "Edm.GeographyPoint", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "address", + "type": "Edm.ComplexType", + "fields": [ + { + "name": "streetAddress", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "city", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "stateProvince", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "country", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "postalCode", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + } + ] + }, + { + "name": "rooms", + "type": "Collection(Edm.ComplexType)", + "fields": [ + { + "name": "description", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "en.lucene", + "synonymMaps": [] + }, + { + "name": "descriptionFr", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "fr.lucene", + "synonymMaps": [] + }, + { + "name": "type", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "baseRate", + "type": "Edm.Double", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "bedOptions", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "sleepsCount", + "type": "Edm.Int32", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "smokingAllowed", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "tags", + "type": "Collection(Edm.String)", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + } + ] + } + ], + "scoringProfiles": [ + { + "name": "nearest", + "functionAggregation": "sum", + "text": null, + "functions": [ + { + "fieldName": "location", + "interpolation": "linear", + "type": "distance", + "boost": 2.0, + "freshness": null, + "magnitude": null, + "distance": { + "referencePointParameter": "myloc", + "boostingDistance": 100.0 + }, + "tag": null + } + ] + } + ], + "corsOptions": null, + "suggesters": [ + { + "name": "sg", + "searchMode": "analyzingInfixMatching", + "sourceFields": [ + "description", + "hotelName" + ] + } + ], + "analyzers": [], + "tokenizers": [], + "tokenFilters": [], + "charFilters": [], + "encryptionKey": null, + "similarity": null + } + ] + } + } + ], + "Variables": { + "CLIENT_ID": "f9ab11db-b032-44b3-af0a-44713541cc40", + "LOCATION": "westus2", + "RandomSeed": "230027432", + "RESOURCE_GROUP": "heaths-search", + "SearchIndexName": "kmjauxxu", + "SearchServiceName": "azs-net-ypwrygpr", + "SUBSCRIPTION_ID": "faa080af-c1d8-40ad-9cce-e1a450ca5b57", + "TENANT_ID": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesAsync.json new file mode 100644 index 000000000000..63e023f0f0db --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesAsync.json @@ -0,0 +1,436 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-ypwrygpr.search.windows.net/indexes?$select=%2A\u0026api-version=2019-05-06-Preview", + "RequestMethod": "GET", + "RequestHeaders": { + "api-key": "Sanitized", + "User-Agent": [ + "azsdk-net-Search.Documents/1.0.0-dev.20200422.1", + "(.NET Core 4.6.28619.01; Microsoft Windows 10.0.18363 )" + ], + "x-ms-client-request-id": "df603cdb3a3b95a3bc0ad41634fa28f0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "6165", + "Content-Type": "application/json; odata.metadata=minimal; odata.streaming=true", + "Date": "Wed, 22 Apr 2020 23:17:51 GMT", + "elapsed-time": "34", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "df603cdb-3a3b-95a3-bc0a-d41634fa28f0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains" + }, + "ResponseBody": { + "@odata.context": "https://azs-net-ypwrygpr.search.windows.net/$metadata#indexes(*)", + "value": [ + { + "@odata.etag": "\u00220x8D7E71352C81C3C\u0022", + "name": "kmjauxxu", + "defaultScoringProfile": null, + "fields": [ + { + "name": "hotelId", + "type": "Edm.String", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": true, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "hotelName", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "description", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "en.lucene", + "synonymMaps": [] + }, + { + "name": "descriptionFr", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "fr.lucene", + "synonymMaps": [] + }, + { + "name": "category", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "tags", + "type": "Collection(Edm.String)", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "parkingIncluded", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "smokingAllowed", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "lastRenovationDate", + "type": "Edm.DateTimeOffset", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "rating", + "type": "Edm.Int32", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "location", + "type": "Edm.GeographyPoint", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "address", + "type": "Edm.ComplexType", + "fields": [ + { + "name": "streetAddress", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "city", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "stateProvince", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "country", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "postalCode", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": true, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + } + ] + }, + { + "name": "rooms", + "type": "Collection(Edm.ComplexType)", + "fields": [ + { + "name": "description", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "en.lucene", + "synonymMaps": [] + }, + { + "name": "descriptionFr", + "type": "Edm.String", + "searchable": true, + "filterable": false, + "retrievable": true, + "sortable": false, + "facetable": false, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": "fr.lucene", + "synonymMaps": [] + }, + { + "name": "type", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "baseRate", + "type": "Edm.Double", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "bedOptions", + "type": "Edm.String", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "sleepsCount", + "type": "Edm.Int32", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "smokingAllowed", + "type": "Edm.Boolean", + "searchable": false, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + }, + { + "name": "tags", + "type": "Collection(Edm.String)", + "searchable": true, + "filterable": true, + "retrievable": true, + "sortable": false, + "facetable": true, + "key": false, + "indexAnalyzer": null, + "searchAnalyzer": null, + "analyzer": null, + "synonymMaps": [] + } + ] + } + ], + "scoringProfiles": [ + { + "name": "nearest", + "functionAggregation": "sum", + "text": null, + "functions": [ + { + "fieldName": "location", + "interpolation": "linear", + "type": "distance", + "boost": 2.0, + "freshness": null, + "magnitude": null, + "distance": { + "referencePointParameter": "myloc", + "boostingDistance": 100.0 + }, + "tag": null + } + ] + } + ], + "corsOptions": null, + "suggesters": [ + { + "name": "sg", + "searchMode": "analyzingInfixMatching", + "sourceFields": [ + "description", + "hotelName" + ] + } + ], + "analyzers": [], + "tokenizers": [], + "tokenFilters": [], + "charFilters": [], + "encryptionKey": null, + "similarity": null + } + ] + } + } + ], + "Variables": { + "RandomSeed": "347410179", + "SearchIndexName": "kmjauxxu", + "SearchServiceName": "azs-net-ypwrygpr" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesNextPageThrowsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesNextPageThrowsAsync.json new file mode 100644 index 000000000000..0154a6820c03 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchServiceClientTests/GetIndexesNextPageThrowsAsync.json @@ -0,0 +1,13 @@ +{ + "Entries": [], + "Variables": { + "CLIENT_ID": "f9ab11db-b032-44b3-af0a-44713541cc40", + "LOCATION": "westus2", + "RandomSeed": "1502897414", + "RESOURCE_GROUP": "heaths-search", + "SearchIndexName": "rnoiluqs", + "SearchServiceName": "azs-net-qbhattkf", + "SUBSCRIPTION_ID": "faa080af-c1d8-40ad-9cce-e1a450ca5b57", + "TENANT_ID": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } +} \ No newline at end of file