diff --git a/sdk/search/Azure.Search.Documents/src/Batching/Publisher.cs b/sdk/search/Azure.Search.Documents/src/Batching/Publisher.cs index 8f7e0fd794d2d..52267ec5f6d22 100644 --- a/sdk/search/Azure.Search.Documents/src/Batching/Publisher.cs +++ b/sdk/search/Azure.Search.Documents/src/Batching/Publisher.cs @@ -422,12 +422,14 @@ await SubmitBatchAsync( // Returns whether the batch is now full. bool FillBatchFromQueue(List> batch, Queue< PublisherAction> queue) { - // TODO: Consider tracking the keys in the batch and requiring - // them to be unique to avoid error alignment problems + HashSet documentIdentifiers = new HashSet(StringComparer.Ordinal); while (queue.Count > 0) { - if (batch.Count < BatchActionCount) + // Stop filling the batch if we run into an action for a document that is already in the batch. + // We want to keep the actions ordered and map any errors accurately to the documents, + // so we need to split the batch on encountering an action for a previously queued document. + if ((batch.Count < BatchActionCount) && documentIdentifiers.Add(queue.Peek().Key)) { batch.Add(queue.Dequeue()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs b/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs index e8966c6f9e73c..7ca17cbec6d1b 100644 --- a/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Batching/BatchingTests.cs @@ -1031,6 +1031,123 @@ public async Task Behavior_BatchSize() Assert.AreEqual(5, client.Submissions.Count); } + [Test] + public async Task Behavior_SplitBatchByDocumentKey() + { + int numberOfDocuments = 5; + + await using SearchResources resources = await SearchResources.CreateWithEmptyIndexAsync(this); + BatchingSearchClient client = GetBatchingSearchClient(resources); + + SimpleDocument[] data = new SimpleDocument[numberOfDocuments]; + for (int i = 0; i < numberOfDocuments; i++) + { + data[i] = new SimpleDocument() { Id = $"{i}", Name = $"Document #{i}" }; + } + + // 'SimpleDocument' has 'Id' set as its key field. + // Set the Ids of 2 documents in the group to be the same. + // We expect the batch to be split at this index, even though the size of the set is smaller than the batch size. + data[3].Id = data[0].Id; + + await using SearchIndexingBufferedSender indexer = + client.CreateIndexingBufferedSender( + new SearchIndexingBufferedSenderOptions() + { + // Set the expected batch action count to be larger than the number of documents in the set. + InitialBatchActionCount = numberOfDocuments + 1, + }); + + // Throw from every handler + int sent = 0, completed = 0; + indexer.ActionSent += e => + { + sent++; + + // Batch will be split at the 4th document. + // So, 3 documents will be sent before any are submitted, but 3 submissions will be made before the last 2 are sent + Assert.AreEqual((sent <= 3) ? 0 : 3, completed); + + throw new InvalidOperationException("ActionSentAsync: Should not be seen!"); + }; + + indexer.ActionCompleted += e => + { + completed++; + + // Batch will be split at the 4th document. + // So, 3 documents will be submitted after 3 are sent, and the last 2 submissions will be made after all 5 are sent + Assert.AreEqual((completed <= 3) ? 3 : 5, sent); + + throw new InvalidOperationException("ActionCompletedAsync: Should not be seen!"); + }; + + AssertNoFailures(indexer); + await indexer.UploadDocumentsAsync(data); + await indexer.FlushAsync(); + + Assert.AreEqual(5, sent); + Assert.AreEqual(5, completed); + } + + [Test] + public async Task Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferences() + { + int numberOfDocuments = 5; + + await using SearchResources resources = await SearchResources.CreateWithEmptyIndexAsync(this); + BatchingSearchClient client = GetBatchingSearchClient(resources); + + // 'SimpleDocument' has 'Id' set as its key field. + // Set the Ids of 2 documents in the group to differ only in case from another 2. + // We expect the batch to NOT be split because keys are case-sensitive and the publisher should consider them all unique. + SimpleDocument[] data = new SimpleDocument[] + { + new SimpleDocument() { Id = "a", Name = "Document a" }, + new SimpleDocument() { Id = "b", Name = "Document b" }, + new SimpleDocument() { Id = "c", Name = "Document c" }, + new SimpleDocument() { Id = "A", Name = "Document A" }, + new SimpleDocument() { Id = "B", Name = "Document B" }, + }; + + await using SearchIndexingBufferedSender indexer = + client.CreateIndexingBufferedSender( + new SearchIndexingBufferedSenderOptions() + { + // Make sure the expected batch action is larger than the number of documents in the set. + InitialBatchActionCount = numberOfDocuments + 1, + }); + + // Throw from every handler + int sent = 0, completed = 0; + indexer.ActionSent += e => + { + sent++; + + // Batch will not be split. So, no document will be submitted before all are sent. + Assert.AreEqual(0, completed); + + throw new InvalidOperationException("ActionSentAsync: Should not be seen!"); + }; + + indexer.ActionCompleted += e => + { + completed++; + + // Batch will not be split. So, all documents will be sent before any are submitted. + Assert.AreEqual(5, sent); + + throw new InvalidOperationException("ActionCompletedAsync: Should not be seen!"); + }; + + AssertNoFailures(indexer); + await indexer.UploadDocumentsAsync(data); + await indexer.FlushAsync(); + + Assert.AreEqual(5, sent); + Assert.AreEqual(5, completed); + } + [Test] [TestCase(409)] [TestCase(422)] diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKey.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKey.json new file mode 100644 index 0000000000000..ab73bfeaa7050 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKey.json @@ -0,0 +1,174 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027hrincacx\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "185", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d4be9db11864e8d6e1d0d66c397968d1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "0", + "Name": "Document #0" + }, + { + "@search.action": "upload", + "Id": "1", + "Name": "Document #1" + }, + { + "@search.action": "upload", + "Id": "2", + "Name": "Document #2" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "d4be9db1-1864-e8d6-e1d0-d66c397968d1", + "Content-Length": "200", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:44:28 GMT", + "elapsed-time": "144", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "d4be9db1-1864-e8d6-e1d0-d66c397968d1", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d4be9db1-1864-e8d6-e1d0-d66c397968d1" + }, + "ResponseBody": { + "value": [ + { + "key": "0", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027hrincacx\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "127", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "799e43a8ca4eba733a805d451724b2f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "0", + "Name": "Document #3" + }, + { + "@search.action": "upload", + "Id": "4", + "Name": "Document #4" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "799e43a8-ca4e-ba73-3a80-5d451724b2f5", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:44:28 GMT", + "elapsed-time": "44", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "799e43a8-ca4e-ba73-3a80-5d451724b2f5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "799e43a8-ca4e-ba73-3a80-5d451724b2f5" + }, + "ResponseBody": { + "value": [ + { + "key": "0", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "4", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027hrincacx\u0027)?api-version=2020-06-30", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-efc7cdf91216d94782770f05f4b7a079-1304099684540b45-00", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "307ac7aee0220e3a2c12cb8fca6fa0e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "307ac7ae-e022-0e3a-2c12-cb8fca6fa0e0", + "Date": "Fri, 05 Feb 2021 22:44:28 GMT", + "elapsed-time": "161", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "307ac7ae-e022-0e3a-2c12-cb8fca6fa0e0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "307ac7ae-e022-0e3a-2c12-cb8fca6fa0e0" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1504326134", + "SearchIndexName": "hrincacx", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-mohitsearch" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyAsync.json new file mode 100644 index 0000000000000..ecdcea7bba870 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyAsync.json @@ -0,0 +1,174 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027logumxsd\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "185", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "56273ea36ef0b1f89687ef32e22b75f2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "0", + "Name": "Document #0" + }, + { + "@search.action": "upload", + "Id": "1", + "Name": "Document #1" + }, + { + "@search.action": "upload", + "Id": "2", + "Name": "Document #2" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "56273ea3-6ef0-b1f8-9687-ef32e22b75f2", + "Content-Length": "200", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:45:48 GMT", + "elapsed-time": "149", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "56273ea3-6ef0-b1f8-9687-ef32e22b75f2", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "56273ea3-6ef0-b1f8-9687-ef32e22b75f2" + }, + "ResponseBody": { + "value": [ + { + "key": "0", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "1", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "2", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027logumxsd\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "127", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "b7e8bda3875e4dee76d92fdfbca385b9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "0", + "Name": "Document #3" + }, + { + "@search.action": "upload", + "Id": "4", + "Name": "Document #4" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "b7e8bda3-875e-4dee-76d9-2fdfbca385b9", + "Content-Length": "137", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:45:48 GMT", + "elapsed-time": "35", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "b7e8bda3-875e-4dee-76d9-2fdfbca385b9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "b7e8bda3-875e-4dee-76d9-2fdfbca385b9" + }, + "ResponseBody": { + "value": [ + { + "key": "0", + "status": true, + "errorMessage": null, + "statusCode": 200 + }, + { + "key": "4", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027logumxsd\u0027)?api-version=2020-06-30", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-4c1da991c4643f4f8316eb88c41b240f-1643328e658eb44f-00", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d5b516f99c255fbed8b014a2a28a33d0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "d5b516f9-9c25-5fbe-d8b0-14a2a28a33d0", + "Date": "Fri, 05 Feb 2021 22:45:48 GMT", + "elapsed-time": "159", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "d5b516f9-9c25-5fbe-d8b0-14a2a28a33d0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d5b516f9-9c25-5fbe-d8b0-14a2a28a33d0" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1438815808", + "SearchIndexName": "logumxsd", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-mohitsearch" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferences.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferences.json new file mode 100644 index 0000000000000..bbe8012f460ac --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferences.json @@ -0,0 +1,134 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027tvaeqdfl\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "296", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "fe249da6c3cdf22c3c6fd9e36c76447d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "a", + "Name": "Document a" + }, + { + "@search.action": "upload", + "Id": "b", + "Name": "Document b" + }, + { + "@search.action": "upload", + "Id": "c", + "Name": "Document c" + }, + { + "@search.action": "upload", + "Id": "A", + "Name": "Document A" + }, + { + "@search.action": "upload", + "Id": "B", + "Name": "Document B" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "fe249da6-c3cd-f22c-3c6f-d9e36c76447d", + "Content-Length": "326", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:44:51 GMT", + "elapsed-time": "136", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "fe249da6-c3cd-f22c-3c6f-d9e36c76447d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "fe249da6-c3cd-f22c-3c6f-d9e36c76447d" + }, + "ResponseBody": { + "value": [ + { + "key": "a", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "b", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "c", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "A", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "B", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027tvaeqdfl\u0027)?api-version=2020-06-30", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-ff6276b7ce31e14289ea34074d9bed8f-6296353d0a9b7a44-00", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "d021c9ed43f0373c91ab9cfc82caea9e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "d021c9ed-43f0-373c-91ab-9cfc82caea9e", + "Date": "Fri, 05 Feb 2021 22:44:51 GMT", + "elapsed-time": "160", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "d021c9ed-43f0-373c-91ab-9cfc82caea9e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "d021c9ed-43f0-373c-91ab-9cfc82caea9e" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "2144378735", + "SearchIndexName": "tvaeqdfl", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-mohitsearch" + } +} \ No newline at end of file diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferencesAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferencesAsync.json new file mode 100644 index 0000000000000..b5b9e7bc78d52 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/BatchingTests/Behavior_SplitBatchByDocumentKeyIgnoreCaseDifferencesAsync.json @@ -0,0 +1,134 @@ +{ + "Entries": [ + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027wdhwmfxg\u0027)/docs/search.index?api-version=2020-06-30", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=none", + "api-key": "Sanitized", + "Content-Length": "296", + "Content-Type": "application/json", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "065b126c86d7642d03ca017259712b85", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "value": [ + { + "@search.action": "upload", + "Id": "a", + "Name": "Document a" + }, + { + "@search.action": "upload", + "Id": "b", + "Name": "Document b" + }, + { + "@search.action": "upload", + "Id": "c", + "Name": "Document c" + }, + { + "@search.action": "upload", + "Id": "A", + "Name": "Document A" + }, + { + "@search.action": "upload", + "Id": "B", + "Name": "Document B" + } + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "065b126c-86d7-642d-03ca-017259712b85", + "Content-Length": "326", + "Content-Type": "application/json; odata.metadata=none", + "Date": "Fri, 05 Feb 2021 22:46:11 GMT", + "elapsed-time": "157", + "Expires": "-1", + "OData-Version": "4.0", + "Pragma": "no-cache", + "Preference-Applied": "odata.include-annotations=\u0022*\u0022", + "request-id": "065b126c-86d7-642d-03ca-017259712b85", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "065b126c-86d7-642d-03ca-017259712b85" + }, + "ResponseBody": { + "value": [ + { + "key": "a", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "b", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "c", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "A", + "status": true, + "errorMessage": null, + "statusCode": 201 + }, + { + "key": "B", + "status": true, + "errorMessage": null, + "statusCode": 201 + } + ] + } + }, + { + "RequestUri": "https://azs-net-mohitsearch.search.windows.net/indexes(\u0027wdhwmfxg\u0027)?api-version=2020-06-30", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json; odata.metadata=minimal", + "api-key": "Sanitized", + "traceparent": "00-c98e5c15d7dc4d4ca855ddbae4d3d97c-d273ade3062b944e-00", + "User-Agent": [ + "azsdk-net-Search.Documents/11.2.0-alpha.20210205.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )" + ], + "x-ms-client-request-id": "25c89562ca5ac0e402c746bc8264ffa9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "client-request-id": "25c89562-ca5a-c0e4-02c7-46bc8264ffa9", + "Date": "Fri, 05 Feb 2021 22:46:11 GMT", + "elapsed-time": "126", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "25c89562-ca5a-c0e4-02c7-46bc8264ffa9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "x-ms-client-request-id": "25c89562-ca5a-c0e4-02c7-46bc8264ffa9" + }, + "ResponseBody": [] + } + ], + "Variables": { + "RandomSeed": "1854075059", + "SearchIndexName": "wdhwmfxg", + "SEARCH_ADMIN_API_KEY": "Sanitized", + "SEARCH_SERVICE_NAME": "azs-net-mohitsearch" + } +} \ No newline at end of file