diff --git a/sdk/search/ci.yml b/sdk/search/ci.yml index 96466526e9a2..fae333597373 100644 --- a/sdk/search/ci.yml +++ b/sdk/search/ci.yml @@ -23,8 +23,7 @@ pr: extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: - ServiceDirectory: search - TestProxy: true + ServiceDirectory: search Artifacts: - name: azure-search-documents safeName: azuresearchdocuments diff --git a/sdk/search/search-documents/karma.conf.js b/sdk/search/search-documents/karma.conf.js index e2d80a1d94dc..554afd8cac83 100644 --- a/sdk/search/search-documents/karma.conf.js +++ b/sdk/search/search-documents/karma.conf.js @@ -1,10 +1,12 @@ // https://github.com/karma-runner/karma-chrome-launcher process.env.CHROME_BIN = require("puppeteer").executablePath(); require("dotenv").config(); -const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); - -process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); - +const { + jsonRecordingFilterFunction, + isPlaybackMode, + isSoftRecordMode, + isRecordMode, +} = require("@azure-tools/test-recorder"); module.exports = function (config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) @@ -25,13 +27,15 @@ module.exports = function (config) { "karma-coverage", "karma-sourcemap-loader", "karma-junit-reporter", + "karma-json-to-file-reporter", + "karma-json-preprocessor", ], // list of files / patterns to load in the browser files: [ "dist-test/index.browser.js", { pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true }, - ], + ].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []), // list of files / patterns to exclude exclude: [], @@ -40,6 +44,7 @@ module.exports = function (config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["sourcemap", "env"], + "recordings/browsers/**/*.json": ["json"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable "dist-test/index.js": ["coverage"], @@ -48,18 +53,12 @@ module.exports = function (config) { // inject following environment values into browser testing with window.__env__ // environment values MUST be exported or set with same console running "karma start" // https://www.npmjs.com/package/karma-env-preprocessor - envPreprocessor: [ - "TEST_MODE", - "ENDPOINT", - "SEARCH_API_ADMIN_KEY", - "SEARCH_API_ADMIN_KEY_ALT", - "RECORDINGS_RELATIVE_PATH", - ], + envPreprocessor: ["TEST_MODE", "ENDPOINT", "SEARCH_API_ADMIN_KEY", "SEARCH_API_ADMIN_KEY_ALT"], // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ["mocha", "coverage", "junit"], + reporters: ["mocha", "coverage", "junit", "json-to-file"], coverageReporter: { // specify a common output directory @@ -82,6 +81,11 @@ module.exports = function (config) { properties: {}, // key value pair of properties to add to the section of the report }, + jsonToFileReporter: { + filter: jsonRecordingFilterFunction, + outputPath: ".", + }, + // web server port port: 9876, @@ -112,6 +116,10 @@ module.exports = function (config) { browserDisconnectTimeout: 10000, browserDisconnectTolerance: 3, + browserConsoleLogOptions: { + terminal: !isRecordMode(), + }, + client: { mocha: { // change Karma's debug.html to the mocha web reporter diff --git a/sdk/search/search-documents/package.json b/sdk/search/search-documents/package.json index 05cc8d4fb4f9..6e71d203e9f9 100644 --- a/sdk/search/search-documents/package.json +++ b/sdk/search/search-documents/package.json @@ -18,8 +18,8 @@ "clean": "rimraf dist dist-* temp types *.tgz *.log", "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", - "integration-test:browser": "dev-tool run test:browser", - "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'", + "integration-test:browser": "karma start --single-run", + "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace dist-esm/**/*.spec.js --harmony", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts", @@ -27,8 +27,8 @@ "test:browser": "npm run build:test && npm run unit-test:browser", "test:node": "npm run build:test && npm run unit-test:node", "test": "npm run build:test && npm run unit-test", - "unit-test:browser": "dev-tool run test:browser", - "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 \"test/**/*.spec.ts\" \"test/**/**/*.spec.ts\"", + "unit-test:browser": "karma start --single-run", + "unit-test:node": "mocha -r esm --require ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace \"test/{,!(browser)/**/}*.spec.ts\"", "unit-test": "npm run unit-test:node && npm run unit-test:browser" }, "files": [ @@ -87,7 +87,7 @@ "@azure/test-utils": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-recorder": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.js new file mode 100644 index 000000000000..ae43c135c4f1 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "e6e51af42f80c313fa0afd316079a755"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.autocomplete`, {"search":"sec","suggesterName":"sg"}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc519bbf6b3f7af451934febbcfd68f4d12f5ae7f5f5cb72ddbc09bef825dfff25ff0f9aa508c636000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '18af2b56-b25e-4e9e-bd8f-acd4061f6f00', + 'elapsed-time', + '19', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:38:38 GMT', + 'Content-Length', + '164' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.json deleted file mode 100644 index 84fc85fb1469..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_the_correct_autocomplete_result.json +++ /dev/null @@ -1,1230 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "158b89b6-c313-4420-b7a6-c4a6bad6b56f" - }, - "RequestBody": { - "name": "hotel-live-test87714", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:20:12 GMT", - "elapsed-time": "668", - "ETag": "W/\u00220x8D9E2A3F82071DA\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "158b89b6-c313-4420-b7a6-c4a6bad6b56f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A3F82071DA\u0022", - "name": "hotel-live-test87714", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ed9dc883-9b96-418b-a439-408f7343314e" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:16 GMT", - "elapsed-time": "189", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ed9dc883-9b96-418b-a439-408f7343314e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "983d3e69-8766-4884-a0ee-b80ca0f58543" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:16 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "983d3e69-8766-4884-a0ee-b80ca0f58543", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "98f245f0-93fa-460d-8a73-d5c1dbad5c51" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:19 GMT", - "elapsed-time": "11", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "98f245f0-93fa-460d-8a73-d5c1dbad5c51", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)/docs/search.post.autocomplete?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "37", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "47287e24-74d3-4611-89a5-2a375c6caa10" - }, - "RequestBody": { - "search": "sec", - "suggesterName": "sg" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "54", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:24 GMT", - "elapsed-time": "34", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "47287e24-74d3-4611-89a5-2a375c6caa10", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "text": "secret", - "queryPlusText": "secret" - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87714\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f59f3922-04fd-48b6-a610-9c78474f3489" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:20:24 GMT", - "elapsed-time": "175", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "f59f3922-04fd-48b6-a610-9c78474f3489", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test87714" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.js new file mode 100644 index 000000000000..6a56fb015588 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "24d5222a36c4b91ba2f86374fb2fb30a"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.autocomplete`, {"search":"garbxyz","suggesterName":"sg"}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff92ff0742ea40440c000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '89237a00-faa9-4bfe-b35f-be0c4773b63c', + 'elapsed-time', + '18', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:38:56 GMT', + 'Content-Length', + '133' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.json deleted file mode 100644 index fa683f7a9988..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_autocomplete_returns_zero_results_for_invalid_query.json +++ /dev/null @@ -1,1225 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "424a6049-9a96-4331-bb91-9addec7629e5" - }, - "RequestBody": { - "name": "hotel-live-test58664", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:20:29 GMT", - "elapsed-time": "630", - "ETag": "W/\u00220x8D9E2A40258E2F6\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "424a6049-9a96-4331-bb91-9addec7629e5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A40258E2F6\u0022", - "name": "hotel-live-test58664", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "256f2243-07d0-4874-8e45-70f86ba22f40" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:33 GMT", - "elapsed-time": "159", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "256f2243-07d0-4874-8e45-70f86ba22f40", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6da5b72f-195e-480b-b3f3-9d2fce7f098a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:33 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6da5b72f-195e-480b-b3f3-9d2fce7f098a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ad4c896d-6215-4309-b3c4-1af98fdd887a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:37 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ad4c896d-6215-4309-b3c4-1af98fdd887a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)/docs/search.post.autocomplete?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "41", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b89487e6-1631-4774-a119-debaf740ab24" - }, - "RequestBody": { - "search": "garbxyz", - "suggesterName": "sg" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "12", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:41 GMT", - "elapsed-time": "17", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "b89487e6-1631-4774-a119-debaf740ab24", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58664\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "845c2fb5-aa83-4229-adb1-dac8255f529c" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:20:41 GMT", - "elapsed-time": "200", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "845c2fb5-aa83-4229-adb1-dac8255f529c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test58664" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.js new file mode 100644 index 000000000000..d550d356c45e --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "c17602420e23796fc9bb03ed67cbb7a3"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71fdcddf97f00bbe0538805000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '7bd013e4-9a35-4913-91c6-b04e08fde020', + 'elapsed-time', + '8', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:38:21 GMT', + 'Content-Length', + '127' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.json deleted file mode 100644 index 1d7ca7fc0488..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_count_returns_the_correct_document_count.json +++ /dev/null @@ -1,1218 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3354", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4518324b-e524-4228-b0db-c3125b5c7e5d" - }, - "RequestBody": { - "name": "hotel-live-test109686", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6725", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:19:54 GMT", - "elapsed-time": "838", - "ETag": "W/\u00220x8D9E2A3EDDFC49A\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4518324b-e524-4228-b0db-c3125b5c7e5d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A3EDDFC49A\u0022", - "name": "hotel-live-test109686", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7a68f9af-6e37-4cd2-b252-b79d90b99e4f" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:19:59 GMT", - "elapsed-time": "174", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7a68f9af-6e37-4cd2-b252-b79d90b99e4f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "519fc7eb-c253-43f1-ae64-7820bf8000f6" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:19:59 GMT", - "elapsed-time": "14", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "519fc7eb-c253-43f1-ae64-7820bf8000f6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7c85b437-385a-4519-b015-b7ca88f4808e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:03 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7c85b437-385a-4519-b015-b7ca88f4808e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e5b45908-1213-479a-9013-f59921aac8c7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:07 GMT", - "elapsed-time": "14", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e5b45908-1213-479a-9013-f59921aac8c7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test109686\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "86d36e02-f821-4162-9dce-43b0a06e2b61" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:20:07 GMT", - "elapsed-time": "181", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "86d36e02-f821-4162-9dce-43b0a06e2b61", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test109686" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.js new file mode 100644 index 000000000000..38b9871be533 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.js @@ -0,0 +1,101 @@ +let nock = require('nock'); + +module.exports.hash = "e6a92c9ca9a4dc9496a78a94e90281d6"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('8')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3e3af868247fbdc816f9478f96ebb21c7d34cb9b695dacdaa25a52936f674dda548b3cadab6c962eaba2c9d36c394b8b265de6efdab4add2769ea797797d9daeaab298e669d36678799c3ec9da795d558b269dd3bb8baacecb745a51d36279d18ca96fafab6735757656a6d76996ced6e9a45e176d3acbd332a39ed76d9ee66d4a5db7f4c7659efebeeb9d9d7c279de2e7f97e8b1ff9436daedde32f41689c3ecf69105959d20ffa749215cb34bbcc8a7c892e9ab4ce2f1942d6e60bfa8c1b11b6055e009a53fae2a2aaaf0d85daeca2f9e8d1f7be3ffa6895d56f693067cb69b99ee5445269d02c2a7c7c5c96d595fbb4cc9af655beac2e19bfa704d47c53d327cb0bf357595187d4c2fc9dcd6675de508ff2275314ddff92ff07355dccd3cb010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'f89960d2-2ba8-413a-8c8d-def2e9f8c362', + 'elapsed-time', + '9', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:40:57 GMT', + 'Content-Length', + '411' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"delete","hotelId":"8","hotelName":null,"description":"Has some road noise and is next to the very police station. Bathrooms had morel coverings.","descriptionFr":"Il y a du bruit de la route et se trouve à côté de la station de police. Les salles de bain avaient des revêtements de morilles.","category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f1d7c34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab85c97a5697152cde893bd9d9d5ff2fd5ff2ff0038a311724a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'b5eacc2d-62db-409d-bc63-15e1b0cb6a01', + 'elapsed-time', + '29', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:40:57 GMT', + 'Content-Length', + '184' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71f7cf8ff00fca50b5a04000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'e5c8e072-740d-4f90-a51e-11f9c235d2e8', + 'elapsed-time', + '7', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:01 GMT', + 'Content-Length', + '126' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.json deleted file mode 100644 index c36bf572f439..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_documents.json +++ /dev/null @@ -1,1322 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "284465ea-c6b2-4f08-8fcd-7b154a46917b" - }, - "RequestBody": { - "name": "hotel-live-test72713", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:22:28 GMT", - "elapsed-time": "729", - "ETag": "W/\u00220x8D9E2A44A06E6DD\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "284465ea-c6b2-4f08-8fcd-7b154a46917b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A44A06E6DD\u0022", - "name": "hotel-live-test72713", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e7966764-1026-47cf-b2cf-b45eded56d4d" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:33 GMT", - "elapsed-time": "212", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e7966764-1026-47cf-b2cf-b45eded56d4d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f8efbb10-93d6-4f9b-97df-2528237a19cc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:33 GMT", - "elapsed-time": "10", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f8efbb10-93d6-4f9b-97df-2528237a19cc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "07a28ff4-0186-4133-82c2-8abd138cdf6e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:37 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "07a28ff4-0186-4133-82c2-8abd138cdf6e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "efe9d329-c819-427e-95e2-0fd405d794ca" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "459", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:41 GMT", - "elapsed-time": "19", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "efe9d329-c819-427e-95e2-0fd405d794ca", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "481", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "870f6b57-90a7-4ac3-b9bb-bb9f9bd558bd" - }, - "RequestBody": { - "value": [ - { - "@search.action": "delete", - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "74", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:41 GMT", - "elapsed-time": "29", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "870f6b57-90a7-4ac3-b9bb-bb9f9bd558bd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a7f6d86c-f0a7-4ab3-996e-882745fc5e0c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:45 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a7f6d86c-f0a7-4ab3-996e-882745fc5e0c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF9" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test72713\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ff2da300-a27f-4406-b8d7-2a04246e82c9" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:22:45 GMT", - "elapsed-time": "213", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "ff2da300-a27f-4406-b8d7-2a04246e82c9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test72713" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.js new file mode 100644 index 000000000000..82e493f4724b --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "b2a93b2af0de470c1b36ed1f0168d72d"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"delete","hotelId":"9"},{"@search.action":"delete","hotelId":"10"}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f3dfc68f451d366edbaf9e8515baff3d147795d57f51779d36417d470b92e4bd3e2a49ad1277b3b3bbf64645edfddf95aef7fff97fc3fafab5d608a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '15503ff6-b214-4a53-847d-66dbd41c5610', + 'elapsed-time', + '36', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:18 GMT', + 'Content-Length', + '191' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71f3cf87f006a950c2d04000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '8b17f2ea-614f-4354-b6c8-f63ee466c36d', + 'elapsed-time', + '5', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:22 GMT', + 'Content-Length', + '126' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.json deleted file mode 100644 index ba3454f4885a..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_deletedocuments_delete_a_document_by_keykeynames.json +++ /dev/null @@ -1,1276 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3354", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "32c33b86-bb8f-428c-b8c1-47c8029bef56" - }, - "RequestBody": { - "name": "hotel-live-test104859", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6725", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:22:50 GMT", - "elapsed-time": "691", - "ETag": "W/\u00220x8D9E2A456B5C75D\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "32c33b86-bb8f-428c-b8c1-47c8029bef56", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A456B5C75D\u0022", - "name": "hotel-live-test104859", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "5569b31b-53c7-41b5-9042-7a55a1f9bbee" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:54 GMT", - "elapsed-time": "152", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "5569b31b-53c7-41b5-9042-7a55a1f9bbee", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "48647f95-83b0-480b-9d9e-51301e512520" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:54 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "48647f95-83b0-480b-9d9e-51301e512520", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fba140b1-3fe7-499b-9653-b632d5e9e507" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:58 GMT", - "elapsed-time": "12", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fba140b1-3fe7-499b-9653-b632d5e9e507", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "96", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2f384e8e-5469-4b1c-8422-abcb6d32d2ee" - }, - "RequestBody": { - "value": [ - { - "@search.action": "delete", - "hotelId": "9" - }, - { - "@search.action": "delete", - "hotelId": "10" - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "138", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:02 GMT", - "elapsed-time": "40", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "2f384e8e-5469-4b1c-8422-abcb6d32d2ee", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 200 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "0c33729f-9345-4b9c-8ecd-51cefe8e0934" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:06 GMT", - "elapsed-time": "9", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "0c33729f-9345-4b9c-8ecd-51cefe8e0934", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF8" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104859\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "40037da3-a996-44c2-aea4-f2e9a100c43e" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:23:06 GMT", - "elapsed-time": "182", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "40037da3-a996-44c2-aea4-f2e9a100c43e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test104859" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.js new file mode 100644 index 000000000000..3164aec0237f --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "0d0464f02ba0f535ca2bbc2510a50ee2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('8')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3e3af868247fbdc816f9478f96ebb21c7d34cb9b695dacdaa25a52936f674dda548b3cadab6c962eaba2c9d36c394b8b265de6efdab4add2769ea797797d9daeaab298e669d36678799c3ec9da795d558b269dd3bb8baacecb745a51d36279d18ca96fafab6735757656a6d76996ced6e9a45e176d3acbd332a39ed76d9ee66d4a5db7f4c7659efebeeb9d9d7c279de2e7f97e8b1ff9436daedde32f41689c3ecf69105959d20ffa749215cb34bbcc8a7c892e9ab4ce2f1942d6e60bfa8c1b11b6055e009a53fae2a2aaaf0d85daeca2f9e8d1f7be3ffa6895d56f693067cb69b99ee5445269d02c2a7c7c5c96d595fbb4cc9af655beac2e19bfa704d47c53d327cb0bf357595187d4c2fc9dcd6675de508ff2275314ddff92ff07355dccd3cb010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '299d7826-e4d5-404e-8861-b684065dbc1d', + 'elapsed-time', + '11', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:40:22 GMT', + 'Content-Length', + '411' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.json deleted file mode 100644 index f7f6c527da3b..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_returns_the_correct_document_result.json +++ /dev/null @@ -1,1232 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3c82b2ca-a55f-45ed-b7bc-30306a70bf14" - }, - "RequestBody": { - "name": "hotel-live-test43801", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:21:55 GMT", - "elapsed-time": "729", - "ETag": "W/\u00220x8D9E2A435A962B8\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3c82b2ca-a55f-45ed-b7bc-30306a70bf14", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A435A962B8\u0022", - "name": "hotel-live-test43801", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "8f0df86a-7a7d-4331-aa8b-b36c4e173c09" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:59 GMT", - "elapsed-time": "150", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "8f0df86a-7a7d-4331-aa8b-b36c4e173c09", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "8637b396-0687-42ce-80e7-07cc8ed9c291" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:59 GMT", - "elapsed-time": "11", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "8637b396-0687-42ce-80e7-07cc8ed9c291", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "1eb8655f-44ab-44e7-9d07-9430c043544b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:03 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "1eb8655f-44ab-44e7-9d07-9430c043544b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7aaa72b5-9ecb-4880-b8a1-f6d186eeb6e0" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "459", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:07 GMT", - "elapsed-time": "22", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7aaa72b5-9ecb-4880-b8a1-f6d186eeb6e0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "8", - "hotelName": null, - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test43801\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2d99b08c-9825-47b1-8dd1-d8d48c520c6d" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:22:07 GMT", - "elapsed-time": "165", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "2d99b08c-9825-47b1-8dd1-d8d48c520c6d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test43801" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.js new file mode 100644 index 000000000000..949453fa71c6 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.js @@ -0,0 +1,27 @@ +let nock = require('nock'); + +module.exports.hash = "304fc79e14e53d4f8d6e5ff9bf9d1357"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('garbxyz')`) + .query(true) + .reply(404, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'request-id', + '210e152b-dd11-479a-b643-e9f31ad1f6dc', + 'elapsed-time', + '6', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:40:39 GMT', + 'Content-Length', + '0' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.json deleted file mode 100644 index b324b8fff14c..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_getdocument_throws_error_for_invalid_getdocument_value.json +++ /dev/null @@ -1,1213 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b05d40e7-d22c-4c2e-a036-eea818ee0218" - }, - "RequestBody": { - "name": "hotel-live-test76446", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:22:12 GMT", - "elapsed-time": "599", - "ETag": "W/\u00220x8D9E2A43FD02332\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "b05d40e7-d22c-4c2e-a036-eea818ee0218", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A43FD02332\u0022", - "name": "hotel-live-test76446", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "5d0cd994-2de0-4654-92a9-f57898e8faaf" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:22:16 GMT", - "elapsed-time": "157", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "5d0cd994-2de0-4654-92a9-f57898e8faaf", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "df289e43-eb57-4158-b3f3-53d0f4b9beca" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:16 GMT", - "elapsed-time": "5", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df289e43-eb57-4158-b3f3-53d0f4b9beca", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "1f360fcb-58ea-4fc3-a7de-3c12c62eb814" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:22:20 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "1f360fcb-58ea-4fc3-a7de-3c12c62eb814", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)/docs(\u0027garbxyz\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "093a7277-fa7f-447c-a143-657a261369d2" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Fri, 28 Jan 2022 21:22:24 GMT", - "elapsed-time": "15", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "093a7277-fa7f-447c-a143-657a261369d2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76446\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fd9f2dac-382e-4537-9700-258ec1b23c17" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:22:24 GMT", - "elapsed-time": "171", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "fd9f2dac-382e-4537-9700-258ec1b23c17", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test76446" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.js new file mode 100644 index 000000000000..97c0d8c430c7 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "38fbeabbfdc18faf4809698fb0e96a48"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"delete","hotelId":"9"},{"@search.action":"delete","hotelId":"10"}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f3dfc68f451d366edbaf9e8515baff3d147795d57f51779d36417d470b92e4bd3e2a49ad1277b3b3bbf64645edfddf95aef7fff97fc3fafab5d608a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'da9a60bd-1be3-4268-817a-fec3f3fe8fee', + 'elapsed-time', + '30', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:26 GMT', + 'Content-Length', + '191' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71f3cf87f006a950c2d04000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '3d07e702-1095-45bc-98bc-ce9a4874eac0', + 'elapsed-time', + '6', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:30 GMT', + 'Content-Length', + '126' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.json deleted file mode 100644 index 5654802c5dba..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_deletes_existing_documents.json +++ /dev/null @@ -1,1276 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "318052d4-0dd5-438a-986e-9f5c7ce764f0" - }, - "RequestBody": { - "name": "hotel-live-test93433", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:24:57 GMT", - "elapsed-time": "612", - "ETag": "W/\u00220x8D9E2A4A28D291E\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "318052d4-0dd5-438a-986e-9f5c7ce764f0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4A28D291E\u0022", - "name": "hotel-live-test93433", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "8a3b6e9e-d9f3-4639-8d13-bf1c5db68d0c" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:02 GMT", - "elapsed-time": "176", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "8a3b6e9e-d9f3-4639-8d13-bf1c5db68d0c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "43563888-ac58-4f9d-bf5a-a5c8d7c5edfc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:02 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "43563888-ac58-4f9d-bf5a-a5c8d7c5edfc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6d507233-5cd2-4e35-8425-b2c2bfc75f84" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:05 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6d507233-5cd2-4e35-8425-b2c2bfc75f84", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "96", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7a66c461-e55e-48fb-b412-cadab857e201" - }, - "RequestBody": { - "value": [ - { - "@search.action": "delete", - "hotelId": "9" - }, - { - "@search.action": "delete", - "hotelId": "10" - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "138", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:10 GMT", - "elapsed-time": "36", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7a66c461-e55e-48fb-b412-cadab857e201", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 200 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b5017403-1278-4373-900d-49f6f2bc6ab6" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:14 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "b5017403-1278-4373-900d-49f6f2bc6ab6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF8" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test93433\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4b0c7b34-e4dd-4f32-b15a-96bf96b88868" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:25:14 GMT", - "elapsed-time": "244", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "4b0c7b34-e4dd-4f32-b15a-96bf96b88868", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test93433" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.js new file mode 100644 index 000000000000..e0a895e4a988 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "e6e20817a1db5a320d0e6f875a42c167"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"merge","hotelId":"8","description":"Modified Description"}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f1d7c34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab85c97a5697152cde893bd9d9d5ff2fd5ff2ff0038a311724a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '1083a1c9-9f53-44a5-b8e0-7c4643e50647', + 'elapsed-time', + '36', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:47 GMT', + 'Content-Length', + '184' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('8')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3e3af868247fbdc816f9478f96ebb21c7d34cb9b695dacdaa25a52932faa59715ee4b3f4a9f771d0e8594dcdcecaf43acdd2d93a9dd4eba24d67795a66695daddb3ccddbb4c9d396feb8ccd3df77bdb393efa453fc3cdf6ff1237fa8cd9b360340fcb5aaca629a8fd3e77993365959d20ffa749215cb34bbcc8a7c892e9ab4ce2f1942d6e60bfa8c1b2daabac00b6342734a5f5c54f5b5195b9b5d341f3dfadef7471fadb2fa6db1bc385b4ecbf52c276248836651e1e3e3b2acaedca765d6b4aff26575c9f83d25a0e69b9a3e595e98bfca8a3aa416e6ef6c36abf3867a943febaa5ad01fdffbfe2ff97f0015ab79db85010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'd0d2ee22-c801-4e48-8b1a-1e4f88e72d86', + 'elapsed-time', + '10', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:51 GMT', + 'Content-Length', + '364' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.json deleted file mode 100644 index c07766a4c404..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_merges_an_existing_document.json +++ /dev/null @@ -1,1281 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "0ff29955-8ccf-4138-8ef5-03b0b04d0304" - }, - "RequestBody": { - "name": "hotel-live-test87189", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:25:19 GMT", - "elapsed-time": "664", - "ETag": "W/\u00220x8D9E2A4AF322007\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "0ff29955-8ccf-4138-8ef5-03b0b04d0304", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4AF322007\u0022", - "name": "hotel-live-test87189", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "98d6c1e0-95ee-4bab-b599-578a62769263" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:23 GMT", - "elapsed-time": "261", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "98d6c1e0-95ee-4bab-b599-578a62769263", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "de697648-549b-4f92-99e9-1e82a26dc3bb" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:23 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de697648-549b-4f92-99e9-1e82a26dc3bb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fc28dcf4-c194-4fb9-9b99-99d349a74217" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:27 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fc28dcf4-c194-4fb9-9b99-99d349a74217", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "89", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "799db9f3-7bb3-47fe-8d5a-1a5dad4e0abb" - }, - "RequestBody": { - "value": [ - { - "@search.action": "merge", - "hotelId": "8", - "description": "Modified Description" - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "74", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:31 GMT", - "elapsed-time": "28", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "799db9f3-7bb3-47fe-8d5a-1a5dad4e0abb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a157ecb8-9b49-4bce-b3b1-6f8dab864203" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "389", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:35 GMT", - "elapsed-time": "12", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a157ecb8-9b49-4bce-b3b1-6f8dab864203", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "8", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test87189\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "93e0321f-b495-4c4e-8c5d-4835b94a36e3" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:25:35 GMT", - "elapsed-time": "179", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "93e0321f-b495-4c4e-8c5d-4835b94a36e3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test87189" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.js new file mode 100644 index 000000000000..eb90def00adc --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.js @@ -0,0 +1,101 @@ +let nock = require('nock'); + +module.exports.hash = "e86b72b972365694cbfb2a0fdf479744"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"mergeOrUpload","hotelId":"8","description":"Modified Description"},{"@search.action":"mergeOrUpload","hotelId":"11","description":"New Hotel Description","lastRenovationDate":null}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f1d7c34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab85c97a5697152cde893bd9d9d5f3232afefee7e8df7777fc9f77fc9ff03dc317a548a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '370065a6-f113-49de-97e5-040424793292', + 'elapsed-time', + '45', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:08 GMT', + 'Content-Length', + '194' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('8')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3e3af868247fbdc816f9478f96ebb21c7d34cb9b695dacdaa25a52932faa59715ee4b3f4a9f771d0e8594dcdcecaf43acdd2d93a9dd4eba24d67795a66695daddb3ccddbb4c9d396feb8ccd3df77bdb393efa453fc3cdf6ff1237fa8cd9b360340fcb5aaca629a8fd3e77993365959d20ffa749215cb34bbcc8a7c892e9ab4ce2f1942d6e60bfa8c1b2daabac00b6342734a5f5c54f5b5195b9b5d341f3dfadef7471fadb2fa6db1bc385b4ecbf52c276248836651e1e3e3b2acaedca765d6b4aff26575c9f83d25a0e69b9a3e595e98bfca8a3aa416e6ef6c36abf3867a943febaa5ad01fdffbfe2ff97f0015ab79db85010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'c3fdce1a-e509-436b-be1c-3ce023dfb230', + 'elapsed-time', + '9', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:12 GMT', + 'Content-Length', + '364' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71fdcddfd7f002dd054ff05000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '233109be-d3d2-48e0-aeac-38d000fdb903', + 'elapsed-time', + '4', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:12 GMT', + 'Content-Length', + '127' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.json deleted file mode 100644 index ce2909ed4ab9..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_mergeupload_documents.json +++ /dev/null @@ -1,1323 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "681bdac2-7483-4fac-9d94-aac0adcb8d23" - }, - "RequestBody": { - "name": "hotel-live-test16362", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:25:40 GMT", - "elapsed-time": "1123", - "ETag": "W/\u00220x8D9E2A4BC1FADFA\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "681bdac2-7483-4fac-9d94-aac0adcb8d23", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4BC1FADFA\u0022", - "name": "hotel-live-test16362", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "165e0d8d-d010-4322-ba23-403c5b85e922" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:45 GMT", - "elapsed-time": "235", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "165e0d8d-d010-4322-ba23-403c5b85e922", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "8149ba68-bc60-49ac-ae6d-4ae1c97f293e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:45 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "8149ba68-bc60-49ac-ae6d-4ae1c97f293e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "84337f37-904d-43e4-bf23-3d4439d492ee" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:49 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "84337f37-904d-43e4-bf23-3d4439d492ee", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "211", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "56fbbac3-dcda-410f-ac57-b0a9972c13d1" - }, - "RequestBody": { - "value": [ - { - "@search.action": "mergeOrUpload", - "hotelId": "8", - "description": "Modified Description" - }, - { - "@search.action": "mergeOrUpload", - "hotelId": "11", - "description": "New Hotel Description", - "lastRenovationDate": null - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "138", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:53 GMT", - "elapsed-time": "47", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "56fbbac3-dcda-410f-ac57-b0a9972c13d1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 200 - }, - { - "key": "11", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6be7f77a-8c3e-410b-adbf-3f274d4ee27e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "389", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:25:57 GMT", - "elapsed-time": "11", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6be7f77a-8c3e-410b-adbf-3f274d4ee27e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "8", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles.", - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "25a3bcce-2225-48f7-a901-9a80a17ce364" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:25:57 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "25a3bcce-2225-48f7-a901-9a80a17ce364", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF11" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test16362\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3c6b66bf-ea3d-4c54-8412-ee5289a57b8e" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:25:57 GMT", - "elapsed-time": "196", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "3c6b66bf-ea3d-4c54-8412-ee5289a57b8e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test16362" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.js new file mode 100644 index 000000000000..a6013232db04 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "14735b3a185e3a0e8563e031006f7043"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"upload","hotelId":"11","description":"New Hotel Description","lastRenovationDate":null}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471fedee7e34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab95c97a5697152cde893bd9ddd5ff2fd5ff2ff00bc77d14f4b000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '4bc53e00-1a7b-42ba-b280-d651ff78422c', + 'elapsed-time', + '30', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:05 GMT', + 'Content-Length', + '185' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71fdcddfd7f002dd054ff05000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'b469722c-a008-496a-ab73-96badeaa2c19', + 'elapsed-time', + '7', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:43:09 GMT', + 'Content-Length', + '127' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.json deleted file mode 100644 index bf27dc13dd54..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_indexdocuments_upload_a_new_document.json +++ /dev/null @@ -1,1268 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3b651683-1332-4c07-8337-51287fb62bc3" - }, - "RequestBody": { - "name": "hotel-live-test32464", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:24:36 GMT", - "elapsed-time": "708", - "ETag": "W/\u00220x8D9E2A495FBB754\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3b651683-1332-4c07-8337-51287fb62bc3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A495FBB754\u0022", - "name": "hotel-live-test32464", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e18c1fb4-5a18-4c1f-8cbf-aec512097a82" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:40 GMT", - "elapsed-time": "161", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e18c1fb4-5a18-4c1f-8cbf-aec512097a82", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3e503390-1762-49e9-a67b-37095601d54d" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:40 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3e503390-1762-49e9-a67b-37095601d54d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "502b22e6-ce20-43f1-bfd2-b2a853a8d510" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:45 GMT", - "elapsed-time": "10", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "502b22e6-ce20-43f1-bfd2-b2a853a8d510", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "118", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "02bbe79c-f70a-453b-b33d-06e6ef0649ac" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "11", - "description": "New Hotel Description", - "lastRenovationDate": null - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "75", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:49 GMT", - "elapsed-time": "31", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "02bbe79c-f70a-453b-b33d-06e6ef0649ac", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "11", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "1dbfeee5-e108-4486-af11-57ae9dc1b3ce" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:53 GMT", - "elapsed-time": "10", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "1dbfeee5-e108-4486-af11-57ae9dc1b3ce", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF11" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test32464\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "50a3b4b1-2577-4f8b-82c2-3c45d2c1ec5c" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:24:53 GMT", - "elapsed-time": "181", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "50a3b4b1-2577-4f8b-82c2-3c45d2c1ec5c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test32464" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.js new file mode 100644 index 000000000000..263e78986313 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.js @@ -0,0 +1,101 @@ +let nock = require('nock'); + +module.exports.hash = "26f342e9075a6b1ad1cb8966051ad336"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('6')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3efaf4a391fcf5225be41f3d5aaecb72f4d12c6fa675b16a8b6a494d5eafeb555d34c5f2a2bc4ef377ab7cd91497f938fda29ae565daac8b366fd2797699a7d932ada679b6dcbe2cf2ab3141f6003dab0df469d6e617557d6dfe6eb38be6a347dffbfee8a35556bfa56ece96d3723dcb093d69d02c2a7c7c5c96d595fbb4cc9af655beac2e33807f4a40cd37357db2bc307f951575482dccdfd96c56e70df5287fd655b5a03fbef7fd5ff2ff00978a208417010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '01b54adb-0f82-42bb-ac18-907e4523b830', + 'elapsed-time', + '17', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:22 GMT', + 'Content-Length', + '301' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"merge","hotelId":"6","hotelName":null,"description":"Modified Description","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f7dfad1e8a3a6cdda75f3d1a3b65ee7a38ff2baaeea2ff2a6c92ea8e1725d96a6c54935a34ff676767ec9f77fc9ff037255c7d34a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '63a0a7cf-3070-4926-87d8-fc956831fd2c', + 'elapsed-time', + '35', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:22 GMT', + 'Content-Length', + '184' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('6')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3efaf4a391fcf5225be41f3d5aaecb72f4d12c6fa675b16a8b6a494dbea866c57991cfd2a7dec741a367b579739ab5f945555f9bbfdbeca2f9e8d1f7be3ffa6895d56f8be5c5d9725aae6739752d0d9a45858f8fcbb2ba729f9659d3beca97d56506f04f09a8f9a6a64f9617e6afb2a20ea985f93b9bcdeabca11ee5cfbaaa16f4c7f7beff4bfe1fcc8e7273f3000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'e34f4883-94e3-4c96-b01a-6d2f8b66efa8', + 'elapsed-time', + '13', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:26 GMT', + 'Content-Length', + '264' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.json deleted file mode 100644 index 8935f4da665f..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergedocuments_modify__merge_an_existing_document.json +++ /dev/null @@ -1,1336 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "8b16206c-162b-4bcd-bda2-be4a88b423e6" - }, - "RequestBody": { - "name": "hotel-live-test76490", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:23:54 GMT", - "elapsed-time": "684", - "ETag": "W/\u00220x8D9E2A47CADAB6F\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "8b16206c-162b-4bcd-bda2-be4a88b423e6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A47CADAB6F\u0022", - "name": "hotel-live-test76490", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "146de7df-3216-41ba-9541-e290e822bdee" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:58 GMT", - "elapsed-time": "176", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "146de7df-3216-41ba-9541-e290e822bdee", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "43a8fa37-83a0-450d-b3fb-ebdd12c5d507" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:58 GMT", - "elapsed-time": "12", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "43a8fa37-83a0-450d-b3fb-ebdd12c5d507", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f0a4b4c2-d186-419e-a552-9a325c259f83" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:02 GMT", - "elapsed-time": "9", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f0a4b4c2-d186-419e-a552-9a325c259f83", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "cb08e17c-34eb-4db4-9a7f-71fbcc41c20a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "279", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:06 GMT", - "elapsed-time": "12", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "cb08e17c-34eb-4db4-9a7f-71fbcc41c20a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "280", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "eeed9a88-ef2b-4dc4-b204-1b5a50cdd2f6" - }, - "RequestBody": { - "value": [ - { - "@search.action": "merge", - "hotelId": "6", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "74", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:06 GMT", - "elapsed-time": "35", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "eeed9a88-ef2b-4dc4-b204-1b5a50cdd2f6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2a76f7dd-6690-45ee-89df-150a9c096f87" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "243", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:10 GMT", - "elapsed-time": "53", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "2a76f7dd-6690-45ee-89df-150a9c096f87", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "6", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test76490\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "73c97717-f4b1-48a9-8b04-144b8d8e8280" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:24:10 GMT", - "elapsed-time": "175", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "73c97717-f4b1-48a9-8b04-144b8d8e8280", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test76490" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.js new file mode 100644 index 000000000000..d9b8aca95459 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "4aaf03617c2e3881d1eba05a82827be3"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"mergeOrUpload","hotelId":"11","description":"New Hotel Description","lastRenovationDate":null}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471fedee7e34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab95c97a5697152cde893bd9ddd5ff2fd5ff2ff00bc77d14f4b000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '983cc1b8-6fcd-484f-ae55-56d269090e25', + 'elapsed-time', + '26', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:01 GMT', + 'Content-Length', + '185' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71fdcddfd7f002dd054ff05000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'c90ee76f-b719-43fb-88f0-12be99d8edac', + 'elapsed-time', + '10', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:05 GMT', + 'Content-Length', + '127' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.json deleted file mode 100644 index 3d39cd007294..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_merge_a_new_document.json +++ /dev/null @@ -1,1268 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "831b716c-92e2-49d9-bf23-db9c9f582e27" - }, - "RequestBody": { - "name": "hotel-live-test26723", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:23:33 GMT", - "elapsed-time": "759", - "ETag": "W/\u00220x8D9E2A4700D20AF\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "831b716c-92e2-49d9-bf23-db9c9f582e27", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4700D20AF\u0022", - "name": "hotel-live-test26723", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "939a3efd-c258-48d4-88f6-a1078584bc5a" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:37 GMT", - "elapsed-time": "200", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "939a3efd-c258-48d4-88f6-a1078584bc5a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3e68967e-ebdc-4f22-ad86-444b5ca18b5f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:37 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3e68967e-ebdc-4f22-ad86-444b5ca18b5f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "92a35924-a6be-4748-9173-a0759c7b783e" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:41 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "92a35924-a6be-4748-9173-a0759c7b783e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "125", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e34146fc-9e45-43b8-bff2-78a5d2c12ad6" - }, - "RequestBody": { - "value": [ - { - "@search.action": "mergeOrUpload", - "hotelId": "11", - "description": "New Hotel Description", - "lastRenovationDate": null - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "75", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:45 GMT", - "elapsed-time": "34", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e34146fc-9e45-43b8-bff2-78a5d2c12ad6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "11", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2e6e0a12-103b-448a-b12c-8bdbfee474a7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:49 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "2e6e0a12-103b-448a-b12c-8bdbfee474a7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF11" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test26723\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4fefc02c-58bd-494e-9018-6ff9093f2eaf" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:23:49 GMT", - "elapsed-time": "174", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "4fefc02c-58bd-494e-9018-6ff9093f2eaf", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test26723" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.js new file mode 100644 index 000000000000..225e4bb583a8 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.js @@ -0,0 +1,101 @@ +let nock = require('nock'); + +module.exports.hash = "36fe28d07fa12d4edea66b24e92f68a2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('6')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3efaf4a391fcf5225be41f3d5aaecb72f4d12c6fa675b16a8b6a494d5eafeb555d34c5f2a2bc4ef377ab7cd91497f938fda29ae565daac8b366fd2797699a7d932ada679b6dcbe2cf2ab3141f6003dab0df469d6e617557d6dfe6eb38be6a347dffbfee8a35556bfa56ece96d3723dcb093d69d02c2a7c7c5c96d595fbb4cc9af655beac2e33807f4a40cd37357db2bc307f951575482dccdfd96c56e70df5287fd655b5a03fbef7fd5ff2ff00978a208417010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '4a5667da-7377-4260-9fa5-a7ffc70a3ac6', + 'elapsed-time', + '14', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:38 GMT', + 'Content-Length', + '301' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"mergeOrUpload","hotelId":"6","hotelName":null,"description":"Modified Description","descriptionFr":null,"category":null,"tags":[],"parkingIncluded":null,"smokingAllowed":null,"lastRenovationDate":null,"rating":null,"location":null,"address":null,"rooms":[]}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471f7dfad1e8a3a6cdda75f3d1a3b65ee7a38ff2baaeea2ff2a6c92ea8e1725d96a6c54935a34ff676767ec9f77fc9ff037255c7d34a000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'c5eff099-5a41-47c9-9c8d-9adb4986c6ff', + 'elapsed-time', + '32', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:38 GMT', + 'Content-Length', + '184' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs('6')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147f3aacdcbb3d9478f3efaf4a391fcf5225be41f3d5aaecb72f4d12c6fa675b16a8b6a494dbea866c57991cfd2a7dec741a367b579739ab5f945555f9bbfdbeca2f9e8d1f7be3ffa6895d56f8be5c5d9725aae6739752d0d9a45858f8fcbb2ba729f9659d3beca97d56506f04f09a8f9a6a64f9617e6afb2a20ea985f93b9bcdeabca11ee5cfbaaa16f4c7f7beff4bfe1fcc8e7273f3000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '4aa275a3-409d-48a6-96ff-9231d357435e', + 'elapsed-time', + '15', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:41:43 GMT', + 'Content-Length', + '264' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.json deleted file mode 100644 index e99b78a852ef..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_mergeoruploaddocuments_modify__merge_an_existing_document.json +++ /dev/null @@ -1,1336 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "add1ec4c-81cb-4d8a-9369-be6022c5f652" - }, - "RequestBody": { - "name": "hotel-live-test61556", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:23:11 GMT", - "elapsed-time": "614", - "ETag": "W/\u00220x8D9E2A463487178\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "add1ec4c-81cb-4d8a-9369-be6022c5f652", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A463487178\u0022", - "name": "hotel-live-test61556", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4e35b86f-976c-41de-9e5e-58213f76d385" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:15 GMT", - "elapsed-time": "275", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4e35b86f-976c-41de-9e5e-58213f76d385", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fc5720f0-a37a-40dd-b293-3edd9536da26" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:15 GMT", - "elapsed-time": "5", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fc5720f0-a37a-40dd-b293-3edd9536da26", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4f64dd43-ffba-4925-a24e-52ec9d0ab40d" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:23:20 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4f64dd43-ffba-4925-a24e-52ec9d0ab40d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "46935739-d045-407b-ba88-eca95a614f74" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "279", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:24 GMT", - "elapsed-time": "18", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "46935739-d045-407b-ba88-eca95a614f74", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "6", - "hotelName": null, - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "288", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3b45a9af-b546-41bf-9a3a-e279689163ca" - }, - "RequestBody": { - "value": [ - { - "@search.action": "mergeOrUpload", - "hotelId": "6", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "74", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:24 GMT", - "elapsed-time": "38", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3b45a9af-b546-41bf-9a3a-e279689163ca", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 200 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "42a5e99f-4e09-49df-9579-8abda032091a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "243", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:23:28 GMT", - "elapsed-time": "10", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "42a5e99f-4e09-49df-9579-8abda032091a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "hotelId": "6", - "hotelName": null, - "description": "Modified Description", - "descriptionFr": null, - "category": null, - "tags": [], - "parkingIncluded": null, - "smokingAllowed": null, - "lastRenovationDate": null, - "rating": null, - "location": null, - "address": null, - "rooms": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test61556\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "cf1e54a9-2b9b-4c4a-896d-bfcaa89cd266" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:23:28 GMT", - "elapsed-time": "228", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "cf1e54a9-2b9b-4c4a-896d-bfcaa89cd266", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test61556" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.js new file mode 100644 index 000000000000..4c6c4e295a0d --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "b890d1edeacdac4882dcb2316400e1bd"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.search`, {"count":true,"search":"budget","skip":0,"top":5}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cadd6cbf6a3479f8e3ebaccca75fed1a3efd1574d9ed5d3f9b89956357db23bdebfb773ffde8307a38fe6559b9767b38f1e7d74ef23fdeb45b6a0361f9d4eab65f5bacdaee9f359de4ceb62d516d592bef9c9bcbe4e57d56a5d6675caafa4c5326dabab65d8f4594d8dbffdfbae7776cef7d1a8ccd355b96ef4d5a2ced37c995e166599d37bd3accd2faafa9a5e79b29e5de42d7dd666170de1ffd155715ed09f13f9fcfba38f5659fdb6585e9c2da7e57a9613f66dbdce471f358b0a1f1f976575854fcfb3b2a18fcbac695fe5cbea3203564fa923ea64f7e1c3fbdb3b0fb67776dfec3c78b4b343fffb29eaa3a636cb8b8f1eed8f77e8c58ab0a2573e7af48b3f6aaf5778ed6555107509ddaaaa67c5926001c3edddbdbdf1eebdddfb44d2fd4fc79f3e38b87fb04b784e6bfad6bebb046109f9ba5ae5755be0cd5f2c1f12b55fbefefcd1febdbd4f3ffa25bfe4978c3eca66b33a6fa8c1725d968455552de88fef7dff978c2293b97b40cf1e4d38cf054fe6ee0e75c47fea6c9e802beaeba698e5e9b7f1397def4d15b5789d5de6e97a45f398dedff9ddd3eafc3c6deb6c56e0ebac94796ec669faaccef3f4bbc5b362945ed479d6a6864ae992f04a67c4066085517a4ea8a76f8b763acfe9afabac99e775fa0bd3597d9dd7a3746fffee83b459af5655dd8ed249755512ddd38c98e19a5e2dda250d3f9de6cb965eca96b37441831d8748337f81bda60fc1ab8ba2c97f90fef4baf945eb8ff169bec30369d635715e93cef1193362e306b6a4bf684c180e8d266bd70521d3d6689a1f34e9a4200e6d8a76cd1f3c4c57f69bd99a91abf36d66e0513a5d174db1ccd369b55895d2aaa58f4ba2eabac969dc0d7ff890a8417f8f082d1e3ad3c18e9fc030d09466c9d0206f53969a7c89f9060988dc83a2b2b7bf3daf68c4e775b56c094cf3366df2fab29882f3a634a9347924ac65359940b089c9da6c5d67c4d3c4ae3db15201eaca9548db90583ddcdea1ff7d1a15ab7bef27560f0ec60ff777f60fee8deedd1f3fdcd9dffd94b0fc70a1fac51f3544e4bc3d361f7cf4e9c3dd9df459769db76dce139abe9a11d469d182ca4fd7f53c5bd0df44ac367f595797c59208fae8a31727f4212b5c9e8daf5e1fd3dfab8a9a9527d50c2df61e3cd8bdf711756e44f817fb1c4c0d5e13cb113beca6bf1711287d92cfd2ade345be24eecc9b3b04cd6bcdfc6edb3b2e25c62501298b36dd7a2d73cd6f2a81f805fa739235f92b42ffa3477be3fd7dfa3b9f7dc96009ab8f5cf7d4b229f37cd5b0c6a0c6f47774fa0dc729532db2b779fd112b280f65022d2c9abea2f103ed9f58e72453d4d10de33c218a4f4812304823dfbf88fa25109bc7ebf5471fba513f187ffa90fe0e476db1a1a6370d5b856160dc3cf28e6ade193ff8f4c1ce2efa65f5c9aaf92175c57fa9667e9d4f6bc2972520fd025f50038f1ad4e4cd3c17fd9b164d4a1a9cb4e435893049119191146f4bdf2f32126b523e8bbc9e16a4afb39a34e735a971fe168c0cb9c7ef73c2b1c5172ff2abf4f7a9eab7e3f4383da7df17c5724d8297665719356ed237c522ffb8495fffa2754613019af3eb45d356753135aa8a00e163f4304ab326bdca49edd3cf8a3ead497565343d6844c3cb49da5a6a4d460364b308d018180e310401cea8cf05c9509ab5a4a7a76d4176099d4f2b9a915545f39ed1489971a00d3d5231e33cffd869fa14fd1533fc9d3fccca9c18aef5f539db868cd43ac973b1a206201b7f77402373d464854c0d453510c7acca9ca839a5a6bbf7ef1110fada0c06d424462de9ff340e25295980b6aed6341282c234810569f3c58a143b9950ea8c50a33e95baf432605263ee92085b2c9b0270d3d9c7d99a5a362400f9fa1dfd4984253c6838a21088b8bf685da4e7a2ff2d5a69f9f19aa84cd41290f43efd9f2d8ba33323e3e84c7f1384f2e3e305437ec87881e6e03c6381aa758b8fe9532319abaa020f938747b09662684990e823fa735ae4f545fe8d599b073be4c16def1ebcd939205343fff3adcd7b3a710fee8d1f3eb8bfbf736fb40fc9ddb97ff0b3666e1e3c48efb7f3f4f812c0889741493353f4091990d0cefc3ef4e1463bb3bbb3b3b7b7c9ce786a113ad42abe74eb84ba875f081deabdc3c2743b2d0c3980c0e1074915f317a029cdbcaee943a7911f7ea84616ce306c7739adefce2e67a48b49137b0321b01e0640ddd8ba74eb0bc026d94a7fb2c8af80b2f7de4d04881ae01ec01b687030dee9d3c0e0472dbf1e09461ffd74365dffe00745daae2744102649cf38edddbf77efdec37b04958d0b5ba73d7a97ff52ebf4aacaa6f301b374429664050dcb2f9082a7d8e16a394ecf96e7a44e4867911aa72fa030bc1799ac6154b8207924671ff682e69ed9c741592fe97b6a083024c956ef3041e93333766e447fbf7794289f0ee89783bded9dfded3dd22f116f76f7fdf4cbae172412efff3083c4f864ef5347fc974ef6e9bb1500329736f49d376bf4ed4b7253c88bb8a8aa99cc78d882e7f5b8410c36219fc419616a46141a9cb71f05f74c6dccdbf77fc9ff03a337a51ac6110000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '94a78f43-5902-4a62-aac7-a8f0c6ebffea', + 'elapsed-time', + '37', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:39:13 GMT', + 'Content-Length', + '1958' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.json deleted file mode 100644 index 3f6035ba2454..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_the_correct_search_result.json +++ /dev/null @@ -1,1449 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9ea0fbb2-82a3-46de-86e7-03cbac831ea5" - }, - "RequestBody": { - "name": "hotel-live-test48104", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:20:46 GMT", - "elapsed-time": "708", - "ETag": "W/\u00220x8D9E2A40C95240F\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "9ea0fbb2-82a3-46de-86e7-03cbac831ea5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A40C95240F\u0022", - "name": "hotel-live-test48104", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "23e08d27-967a-476d-a2cd-9891336790b8" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:50 GMT", - "elapsed-time": "152", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "23e08d27-967a-476d-a2cd-9891336790b8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b696fc3d-e30c-4d2e-9308-6af91410da18" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:50 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "b696fc3d-e30c-4d2e-9308-6af91410da18", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "feae7c34-8be0-4150-99f4-076dbf52f79c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:20:54 GMT", - "elapsed-time": "9", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "feae7c34-8be0-4150-99f4-076dbf52f79c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "49", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6183c249-9a07-4fa8-bd31-39b06e1d7ed4" - }, - "RequestBody": { - "count": true, - "search": "budget", - "skip": 0, - "top": 5 - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4550", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:20:58 GMT", - "elapsed-time": "74", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6183c249-9a07-4fa8-bd31-39b06e1d7ed4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.count": 6, - "value": [ - { - "@search.score": 1.4305377, - "hotelId": "3", - "hotelName": "EconoStay", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4.0, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 1.1888826, - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00Z", - "rating": 3.0, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - }, - { - "@search.score": 0.7670169, - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00Z", - "rating": 4.0, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.score": 0.25333932, - "hotelId": "2", - "hotelName": "Roach Motel", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00Z", - "rating": 1.0, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - }, - { - "@search.score": 0.25333932, - "hotelId": "4", - "hotelName": "Express Rooms", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00Z", - "rating": 4.0, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": null, - "rooms": [] - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test48104\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "d1be96bb-474e-4439-b59f-f78b29e74ba7" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:20:58 GMT", - "elapsed-time": "171", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "d1be96bb-474e-4439-b59f-f78b29e74ba7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test48104" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.js new file mode 100644 index 000000000000..e4598e076e5c --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "a0ed10fc192c453e9341f1d5b37cdd15"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.search`, {"count":true,"search":"garbxyz","skip":0,"top":5}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cadd6cbf6a3473ba38f2eb3729d7ff4e87bdfff25ff0f36f0f25c1d000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'a38077fb-a955-4a5f-b2dd-79179740fd92', + 'elapsed-time', + '18', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:39:31 GMT', + 'Content-Length', + '149' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.json deleted file mode 100644 index 173dd3df2876..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_search_returns_zero_results_for_invalid_query.json +++ /dev/null @@ -1,1228 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a9241e4b-b5d3-4aa1-9f4f-8decea1d350b" - }, - "RequestBody": { - "name": "hotel-live-test27821", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:21:03 GMT", - "elapsed-time": "752", - "ETag": "W/\u00220x8D9E2A416DC11F8\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a9241e4b-b5d3-4aa1-9f4f-8decea1d350b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A416DC11F8\u0022", - "name": "hotel-live-test27821", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "5186b491-ba5c-410f-bf58-f0cc5b46dcc7" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:07 GMT", - "elapsed-time": "246", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "5186b491-ba5c-410f-bf58-f0cc5b46dcc7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "5bf2c788-9fd2-4e2c-b0a4-a55a135fc8e5" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:07 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "5bf2c788-9fd2-4e2c-b0a4-a55a135fc8e5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ebaecc24-041d-4c66-8a82-956082a57dbd" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:11 GMT", - "elapsed-time": "9", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ebaecc24-041d-4c66-8a82-956082a57dbd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "50", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6e532ab8-1011-42bc-8bcd-59ca4b546f05" - }, - "RequestBody": { - "count": true, - "search": "garbxyz", - "skip": 0, - "top": 5 - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "29", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:15 GMT", - "elapsed-time": "44", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6e532ab8-1011-42bc-8bcd-59ca4b546f05", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.count": 0, - "value": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test27821\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7003e7e7-a4db-47f0-9eb9-923111b8b084" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:21:16 GMT", - "elapsed-time": "174", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "7003e7e7-a4db-47f0-9eb9-923111b8b084", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test27821" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.js new file mode 100644 index 000000000000..1674317f417f --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "9fb0a05d02b53e7fd6bc513813be0cc6"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.suggest`, {"search":"WiFi","suggesterName":"sg"}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1efd9e4593d9d8fdbfc5dfbd1a38f5e679779ba5ea56d95dedff9ddd3eafc3c6deb6c56b445b5ccca745eb579d98cd3f4599de7e9778b67c528bda8f3ac4dcb6a9aa151ba2478e9acba5ab6f4ff517abe2ecbf46dd14ee739fd759535f3bc4e7f613aabaff37a94eeeddf7d9036ebd5aaaadb513aa9aeca6279916665995fd3ab45bbcc9b269de6cb965eca96b37451d5f9f8a3d1478cc7d98c10deddf9e8977cff97fc3f4bd5b195d2000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'a9b08fd6-667d-4665-aff2-6a1875d39137', + 'elapsed-time', + '69', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:39:48 GMT', + 'Content-Length', + '295' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.json deleted file mode 100644 index 97d524fb740c..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_the_correct_suggestions.json +++ /dev/null @@ -1,1230 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ea689eac-46a9-4554-b0b1-140bab75471a" - }, - "RequestBody": { - "name": "hotel-live-test14858", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:21:20 GMT", - "elapsed-time": "818", - "ETag": "W/\u00220x8D9E2A4213636ED\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ea689eac-46a9-4554-b0b1-140bab75471a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4213636ED\u0022", - "name": "hotel-live-test14858", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "84a6ce4e-b224-4b56-b842-f19fe142efcc" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:25 GMT", - "elapsed-time": "182", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "84a6ce4e-b224-4b56-b842-f19fe142efcc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e1a55a4c-72cf-4024-b227-e54af0be9f85" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:25 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e1a55a4c-72cf-4024-b227-e54af0be9f85", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "65c99f11-263f-4ec1-a128-cc6ea3f214ed" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:28 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "65c99f11-263f-4ec1-a128-cc6ea3f214ed", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)/docs/search.post.suggest?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "38", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "43208511-e6a6-441e-b93b-3e17b5a4f2d9" - }, - "RequestBody": { - "search": "WiFi", - "suggesterName": "sg" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "210", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:33 GMT", - "elapsed-time": "60", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "43208511-e6a6-441e-b93b-3e17b5a4f2d9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "@search.text": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "hotelId": "10" - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test14858\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "adc846ab-19e4-4e66-80f8-c9ee9096168c" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:21:33 GMT", - "elapsed-time": "170", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "adc846ab-19e4-4e66-80f8-c9ee9096168c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test14858" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.js new file mode 100644 index 000000000000..063aa1407eb9 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "0e4bf6b0847d12d104c5a8c4f1b8e4e5"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.post.suggest`, {"search":"garbxyz","suggesterName":"sg"}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff92ff0742ea40440c000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '94a73d75-79da-40be-96ea-0f5c04fb8da4', + 'elapsed-time', + '14', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:40:05 GMT', + 'Content-Length', + '133' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.json deleted file mode 100644 index 634f05a1908e..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_suggest_returns_zero_suggestions_for_invalid_input.json +++ /dev/null @@ -1,1225 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2cecc9eb-b042-4e54-9436-c01c8944b66d" - }, - "RequestBody": { - "name": "hotel-live-test65212", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:21:38 GMT", - "elapsed-time": "598", - "ETag": "W/\u00220x8D9E2A42B6CAC84\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "2cecc9eb-b042-4e54-9436-c01c8944b66d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A42B6CAC84\u0022", - "name": "hotel-live-test65212", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "566dd58d-6f8f-4c4b-bc42-419d6665c9cc" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:42 GMT", - "elapsed-time": "148", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "566dd58d-6f8f-4c4b-bc42-419d6665c9cc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e33161d7-0944-4fd3-b029-65e7c6e1449a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:42 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e33161d7-0944-4fd3-b029-65e7c6e1449a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "cb850beb-f247-4f58-90d2-533f0d37f00f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:21:46 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "cb850beb-f247-4f58-90d2-533f0d37f00f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)/docs/search.post.suggest?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "41", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fbd45530-69f3-4628-9eba-32a83a322f64" - }, - "RequestBody": { - "search": "garbxyz", - "suggesterName": "sg" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "12", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:21:50 GMT", - "elapsed-time": "32", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fbd45530-69f3-4628-9eba-32a83a322f64", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test65212\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "93495e96-374f-4f7e-b49c-fce2c4b54a7a" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:21:50 GMT", - "elapsed-time": "184", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "93495e96-374f-4f7e-b49c-fce2c4b54a7a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test65212" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.js b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.js new file mode 100644 index 000000000000..2b4b16e44098 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.js @@ -0,0 +1,69 @@ +let nock = require('nock'); + +module.exports.hash = "572c1712144b6077bad21ebad40a9de2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post(`/indexes('hotel-live-test1')/docs/search.index`, {"value":[{"@search.action":"upload","hotelId":"11","description":"New Hotel Description","lastRenovationDate":null},{"@search.action":"upload","hotelId":"12","description":"New Hotel II Description","lastRenovationDate":null}]}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1dbfcfaa3471fedee7e34faa869b376dd7cf4a8add7f9e8a3bcaeabfa8bbc69b20b6ab95c97a5697152cde893bd9ddd5f32b2efef7dadf7bfff4bfe1fabe085b98b000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=none', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + '7012cd5d-67ab-49cd-9909-0d39f88bb84b', + 'elapsed-time', + '38', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:43 GMT', + 'Content-Length', + '191' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test1')/docs/$count`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f22fec7bff71fdcddfb7f0097815d6605000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'text/plain', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'a6155741-0327-4957-968f-f3d07f0ad49c', + 'elapsed-time', + '6', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:42:46 GMT', + 'Content-Length', + '127' +]); diff --git a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.json b/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.json deleted file mode 100644 index 9cd2ba38ac9b..000000000000 --- a/sdk/search/search-documents/recordings/node/searchclient_tests/recording_uploaddocuments_upload_a_set_of_documents.json +++ /dev/null @@ -1,1280 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "3353", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "bf812040-7f57-45df-a808-c836a662ff29" - }, - "RequestBody": { - "name": "hotel-live-test34550", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": false - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": true, - "facetable": true - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "en.lucene" - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": "fr.lucene" - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": true - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "sortable": false, - "facetable": true - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functions": [ - { - "type": "distance", - "fieldName": "location", - "boost": 2, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100 - } - } - ], - "functionAggregation": "sum" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ] - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "6724", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:24:15 GMT", - "elapsed-time": "692", - "ETag": "W/\u00220x8D9E2A48957D1B3\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "bf812040-7f57-45df-a808-c836a662ff29", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A48957D1B3\u0022", - "name": "hotel-live-test34550", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "6379", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f5cca6dd-9f2d-44f7-a295-06fd771412d2" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "1", - "description": "Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.", - "descriptionFr": "Meilleur h\u00F4tel en ville si vous aimez les h\u00F4tels de luxe. Ils ont une magnifique piscine \u00E0 d\u00E9bordement, un spa et un concierge tr\u00E8s utile. L\u0027emplacement est parfait \u2013 en plein centre, \u00E0 proximit\u00E9 de toutes les attractions touristiques. Nous recommandons fortement cet h\u00F4tel.", - "hotelName": "Fancy Stay", - "category": "Luxury", - "tags": [ - "pool", - "view", - "wifi", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": false, - "lastRenovationDate": "2010-06-27T00:00:00.000Z", - "rating": 5, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 47.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "2", - "description": "Cheapest hotel in town. Infact, a motel.", - "descriptionFr": "H\u00F4tel le moins cher en ville. Infact, un motel.", - "hotelName": "Roach Motel", - "category": "Budget", - "tags": [ - "motel", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": true, - "lastRenovationDate": "1982-04-28T00:00:00.000Z", - "rating": 1, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 49.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "3", - "description": "Very popular hotel in town", - "descriptionFr": "H\u00F4tel le plus populaire en ville", - "hotelName": "EconoStay", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "4", - "description": "Pretty good hotel", - "descriptionFr": "Assez bon h\u00F4tel", - "hotelName": "Express Rooms", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "1995-07-01T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 46.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "5", - "description": "Another good hotel", - "descriptionFr": "Un autre bon h\u00F4tel", - "hotelName": "Comfy Place", - "category": "Budget", - "tags": [ - "wifi", - "budget" - ], - "parkingIncluded": true, - "smokingAllowed": false, - "lastRenovationDate": "2012-08-12T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -122.131577, - 48.678581 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - } - }, - { - "@search.action": "upload", - "hotelId": "6", - "description": "Surprisingly expensive. Model suites have an ocean-view.", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "7", - "description": "Modern architecture, very polite staff and very clean. Also very affordable.", - "descriptionFr": "Architecture moderne, personnel poli et tr\u00E8s propre. Aussi tr\u00E8s abordable.", - "hotelName": "Modern Stay" - }, - { - "@search.action": "upload", - "hotelId": "8", - "description": "Has some road noise and is next to the very police station. Bathrooms had morel coverings.", - "descriptionFr": "Il y a du bruit de la route et se trouve \u00E0 c\u00F4t\u00E9 de la station de police. Les salles de bain avaient des rev\u00EAtements de morilles." - }, - { - "@search.action": "upload", - "hotelId": "9", - "hotelName": "Secret Point Motel", - "description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time\u0027s Square and the historic centre of the city, as well as other places of interest that make New York one of America\u0027s most attractive and cosmopolitan cities.", - "descriptionFr": "L\u0027h\u00F4tel est id\u00E9alement situ\u00E9 sur la principale art\u00E8re commerciale de la ville en plein c\u0153ur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d\u0027autres lieux d\u0027int\u00E9r\u00EAt qui font de New York l\u0027une des villes les plus attractives et cosmopolites de l\u0027Am\u00E9rique.", - "category": "Boutique", - "tags": [ - "pool", - "air conditioning", - "concierge" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1970-01-18T00:00:00.000Z", - "rating": 4, - "location": { - "type": "Point", - "coordinates": [ - -73.975403, - 40.760586 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "677 5th Ave", - "city": "New York", - "stateProvince": "NY", - "country": "USA", - "postalCode": "10022" - }, - "rooms": [ - { - "description": "Budget Room, 1 Queen Bed (Cityside)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (c\u00F4t\u00E9 ville)", - "type": "Budget Room", - "baseRate": 9.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd" - ] - }, - { - "description": "Budget Room, 1 King Bed (Mountain View)", - "descriptionFr": "Chambre \u00C9conomique, 1 tr\u00E8s grand lit (Mountain View)", - "type": "Budget Room", - "baseRate": 8.09, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "vcr/dvd", - "jacuzzi tub" - ] - } - ] - }, - { - "@search.action": "upload", - "hotelId": "10", - "hotelName": "Countryside Hotel", - "description": "Save up to 50% off traditional hotels. Free WiFi, great location near downtown, full kitchen, washer \u0026 dryer, 24/7 support, bowling alley, fitness center and more.", - "descriptionFr": "\u00C9conomisez jusqu\u0027\u00E0 50% sur les h\u00F4tels traditionnels. WiFi gratuit, tr\u00E8s bien situ\u00E9 pr\u00E8s du centre-ville, cuisine compl\u00E8te, laveuse \u0026 s\u00E9cheuse, support 24/7, bowling, centre de fitness et plus encore.", - "category": "Budget", - "tags": [ - "24-hour front desk service", - "coffee in lobby", - "restaurant" - ], - "parkingIncluded": false, - "smokingAllowed": true, - "lastRenovationDate": "1999-09-06T00:00:00.000Z", - "rating": 3, - "location": { - "type": "Point", - "coordinates": [ - -78.940483, - 35.90416 - ], - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - } - }, - "address": { - "streetAddress": "6910 Fayetteville Rd", - "city": "Durham", - "stateProvince": "NC", - "country": "USA", - "postalCode": "27713" - }, - "rooms": [ - { - "description": "Suite, 1 King Bed (Amenities)", - "descriptionFr": "Suite, 1 tr\u00E8s grand lit (Services)", - "type": "Suite", - "baseRate": 2.44, - "bedOptions": "1 King Bed", - "sleepsCount": 2, - "smokingAllowed": true, - "tags": [ - "coffee maker" - ] - }, - { - "description": "Budget Room, 1 Queen Bed (Amenities)", - "descriptionFr": "Chambre \u00C9conomique, 1 grand lit (Services)", - "type": "Budget Room", - "baseRate": 7.69, - "bedOptions": "1 Queen Bed", - "sleepsCount": 2, - "smokingAllowed": false, - "tags": [ - "coffee maker" - ] - } - ] - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "642", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:19 GMT", - "elapsed-time": "161", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f5cca6dd-9f2d-44f7-a295-06fd771412d2", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "1", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "2", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "3", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "4", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "5", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "6", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "7", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "8", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "9", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "10", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f7d4dee6-dca9-4692-a731-a21594056d60" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "4", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:19 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f7d4dee6-dca9-4692-a731-a21594056d60", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF0" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "372649b9-624d-4a59-a285-8c55e6f768d4" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:23 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "372649b9-624d-4a59-a285-8c55e6f768d4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF10" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)/docs/search.index?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "228", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "591958c5-56c7-4e12-97cc-a7daa31dbb51" - }, - "RequestBody": { - "value": [ - { - "@search.action": "upload", - "hotelId": "11", - "description": "New Hotel Description", - "lastRenovationDate": null - }, - { - "@search.action": "upload", - "hotelId": "12", - "description": "New Hotel II Description", - "lastRenovationDate": null - } - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "139", - "Content-Type": "application/json; odata.metadata=none", - "Date": "Fri, 28 Jan 2022 21:24:27 GMT", - "elapsed-time": "50", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "591958c5-56c7-4e12-97cc-a7daa31dbb51", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "value": [ - { - "key": "11", - "status": true, - "errorMessage": null, - "statusCode": 201 - }, - { - "key": "12", - "status": true, - "errorMessage": null, - "statusCode": 201 - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)/docs/$count?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=none", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e6aed9b0-06ea-4949-8c2e-40095704684b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "5", - "Content-Type": "text/plain", - "Date": "Fri, 28 Jan 2022 21:24:31 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e6aed9b0-06ea-4949-8c2e-40095704684b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": "\uFEFF12" - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test34550\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b758a093-80b4-4233-a325-6644fe9e1466" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:24:31 GMT", - "elapsed-time": "188", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b758a093-80b4-4233-a325-6644fe9e1466", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test34550" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.js new file mode 100644 index 000000000000..fbeebbe3d629 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.js @@ -0,0 +1,91 @@ +let nock = require('nock'); + +module.exports.hash = "a3a77605173eb97ade41102643ab900c"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .put(`/indexes('hotel-live-test4')`, {"name":"hotel-live-test4","fields":[{"name":"id","type":"Edm.String","key":true,"searchable":false,"filterable":false,"sortable":false,"facetable":false},{"name":"awesomenessLevel","type":"Edm.Double","searchable":false,"filterable":true,"sortable":true,"facetable":true},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"sortable":false,"facetable":false},{"name":"details","type":"Edm.ComplexType","fields":[{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":false,"sortable":false,"facetable":false}]},{"name":"hiddenWeight","type":"Edm.Int32","retrievable":false,"searchable":false,"filterable":false,"sortable":false,"facetable":false}]}) + .query(true) + .reply(201, {"@odata.context":"https://endpoint/$metadata#indexes/$entity","@odata.etag":"\"0x8D9D237D90746A4\"","name":"hotel-live-test4","defaultScoringProfile":null,"fields":[{"name":"id","type":"Edm.String","searchable":false,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":true,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"awesomenessLevel","type":"Edm.Double","searchable":false,"filterable":true,"retrievable":true,"sortable":true,"facetable":true,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"details","type":"Edm.ComplexType","fields":[{"name":"tags","type":"Collection(Edm.String)","searchable":true,"filterable":false,"retrievable":true,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"normalizer":null,"synonymMaps":[]}]},{"name":"hiddenWeight","type":"Edm.Int32","searchable":false,"filterable":false,"retrievable":false,"sortable":false,"facetable":false,"key":false,"indexAnalyzer":null,"searchAnalyzer":null,"analyzer":null,"normalizer":null,"synonymMaps":[]}],"scoringProfiles":[],"corsOptions":null,"suggesters":[],"analyzers":[],"normalizers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null},"semantic":null}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237D90746A4"', + 'Location', + "https://endpoint/indexes('hotel-live-test4')?api-version=2021-04-30-Preview", + 'request-id', + '58d3e66f-2d12-4853-a248-e5d54621ca4a', + 'elapsed-time', + '636', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:55 GMT', + 'Content-Length', + '1714' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test4')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f9737777fb77cd916edf5472303971a5c10d0dff7a39d77074f1f3eddbbf7e0e9c39d07fb9f1eefffbe1f51ab65b6c8e9eb79d5e6e576595ce6dbe8769fbe99e5e7d9ba6c5f4fabba585ebcacabf3a2a4a6cb75598e3e3a2ff272d67cf4e87bbfd8402866f44e7bbdc2efa7b3c5f8758bd7e833413b9be0e5f3ac6c72bc5db6791d7c54e7d43ebf94cfda7a4d1f3555ddcadfdae63c9bd268fc4fdee6d7a63513e0789995d73fc86b83a6f4ddfd34ebfcbdacea455616de27cdf5b25a5e2fbec85618e3f77fc9c80e33bbca9b6a912ff3a6799e5fe6250dd01bf4d36a0df40800771ce0ea0f5a50de3866f9db1bb27cc02356883fa421cff2665a17abb6a89634326fb4d1291634fdc12ab61b47ab6dbce1ea273f27e36db3a26c685cde584faac5aaccdfbdc12784678ffd49cabc374eaab2cca7a0d8165e1642dda1ef055b19a1d0e0ff7b94f269352f66b37cf9ddbcb898b7343c1d3ec67cb66cefedd147d26b80e94d43d6cffe5f3566fa285084fcf1e823faacf99245833ed057d71717a442f39a3e4113d399fee9fad20fdaea6dbeecfefd8c49a49f10f9eae0837c39adafb9d7df0b04d07e8b4551663594ff236b5574427efc8b625a574d75de8e8f7fb0aef3f16ba6cbf8c9177bf75fbbf788a0bb06dc447ef92504385f646454a6fac1ff0354c8b1c5b2060000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237D90746A4"', + 'Vary', + 'Accept-Encoding', + 'request-id', + '544041e1-ea5f-4b54-afbe-2d3cb9e35a30', + 'elapsed-time', + '18', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:55 GMT', + 'Content-Length', + '663' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .delete(`/indexes('hotel-live-test4')`) + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'request-id', + '83e49e0b-34c5-4e80-afc4-c58ab0e84782', + 'elapsed-time', + '140', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:55 GMT' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.json deleted file mode 100644 index 3543e056f201..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_creates_the_index_object_using_createorupdateindex.json +++ /dev/null @@ -1,731 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "956e2bc6-75c4-4702-b5f8-7d8f3f96773f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "956e2bc6-75c4-4702-b5f8-7d8f3f96773f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "383bb232-7927-4e86-a46b-26dec5028a74" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "41", - "ETag": "W/\u00220x8D9E2A4FE5807D5\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "383bb232-7927-4e86-a46b-26dec5028a74", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4FE5807D5\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ecbbd879-066c-4e7f-a00b-7128cfd4e9ad" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4FE5BD7D6\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ecbbd879-066c-4e7f-a00b-7128cfd4e9ad", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4FE5BD7D6\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "63b57af2-b027-45ad-bbdf-d143150609bd" - }, - "RequestBody": { - "name": "hotel-live-test29900", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "689", - "ETag": "W/\u00220x8D9E2A4FEC4753E\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test29900\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "63b57af2-b027-45ad-bbdf-d143150609bd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4FEC4753E\u0022", - "name": "hotel-live-test29900", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test4\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "700", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4ed98f3e-7fd0-4c7c-abb9-8a5850f99902" - }, - "RequestBody": { - "name": "hotel-live-test4", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1688", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:37 GMT", - "elapsed-time": "673", - "ETag": "W/\u00220x8D9E2A5018E4F15\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test4\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4ed98f3e-7fd0-4c7c-abb9-8a5850f99902", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5018E4F15\u0022", - "name": "hotel-live-test4", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test4\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3de35feb-7be0-444c-be13-1788a5fcf88a" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "1688", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:37 GMT", - "elapsed-time": "18", - "ETag": "W/\u00220x8D9E2A5018E4F15\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3de35feb-7be0-444c-be13-1788a5fcf88a", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5018E4F15\u0022", - "name": "hotel-live-test4", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test4\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7b716fb3-5266-46b9-a470-48616c337379" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:37 GMT", - "elapsed-time": "136", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "7b716fb3-5266-46b9-a470-48616c337379", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test29900\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b145538d-4656-490b-b411-12908a0fceff" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:37 GMT", - "elapsed-time": "170", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b145538d-4656-490b-b411-12908a0fceff", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "802fb449-7ffb-476d-89d4-fa9c1e8eeb3c" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:40 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "802fb449-7ffb-476d-89d4-fa9c1e8eeb3c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fc4f2ba9-89cd-435d-b397-22fe11b442b5" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:40 GMT", - "elapsed-time": "17", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "fc4f2ba9-89cd-435d-b397-22fe11b442b5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test29900" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.js new file mode 100644 index 000000000000..ea5d6f989e51 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.js @@ -0,0 +1,39 @@ +let nock = require('nock'); + +module.exports.hash = "e242d2b89f5ca6065201cc0818e47110"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test3')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f9737777fb77cd916edf5472303971a5c10d0dff7a39d77074f1f3eddbbf7e0e4c9bddd87074f9efcbe1f51ab65b6c8e9eb79d5e6e576595ce6dbe8f61e7d33cbcfb375d9be9e5675b1bc785957e745494d97ebb21c7d745ee4e5acf9e8d1f77eb18150cce89df67a85df4f678bf1eb16afd167827636c1cbe759d9e478bb6cf33af8a8cea97d7e299fb5f59a3e6aaaba95bfb5cd7936a5d1f89fbccdaf4d6b26c0f1322baf7f90d7064de9bbfb69d6f97b59d58bac2cbc4f9aeb65b5bc5e7c91ad30c6efff92911d66769537d5225fe64df33cbfcc4b1aa037e8a7d51ae81100ee38c0d51fb4a0bc71ccf2b73764f98047ac107f48439ee5cdb42e566d512d6964de68a3532c68fa83556c378e56db78c3d54f7e4ec6db6645d9d0b8bcb19e548b5599bf7b834f08cf1efb9394796f9c5465994f41b12dbc2c84ba43df0bb63242a1c1fff728e5d36a5ecc66f9f2bb7971316f69783a7c8cf96cd9dedba38fa4d700d39b86ac9ffdbf6accf451a008f9e3d147f459f3258b067da0afae2f2e4885e6357d8226a633fdd3f5a51fb4d5db7cd9fdfb1993483f21f2d5c107f9725a5f73afbf1708a0fd168ba2cc6a28ff47d6aae884fcf817c5b4ae9aeabc1d1fff605de7e3d74c97f1932ff6eebf76ef1141770db889fcf24b0870bec8c8a84cf583ff071ec204b2b2060000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237CB3198BB"', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'a6047571-0de6-4ba0-9d5b-71d9deab548d', + 'elapsed-time', + '94', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:36 GMT', + 'Content-Length', + '663' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.json deleted file mode 100644 index 1f936861b477..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_correct_index_object.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "0b6d9f65-dbec-4970-85d0-cd67cbc8550f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "0b6d9f65-dbec-4970-85d0-cd67cbc8550f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "24361764-7a43-4e3f-869d-54b62e5fc1d4" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A4F39E1E65\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "24361764-7a43-4e3f-869d-54b62e5fc1d4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4F39E1E65\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9cfe6078-bf40-4ce8-9fe8-ec1bef0db37f" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "43", - "ETag": "W/\u00220x8D9E2A4F3A2156F\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "9cfe6078-bf40-4ce8-9fe8-ec1bef0db37f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4F3A2156F\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "947bc537-42dc-400f-862c-c7885ebce07b" - }, - "RequestBody": { - "name": "hotel-live-test15518", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "704", - "ETag": "W/\u00220x8D9E2A4F410304E\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test15518\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "947bc537-42dc-400f-862c-c7885ebce07b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4F410304E\u0022", - "name": "hotel-live-test15518", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test15518\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a2cc24bc-61d6-442e-af66-09b48874d3be" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:18 GMT", - "elapsed-time": "26", - "ETag": "W/\u00220x8D9E2A4F410304E\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a2cc24bc-61d6-442e-af66-09b48874d3be", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4F410304E\u0022", - "name": "hotel-live-test15518", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test15518\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b8a3fd83-b333-472c-9c58-602ed9134f17" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:18 GMT", - "elapsed-time": "148", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b8a3fd83-b333-472c-9c58-602ed9134f17", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "cd780a67-645f-4d69-a7ea-2a8e5b6086fe" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "cd780a67-645f-4d69-a7ea-2a8e5b6086fe", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "467b61d3-5df0-40cc-8aeb-1207a5b02564" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "467b61d3-5df0-40cc-8aeb-1207a5b02564", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test15518" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.js new file mode 100644 index 000000000000..efbd61ff8364 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "9f60376c3091fcdcc1e6ce9ac7fc330f"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/indexes') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f97371f8d3ebaccca75fed1a3ef59c8d4e482c0febe1fedbc3b787a70b2bfb7ffe0fec3fb4f1e1cdcff7d3fa2f6cb6c41cd3f9a576d5e6e97c565bedd648b55996fa3ff7bd460969f67ebb27d3dadea6279f1b2aece8b92de58aecb72f4d1799197b386bbf3019dcde8c5f67a850f4e678bf1eb16efd26732886c0208e759d9e40051b6792d1fb5f59a3ea9736a9e5ffa1f3555ddfa7f9f67531a177fa060dee6d7e64b26c6f1322baf7f90d70653e9b9fb69d6f97b59d58bac2cbc4f9aeb65b5bc5e7c91ad30ccefff925138d217f8fde6b10a62dfe450f5f71fd258677933ad8b555b544b1ad9fb8f56b1dd385c6df3b330de8ff2e5b85c4ff325a6ea6b0efb594deffe7f6ee0e7f5d71bf8346bf38baabea6d7de7fccf2c9c621cbdfde88e5830f1eb0fcfd3e2325ed08b5a9a33ca9ca329f62beb7dc80efd0f7d2b18feb7b8e5847f5ff8621afb2fa2d0deb6c392dd7b3bca3aa9f545599679072e958705504df73ccf2f7ff1b86dc2c2a0cf9b82cababfce7c588cbac695fe5cbea3203373f2579a6017aa3c6276f8a45fee5f97993b7f49da020582baaff9f1d7c4d836645e50fb85a03297a8dbb130c15adffcf0eb4ac4853d3fcd2b0bca17e9e571775b69a5fbfac8ae5cfd2dc2a989f833167b3599d379ed2c6904f2a38adefdee013c2b3e796366d9de7ed71ec5551f2f499a02ac3d3f17e2091e4839f031a4d8bf6e781ed6e5a526214915c16cb29a6fdffe7c39d56eb65fbf3c1275b5534b3e54935fbffeda4faa3adab6ae1a9a48e0bea2936f8a17dcde6c528f4bd02c19bdf1cb594223f77e472c4f246fb352332f9e4ff2be3e5f1fdff7f98134a71bd22654ec3f286fa0dba6ce6adff378c359f7dc90cec093d46fbffcb896dca3c5f3527b05c34326fb467cbf6de1e7d245d0a968adaff8747fb430a33cd5bff2f18f2cf9bfc09fd471f0659707c6109b1a47e28654e633d5f2f9904c71717757e21f119f1c67a41df49925f7a30ed040c5b764e2707611d057079bdaa4af99bbe2ad0117da1149f15e42b89fb3ba9c86ffae8d1de788760132ef325621ded6c915d2c8b96f23de603fbe2a35ffc519d9fe7754e7f70c0f832ab090dea96c02fae0917039b46fed4beb5bbb333def9258407961700522844046a8c7a23c89988c297757151e093ef7df4ad8fa8d5227b777c919f2d5fe7b4f0017f8601107dd7171744c4bca68f88264adac669c52fe014520cc8d347f89c2dcf8b775f64ed744e7fa055b5aea7f933d012207c7f81be75297bc655a0e4dc19fde978403f68abb7f9b2fbf733e65bfd8458ba0e3e2022d6d7dcddef05c6c4b008a9625194598d988c48a2eb323a7f3ffe4531adaba63a6fc7c73f58d7f9f8358f73fce48bbdfbafdd7bc4e8bb06dc447e01b9f245b66c8ba9f9c0022719a159718b3e0f9fec7ffaf4d9f1c9f1cecd8b3efbd4e0478b3e81ec1361fd913207dd3c5641ec9b1caafefe431a6b283bef3f5ac576e370b5cdcfc2784914bfdeda8737ecaf196228da3f5703ffd1a28f7c323c52d28effef705a7e7843fed1a2cfcf8311ff68d1078aca1ff037974190bfffdf3050f2c869a85da3fca3459f9e5bfaa3451fc2fbff6fa3a4f8f3478b3e84faffdf06faa3451f4e0671decc536c489ef5359b17a3d0f70a046f7e73d4528afcdc91cb11cb1bedd78cc8e493ffaf8c97c7f7ffff61fe68d1e7ffa713fba3451f7c8e017f9361a679ebff0543fe79933fa1ffe8c3200b8e2f2c2196d40fa5cc69ac6631e7478b3e3f5af4a16111526ef18648a2eb323a7f3fa4459f93fddd873bf79eee3dbd79d1e73e35f8d1a24f20fb44587fa4cc41378f5510fb2687aabfff90c61acacefb8f56b1dd385c6df3b3305e12c5afb7f6e10dfb6b86188af6cfd5c07fb4e8239f0c8f94b4e3cf0fa7c50df9478b3e3f0f46fca3451f282a7fc0df5c0641fefe7fc340c923a7a1768df28f167d7a6ee9ffab167dbad4e8d2483efd101afd68d18706f0ffb7e1fe68d187b0ffffc758fdd1fe68d1e74672396279a3fd9a11997cf2ff95f1f2f8feff3fcc1f2dfafcff74627fb4e883cf31e06f32cc346ffdbf60c83f6ff227f41f7d1864c1f18525c492faa194398dd52ce6fc68d1e7478b3e342c42ca2dde1049745d46e7ef87b2e873ffdea7bbc7bbbbf74eefeddebce8f32935f8d1a24f20fb44587fa4cc41378f5510fb2687aabfff90c61acacefb8f56b1dd385c6df3b3305e12c5afb7f6e10dfb6b86188af6cfd5c07fb4e8239f0c8f94b4e3cf0fa7c50df9478b3e3f0f46fca3451f282a7fc0df5c0641fefe7fc340c923a7a1768df28f167d7a6ee98f167d08efffbf8d92e2cf1f2dfa10eaff7f1be88f167d9c0bea2936f8a17dcde6c528f4bd02c19bdf1cb594223f77e472c4f246fb352332f9e4ff2be3e5f1fdff7f983f5af4f9ffe9c4fe68d1079f63c0df649869defa7fc1907fdee44fe83ffa30c882e30b4b8825f54329731aab59ccf9d1a2cf8f167d685884945bbc2192e8ba8ccedf0f6bd1e7c1c9c37bc7c70727372ffa3ca0063f5af409649f08eb8f9439e8e6b10a62dfe450f5f71fd25843d979ffd12ab61b87ab6d7e16c64ba2f8f5d63ebc617fcd1043d1feb91af88f167de493e1919276fcf9e1b4b821ff68d1e7e7c1887fb4e80345e50ff89bcb20c8dfff6f182879e434d4ae51fed1a24fcf2dfdd1a20fe1fdffb75152fcf9a3451f42fdff6f03fdd1a28f73413dc5063fb4afd9bc1885be572078f39ba39652e4e78e5c8e58de68bf6644269ffc7f65bc3cbeffff0ff3478b3eff3f9dd81f2dfae0730cf89b0c33cd5bff2f18f2cf9bfc09fd471f0659707c6109b1a47e28654e63358b399d459f0f5df42188d4cd8f167df0894c1fe1f3a3459f9b177d1e3eddbbf7e06467efdefdfb9f3e1858f4c16acf3dfae63d577b8a8e921381a7cf64b64450553a0912d129f8e83d255e3f619197d63fab124fe4d461665779532d288dde34cff3cbbca4017a83fe06dd14f9db1bb27cc02356883fa4218782e38d363ac582a63f58c576e368b58d375cfde4e764bc6d56949e29c358bde08bbee8b33f4999f7c6d7347e3aceff9753caa7d5bc98cdf2e577f3e2620e7ba7c3c7986fe9d5e947c190f5b3ff578d993e0a14217f4c5adfb771faaa6fb8a889e94cff747de9076c4aba7f079684c8f7ff7ed372f0f064e7f864efe9fd074f0e4e36989683fbe08af7342e0ce3ec6b5a1891a080c3e423c760f2f7007fc9973fabec4534f547ca7ec9cd6315c4bec9a1eaef3fa4b1fe7fdbb090147ebd15756fd85f3371a568ff5c0dfcbcfe7a03a705aafca2faf990b626c5f8e1de807cb271c43aaaff370c7995d548789c2da72585961d55fd4d663ce4efff370cf98795e391bfffdf30e2326bda57f9b2bae4a5e6a724cf34406fd4f8e44db1c8bf3c3f6f723884828260ada8fe7f76f0350d9a15953fe0ff3f067c94e7a1a1768df2e779755167abf9356786e83be9587055043f74c80ae6e760ccd96c4679324f6963c837057d4d5be7797b1c7b55943c7d26a8caf074bc1f4824f9e0e78046538911fe7f3e4aca6ab63945249705929bffbf1fee140b323f1f7cb215a5adb3f20459e3ff9f8ed51f6d5d550b4f25755c504fb1c10fed6b362f46a1ef1508defce6a8a514f9b92397239637daaf1991c927ff5f192f8fefffffc39c644dfe8a94390dcb1bea37e8b299b7fedf30565a596306f6841ea3fdffe5c436659eaf9a13582e1a9937da5b269d05f1ffcf8cf68714669ab7fe5f30e49f37f913fa8f3e0cb2e0f8c2126249fd50d29cc67abe5e32098e2f2eeafc42e233e28df582be6bf377b4da2f3d987602862d3ba79383b08e02b8bc5e55a5fc4d5f15e888be508acfccda3ead0360b9ffa3477be31d824db8ccb1f4693a5b6417cba2a57c8ff9c0be484b10757e9ed7b4549173c0f832ab090dea96c02fae0917039b46fed4beb5bbb333dea1350762000129142202b965965ffc5126a2f0655d5c14f8e47b1f7deb236ab5c8de1d5fe467cbd7f9b45ac29f6100445f7f45c692b6715af10b38851403f2f4113e67cbf3e2dd17593b9dd31f6855adeb69fe0cb40408df5fa06f5dca9e7115283977467f3a1ed00f787da7fb77b0bc432cfdff81f59e67f7f61f9c9edebfbf7bff6964bd6795d7e7bcde435ffc68b127907922a83f52e69c9bc72a887d9343d5df7f48630d65e6fd47abd86e1caeb6f959182f89e0d75bf3f086fd35430b45fbe76ae03f5aec914f86474a5af1e787b3e286fca3c59e9f0723fed1620f14953fe06f2e73207fffbf61a0e489d350bb46f9478b3d3db7f4478b3d84f7ffdf464971e78f167b08f5ffbf0df4478b3dce05f5141bfcd0be66f36214fa5e81e0cd6f8e5a4a919f3b72396279a3fd9a11997cf2ff95f1f2f8feff3fcc1f2df6fcff74627fb4d883cf31e06f32cc346ffdbf60c83f6ff227f41f7d1864c1f18525c492fa918cb959c4f9d162cf8f167b685884945bb42192e87a8ccedf0f61b1e7e1a74f1fec9e3c39b8ffe47477afb7d8d36c37195ccc6d961efaf23d177cbe0d203f8b0b3ee6ada8e0cbaf8c7957c2a5e7eea766cacddf6ececd275db927a2fa2365eeb979ac82983f541dc77b8e553fe1c1eaef5f6bb4c498e385e134c2f57dc6fd34f765e8fff7238f8ffcf73ff794ee074dfb0f75da6901e8eb4efb09f9e33f9b6b403a2e6fd4d2e2c307fd01bcfee6ffebeecc870c9e0c3fdcd79ffd8521f3d6373e7af9fb7dc6fcfc1b5e27d18f360e5ffef646af2ffd1c0c9f826e9a711a963fe46f2eec96bfbd91ca073f07038da6febde41a7dd1f76d48e03f70d54007b99148dac6a3927ef2c164fa106570226ee7fb0f593e79cf114b8b9fd301bffe61ac26e8e0fedf35f29714db653fabf9761dd9ffbb86cd59a99f17fe8d3feae72eb7e00dfbffdf4bc6af3e6c89c50b03e87b0582376fc92c3ad88dd4d2363f0be47a7f767184f346fef32f000243d02bef3f64f9e43d472c2d3e7cc01f30db4f7e1eadc23ca1a424f3b5a71730daff9f4ff1eb0deb319feed347d2b9e0ab48febf65dcf2f77b8df6e7df7acccfc304863ffca233cb3262fa4cba154c153d7fc4fa513064fd6cd398f5930f1eb4fc7df350dd40ebff9f8f94d652fa8b6df4217de6d697f4d56f7ad14803febb1a02db3fa135395e607ff2aefa07fa07e48ed1966e041bfad30d553fe055a4eedfc12212cddeff075695ee1f1c3f78f6e0e1b34f1f3c3bf55795ea3ca3d94230bdbdfed0c5a592961ba9ddd75d5ed28f025e1735755b5697d68c7d97a7a5efeea766f6cddf6efacd275d4e27faea6827398d3e182859e57b7bf491f415a0e78f53b0dc384cf9db1ba57cc08354883fac5166edfce7c130c395676fb051e61534fdc12ab61b47ab6dbce1ea271f3c5e5239ef6985a323fffd49f1fe7f70f0b3fc1b19fccfbb88d91f7c8197ff3f37f8a2fd46064fdecaff07079f37dfc8e05725bdfcffb9c1afca6f64f0cb1b074f6fc8b0fe5f34f8e5d71f7cf38bf8156fbeff7f69cdb3ebe6cbe517b440ce8bc0ff3f1f2dbcf7f56d5498a2f59e03356ffdbf61a41cfad1a86e1aa960e80f54117dcf91ea271f3cd40f71d096ebc584dafdfc1a74c36bf9f4d2cfa741af97ffdf74c33e60c83cd69b87ace8f96396f1bde790a5c5078f58fe7e9f714e258173d33805bfffb70cf34326b6ce2fc8c1a2977efe0c792a19c713e42f6f1eb762e90f5c3f7acf91eb271f3c74f9fb7d06bcaa9af696a39561f883954fde73acd2e283874ae6255bceb27a362ed7d37c8901bccfb8cb6a9a217ca0d7bc717f9e571775b69a5fbfac0a5eaf132c0471c5f63d09207f7be357301f4c00f9fb7dc6bcaa8baee745bef437b408297f7be3940f7e0e86d9cec9db5a66c56de242c5cc1fab7eb471b0dac61bad7ef273315cac83d891febc587f74835fe5152d76d04b1f367c45ff3dc7af9f7c38013e4c9555f54546cb5bacce3e9c137420ffdf2485d1ea3fcfc940fdafe675d6f849d19f8f7428b3e5c53abbc06b4a053774fa4c7a178c654cffbf19795b67cba6a415e1d9efdfe6efa055ff3f4700b20a5f6be8aba2f8fd735a4d6f8b0dec7f526191fcdd1bfa1232d05f07ffff2ad53e906d30dc9f77a36ed6131ef1cfbb8157e7e74d37434711c16db2ebfad1cfd1b8e5eff7196a992f2fda398debffff436da6550d4ef046fab45a03297a8b7b0b30fcffde50fdc12eb2e6edff878ddcd791dfefd34734c534ba977545632133471f8f287755375ff29a287da0afae2f2ef286064b9f38dbd638b27c81d4cf23c588209e2dcf8b775f64ed744e7fa015afd63c33e6d12d643426b9af59519b2bf4134a884c195f812f68d09f6e8cfa415bbdcd298409ff7ec6d3a49fd00cd6c107f9725a5ff3687f2fcc828eb75814655603a547bff8a3dfb39a656d3656a6f8f12f4c8c393efec1bacec7af9902e3275fecdd7feddea359dd35e026f2cb2f21c0f922239f626a3eb0c089232e08f8effbd1cebb83a70fef1f1c3f383e7e76727aef60eff7fd886029c55b9a04669026abb39fce16197d35cbcfb375d9bea669235aeb54525bfaaaef8e1433fa580732c8ddca890487c8147cf401ec2dad19f92e1f4bdfdd4fcd5c9bbf9795996cf3c937ced03df2861c8e2682157571138713a5192379413aa23fff3fcfb2dfff25ff0fdd5ae62e07010100"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'f02e5044-b9e6-48ac-aaee-1cddaa3ebd90', + 'elapsed-time', + '236', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:18 GMT', + 'Content-Length', + '4917' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.json deleted file mode 100644 index 251b7762ef5c..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes.json +++ /dev/null @@ -1,3079 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "47b1b04d-9ac8-4439-99db-6c263f249aec" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "47b1b04d-9ac8-4439-99db-6c263f249aec", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fe4cf572-87ad-470b-92dd-9579b62c1fb8" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A4E8B5D82C\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fe4cf572-87ad-470b-92dd-9579b62c1fb8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E8B5D82C\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "042a8242-3964-4f5b-adb1-089d1be3a523" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "22", - "ETag": "W/\u00220x8D9E2A4E8BA1D4C\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "042a8242-3964-4f5b-adb1-089d1be3a523", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E8BA1D4C\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "0c845c6d-c970-457f-8f5d-239575faf63c" - }, - "RequestBody": { - "name": "hotel-live-test74746", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "620", - "ETag": "W/\u00220x8D9E2A4E9185C04\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test74746\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "0c845c6d-c970-457f-8f5d-239575faf63c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4E9185C04\u0022", - "name": "hotel-live-test74746", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "cb2d8fa1-1bb8-47bc-aa42-34465e7c0f8c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "41515", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:00 GMT", - "elapsed-time": "364", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "cb2d8fa1-1bb8-47bc-aa42-34465e7c0f8c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes", - "value": [ - { - "@odata.etag": "\u00220x8D9E29C78B084A8\u0022", - "name": "hotel-live-test1", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E29E4A44833F\u0022", - "name": "hotel-live-test2", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E2A14026D526\u0022", - "name": "hotel-live-test21297", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E2A14801B25E\u0022", - "name": "hotel-live-test22884", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E29B61E88EBC\u0022", - "name": "hotel-live-test3", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E2985986F248\u0022", - "name": "hotel-live-test322", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E2A0109ED0D0\u0022", - "name": "hotel-live-test420", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E29F20782150\u0022", - "name": "hotel-live-test688", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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", - "normalizer": null, - "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", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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, - "normalizer": 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": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": null - }, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E2A4E9185C04\u0022", - "name": "hotel-live-test74746", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - }, - { - "@odata.etag": "\u00220x8D9E29F28587C0F\u0022", - "name": "hotel-live-test758", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test74746\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "05cd662e-d885-4317-addb-b5e873e80543" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:00 GMT", - "elapsed-time": "173", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "05cd662e-d885-4317-addb-b5e873e80543", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "afd41df1-467d-44b3-95a5-e485b522affb" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "14", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "afd41df1-467d-44b3-95a5-e485b522affb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c79b22d4-7eff-4202-9a67-f3485185908b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "c79b22d4-7eff-4202-9a67-f3485185908b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test74746" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.js new file mode 100644 index 000000000000..5ace86705407 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "1b4fe2da28d70a753bc1115dbce11860"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/indexes') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f97375bcb6c91dff968f4d16556aef38f1e7def177f844f00b56af372bb2c2ef3ed265bacca7c1bf0ef7df44b463734d9bfb9c9fd9b9b7c7a739307034df0dd109ef8eee0fe5effdb555e9ff3b7bdaf1ad32793ccffbaceb392dec8da7c7b3ddc0a40f9c326abb39fce16d947bfe4fbbfe4ff01b8321fa2c7010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'cb28642d-8e97-4384-b4d1-85c4953a1c36', + 'elapsed-time', + '37', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:27 GMT', + 'Content-Length', + '295' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.json deleted file mode 100644 index 7cdb0b4765d7..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_gets_the_list_of_indexes_names.json +++ /dev/null @@ -1,449 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a052964b-db67-4947-93a8-f05af19de3a7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a052964b-db67-4947-93a8-f05af19de3a7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "304e2bbd-6306-4873-be32-5fedfaee3fc6" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A4EE44AB48\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "304e2bbd-6306-4873-be32-5fedfaee3fc6", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4EE44AB48\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b8f645b9-ba18-44ca-a336-73fae346cbcc" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4EE487B49\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "b8f645b9-ba18-44ca-a336-73fae346cbcc", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4EE487B49\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "895dfe2f-22f3-428b-a841-639f00a217fb" - }, - "RequestBody": { - "name": "hotel-live-test92858", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:04 GMT", - "elapsed-time": "654", - "ETag": "W/\u00220x8D9E2A4EEABC252\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test92858\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "895dfe2f-22f3-428b-a841-639f00a217fb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4EEABC252\u0022", - "name": "hotel-live-test92858", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "01c32553-3e8b-4368-bbd9-00aa982fdc68" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "371", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:09 GMT", - "elapsed-time": "27", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "01c32553-3e8b-4368-bbd9-00aa982fdc68", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes(name)", - "value": [ - { - "name": "hotel-live-test1" - }, - { - "name": "hotel-live-test2" - }, - { - "name": "hotel-live-test21297" - }, - { - "name": "hotel-live-test22884" - }, - { - "name": "hotel-live-test3" - }, - { - "name": "hotel-live-test322" - }, - { - "name": "hotel-live-test420" - }, - { - "name": "hotel-live-test688" - }, - { - "name": "hotel-live-test758" - }, - { - "name": "hotel-live-test92858" - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test92858\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b608bbf3-e6da-46b0-959a-ac596772253f" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:09 GMT", - "elapsed-time": "160", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b608bbf3-e6da-46b0-959a-ac596772253f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b86c5165-ac99-4e35-bfb4-783a1372ac3f" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b86c5165-ac99-4e35-bfb4-783a1372ac3f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "d7cdfa94-5abe-4f3a-8779-cf3864375784" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:13 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "d7cdfa94-5abe-4f3a-8779-cf3864375784", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test92858" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.js new file mode 100644 index 000000000000..9243f42e3208 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.js @@ -0,0 +1,107 @@ +let nock = require('nock'); + +module.exports.hash = "519361aa90cd30f52b9baa528fb4cd71"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test3')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f9737777fb77cd916edf5472303971a5c10d0dff7a39d77074f1f3eddbbf7e0e9c9fed3d39d27a7bfef47d46a992d72fa7a5eb579b95d1697f936babd47dfccf2f36c5db6afa7555d2c2f5ed6d5795152d3e5ba2c471f9d1779396b3e7af4bd5f6c2014337aa7bd5ee1f7d3d962fcbac56bf499a09d4df0f279563639de2edbbc0e3eaa736a9f5fca676dbda68f9aaa6ee56f6d739e4d6934fe276ff36bd39a0970bccccaeb1fe4b54153faee7e9a75fe5e56f5222b0bef93e67a592daf175f642b8cf1fbbf646487995de54db5c89779d33ccf2ff39206e80dfa69b5067a04803b0e70f5072d286f1cb3fced0d593ee0112bc41fd290677933ad8b555b544b1a9937dae8140b9afe6015db8da3d536de70f5939f93f1b6595136342e6fac27d56255e6efdee013c2b3c7fe2465de1b275559e653506c0b2f0ba1eed0f782ad8c5068f0ff3d4af9b49a17b359befc6e5e5ccc5b1a9e0e1f633e5bb6f7f6e823e935c0f4a621eb67ffaf1a337d142842fe78f4117dd67cc9a2411fe8abeb8b0b52a1794d9fa089e94cff747de9076df5365f76ff7ec624d24f887c75f041be9cd6d7dcebef050268bfc5a228b31acaff91b52a3a213ffe4531adaba63a6fc7c73f58d7f9f835d365fce48bbdfbafdd7b44d05d036e22bffc12029c2f32322a53fde0ff01f82fc1d9b2060000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237DC4DE0BE"', + 'Vary', + 'Accept-Encoding', + 'request-id', + '9c3b446d-0cbd-4aad-89c8-2720af8685b3', + 'elapsed-time', + '45', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:46:04 GMT', + 'Content-Length', + '663' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .put(`/indexes('hotel-live-test3')`, {"name":"hotel-live-test3","fields":[{"name":"id","type":"Edm.String","key":true,"retrievable":true,"searchable":false,"filterable":false,"sortable":false,"facetable":false,"analyzer":null,"searchAnalyzer":null,"indexAnalyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"awesomenessLevel","type":"Edm.Double","key":false,"retrievable":true,"searchable":false,"filterable":true,"sortable":true,"facetable":true,"analyzer":null,"searchAnalyzer":null,"indexAnalyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"description","type":"Edm.String","key":false,"retrievable":true,"searchable":true,"filterable":false,"sortable":false,"facetable":false,"analyzer":null,"searchAnalyzer":null,"indexAnalyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"details","type":"Edm.ComplexType","fields":[{"name":"tags","type":"Collection(Edm.String)","key":false,"retrievable":true,"searchable":true,"filterable":false,"sortable":false,"facetable":false,"analyzer":null,"searchAnalyzer":null,"indexAnalyzer":null,"normalizer":null,"synonymMaps":[]}]},{"name":"hiddenWeight","type":"Edm.Int32","key":false,"retrievable":false,"searchable":false,"filterable":false,"sortable":false,"facetable":false,"analyzer":null,"searchAnalyzer":null,"indexAnalyzer":null,"normalizer":null,"synonymMaps":[]},{"name":"lastUpdatedOn","type":"Edm.DateTimeOffset","searchable":false,"filterable":true,"sortable":false,"facetable":false}],"scoringProfiles":[],"defaultScoringProfile":null,"corsOptions":null,"suggesters":[],"analyzers":[],"tokenizers":[],"tokenFilters":[],"charFilters":[],"normalizers":[],"encryptionKey":null,"similarity":{"@odata.type":"#Microsoft.Azure.Search.BM25Similarity","k1":null,"b":null},"semantic":null,"@odata.etag":"\"0x8D9D237DC4DE0BE\""}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f9737777fb77cd916edf5472303971a5c10d0dff7a39d77074f1f3eddbbf7e0e9e9d3bdfb07c70f7fdf8fa8d5325be4f4f5bc6af372bb2c2ef36d747b8fbe99e5e7d9ba6c5f4fabba585ebcacabf3a2a4a6cb75598e3e3a2ff272d67cf4e87bbfd8402866f44e7bbdc2efa7b3c5f8758bd7e833413b9be0e5f3ac6c72bc5db6791d7c54e7d43ebf94cfda7a4d1f3555ddcadfdae63c9bd268fc4fdee6d7a63513e0789995d73fc86b83a6f4ddfd34ebfcbdacea455616de27cdf5b25a5e2fbec85618e3f77fc9c80e33bbca9b6a912ff3a6799e5fe6250dd01bf4d36a0df40800771ce0ea0f5a50de3866f9db1bb27cc02356883fa421cff2665a17abb6a89634326fb4d1291634fdc12ab61b47ab6dbce1ea273f27e36db3a26c685cde584faac5aaccdfbdc12784678ffd49cabc374eaab2cca7a0d8165e1642dda1ef055b19a1d0e0ff7b94f269352f66b37cf9ddbcb898b7343c1d3ec67cb66cefedd147d26b80e94d43d6cffedf346637e2326bdaaf56a45af3d9971d79784a1fbe2916f997e7e74d0e7248ef01c6fed8656a83a1cb47ff6f1af9f7e9a3c004f0c7a38fe8b3e64b560af481bebabeb820e391d7f4099a98cef44fd7977ed0566ff365f7ef674c20fd848857071fe4cb697dcdbdfe5e2080f65b2c8a32ab61f61e597baaf3f2e35f14d3ba6aaaf3767cfc83759d8f5f335dc64fbed8bbffdabd4704dd35e026f2cb2f21c0f92223733ad50ffe1fc57715eeac070000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237DED258A9"', + 'Vary', + 'Accept-Encoding', + 'request-id', + '16872f9b-fb13-4b49-91e8-7f3353f45491', + 'elapsed-time', + '125', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:46:04 GMT', + 'Content-Length', + '707' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('hotel-live-test3')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195eff71fa307f9737777fb77cd916edf5472303971a5c10d0dff7a39d77074f1f3eddbbf7e0e9e9d3bdfb07c70f7fdf8fa8d5325be4f4f5bc6af372bb2c2ef36d747b8fbe99e5e7d9ba6c5f4fabba585ebcacabf3a2a4a6cb75598e3e3a2ff272d67cf4e87bbfd8402866f44e7bbdc2efa7b3c5f8758bd7e833413b9be0e5f3ac6c72bc5db6791d7c54e7d43ebf94cfda7a4d1f3555ddcadfdae63c9bd268fc4fdee6d7a63513e0789995d73fc86b83a6f4ddfd34ebfcbdacea455616de27cdf5b25a5e2fbec85618e3f77fc9c80e33bbca9b6a912ff3a6799e5fe6250dd01bf4d36a0df40800771ce0ea0f5a50de3866f9db1bb27cc02356883fa421cff2665a17abb6a89634326fb4d1291634fdc12ab61b47ab6dbce1ea273f27e36db3a26c685cde584faac5aaccdfbdc12784678ffd49cabc374eaab2cca7a0d8165e1642dda1ef055b19a1d0e0ff7b94f269352f66b37cf9ddbcb898b7343c1d3ec67cb66cefedd147d26b80e94d43d6cffedf346637e2326bdaaf56a45af3d9971d79784a1fbe2916f997e7e74d0e7248ef01c6fed8656a83a1cb47ff6f1af9f7e9a3c004f0c7a38fe8b3e64b560af481bebabeb820e391d7f4099a98cef44fd7977ed0566ff365f7ef674c20fd848857071fe4cb697dcdbdfe5e2080f65b2c8a32ab61f61e597baaf3f2e35f14d3ba6aaaf3767cfc83759d8f5f335dc64fbed8bbffdabd4704dd35e026f2cb2f21c0f92223733ad50ffe1fc57715eeac070000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237DED258A9"', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'db8c3882-5950-4d9e-924f-5c40910e0863', + 'elapsed-time', + '20', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:46:04 GMT', + 'Content-Length', + '707' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.json deleted file mode 100644 index f3a1ebb92ac0..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_modify_and_updates_the_index_object.json +++ /dev/null @@ -1,930 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f77e498b-194a-4d1e-ab1a-242c2f384969" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:40 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f77e498b-194a-4d1e-ab1a-242c2f384969", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7374c3f6-5eac-4b1a-8d7e-27bdc1d857c5" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:41 GMT", - "elapsed-time": "19", - "ETag": "W/\u00220x8D9E2A50434EEB6\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7374c3f6-5eac-4b1a-8d7e-27bdc1d857c5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A50434EEB6\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "58d0b7ff-b210-40bf-9478-bb120f4b4b2f" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:41 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A50438E5BF\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "58d0b7ff-b210-40bf-9478-bb120f4b4b2f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A50438E5BF\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "705", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "2e0b17df-c868-4158-82b8-720ac84617e4" - }, - "RequestBody": { - "name": "hotel-live-test104402", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1693", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:41 GMT", - "elapsed-time": "642", - "ETag": "W/\u00220x8D9E2A5049A313C\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test104402\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "2e0b17df-c868-4158-82b8-720ac84617e4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5049A313C\u0022", - "name": "hotel-live-test104402", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104402\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3db4521a-c956-4d39-9f1d-8102910ee7c7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "1693", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:45 GMT", - "elapsed-time": "17", - "ETag": "W/\u00220x8D9E2A5049A313C\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3db4521a-c956-4d39-9f1d-8102910ee7c7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5049A313C\u0022", - "name": "hotel-live-test104402", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104402\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "1756", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7752d3f6-0faf-448d-bda6-6a4fdf0e7d09" - }, - "RequestBody": { - "name": "hotel-live-test104402", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "retrievable": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": null, - "searchAnalyzer": null, - "indexAnalyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "key": false, - "retrievable": true, - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true, - "analyzer": null, - "searchAnalyzer": null, - "indexAnalyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "key": false, - "retrievable": true, - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": null, - "searchAnalyzer": null, - "indexAnalyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "key": false, - "retrievable": true, - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": null, - "searchAnalyzer": null, - "indexAnalyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "key": false, - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false, - "analyzer": null, - "searchAnalyzer": null, - "indexAnalyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "lastUpdatedOn", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "sortable": false, - "facetable": false - } - ], - "scoringProfiles": [], - "defaultScoringProfile": null, - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "normalizers": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null, - "@odata.etag": "\u00220x8D9E2A5049A313C\u0022" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "1943", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:45 GMT", - "elapsed-time": "180", - "ETag": "W/\u00220x8D9E2A5071D2184\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7752d3f6-0faf-448d-bda6-6a4fdf0e7d09", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5071D2184\u0022", - "name": "hotel-live-test104402", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "lastUpdatedOn", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104402\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "50da59cf-aa9f-4cec-829a-8da2d26b4d82" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "1943", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:45 GMT", - "elapsed-time": "16", - "ETag": "W/\u00220x8D9E2A5071D2184\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "50da59cf-aa9f-4cec-829a-8da2d26b4d82", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A5071D2184\u0022", - "name": "hotel-live-test104402", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "lastUpdatedOn", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test104402\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "08b0f207-328e-4769-bbbd-810c605926b4" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:46 GMT", - "elapsed-time": "136", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "08b0f207-328e-4769-bbbd-810c605926b4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c9964910-508f-440a-8651-e26f3cf48c9f" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:50 GMT", - "elapsed-time": "13", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "c9964910-508f-440a-8651-e26f3cf48c9f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ade6375c-088a-4ac5-932c-39a94fbda9d8" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:50 GMT", - "elapsed-time": "10", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "ade6375c-088a-4ac5-932c-39a94fbda9d8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test104402" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.js new file mode 100644 index 000000000000..8d50f13950eb --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.js @@ -0,0 +1,35 @@ +let nock = require('nock'); + +module.exports.hash = "8fbfba173bf28395c6b1a5ab8885277c"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/indexes('garbxyz')`) + .query(true) + .reply(404, {"error":{"code":"","message":"No index with the name 'garbxyz' was found in the service 'testsearchcases'."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Language', + 'en', + 'Expires', + '-1', + 'request-id', + '10fa4297-9f6e-4990-a79c-6f81bb9b2902', + 'elapsed-time', + '20', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:45 GMT', + 'Content-Length', + '110' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.json deleted file mode 100644 index d38a46430b5e..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_indexes/recording_throws_error_for_invalid_index_object.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f6bee2a8-8a2c-4ed6-8566-911bdba8584d" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f6bee2a8-8a2c-4ed6-8566-911bdba8584d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f64c1266-9664-46ac-b70c-68daf90d9e0b" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "23", - "ETag": "W/\u00220x8D9E2A4F90069D7\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f64c1266-9664-46ac-b70c-68daf90d9e0b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4F90069D7\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "29bf0fcf-9ce3-4b09-8a7f-e06b4cb227a9" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4F90412CA\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "29bf0fcf-9ce3-4b09-8a7f-e06b4cb227a9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4F90412CA\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "31da933f-73be-4ba7-820b-c076e1ec9edd" - }, - "RequestBody": { - "name": "hotel-live-test68630", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:22 GMT", - "elapsed-time": "623", - "ETag": "W/\u00220x8D9E2A4F962788A\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test68630\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "31da933f-73be-4ba7-820b-c076e1ec9edd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4F962788A\u0022", - "name": "hotel-live-test68630", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027garbxyz\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "24def429-d164-491a-a81f-1dbd4be94c13" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Language": "en", - "Content-Length": "109", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:27:27 GMT", - "elapsed-time": "18", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "24def429-d164-491a-a81f-1dbd4be94c13", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "error": { - "code": "", - "message": "No index with the name \u0027garbxyz\u0027 was found in the service \u0027harshan-search\u0027." - } - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test68630\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "b42977c9-926c-40dd-9646-bad79f9ebe4d" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:27 GMT", - "elapsed-time": "163", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "b42977c9-926c-40dd-9646-bad79f9ebe4d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "993bfe98-2d5f-4e51-8eb3-fbe5d4278bb7" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "14", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "993bfe98-2d5f-4e51-8eb3-fbe5d4278bb7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "819295a5-9b62-485c-970b-cddd73c38244" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:27:31 GMT", - "elapsed-time": "13", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "819295a5-9b62-485c-970b-cddd73c38244", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test68630" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.js new file mode 100644 index 000000000000..74b01eb13a1c --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.js @@ -0,0 +1,91 @@ +let nock = require('nock'); + +module.exports.hash = "6a8f4d752b331e0e30fd48d901a6ac23"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .put(`/synonymmaps('my-azure-synonymmap-3')`, {"name":"my-azure-synonymmap-3","format":"solr","synonyms":"United States, United States of America => USA\nWashington, Wash. => WA"}) + .query(true) + .reply(201, {"@odata.context":"https://endpoint/$metadata#synonymmaps/$entity","@odata.etag":"\"0x8D9D237B7965604\"","name":"my-azure-synonymmap-3","format":"solr","synonyms":"United States, United States of America => USA\nWashington, Wash. => WA","encryptionKey":null}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237B7965604"', + 'Location', + "https://endpoint/synonymmaps('my-azure-synonymmap-3')?api-version=2021-04-30-Preview", + 'request-id', + '06bd1fe4-ad3e-4f31-81fe-370878e1a7d2', + 'elapsed-time', + '29', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:59 GMT', + 'Content-Length', + '284' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/synonymmaps('my-azure-synonymmap-3')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd5dcfdddf2655bb4d71f8d0c6c6a7441807fdf8f76de1d3c7df874efde83270f1e7e7affd39dfddff7236ab5cc16397dbdb8dece7eb0aef36d076bfb1e7d7d5ed58b0c88355559d3dffa75439f7cb52cda7c96be6e33427694067fa6d5797abcc8eb629aa59f1da55fbd3efe7d97dfcd9a79b1bc68abe528c5ef637cf3dd63029a2fa7f5f5aa2daae5ef955f7ff468b92ecb5ff2ff0070ea15c01c010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237B7965604"', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'bcb09cc4-023f-47d8-b442-f3065b362a16', + 'elapsed-time', + '10', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:59 GMT', + 'Content-Length', + '335' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .delete(`/synonymmaps('my-azure-synonymmap-3')`) + .query(true) + .reply(204, "", [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Expires', + '-1', + 'request-id', + 'a4b03dd3-5f1a-4bd7-80ad-66b4a0c5b0a5', + 'elapsed-time', + '16', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:59 GMT' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.json deleted file mode 100644 index 5620ed6769e3..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_creates_the_synonymmap_object_using_createorupdatesynonymmap.json +++ /dev/null @@ -1,491 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "81dc8aa6-66a1-4784-9df4-e3558e227161" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "81dc8aa6-66a1-4784-9df4-e3558e227161", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a13d1259-1ce7-42dd-9f44-e2aaae331c2d" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "22", - "ETag": "W/\u00220x8D9E2A4DDD7A29C\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a13d1259-1ce7-42dd-9f44-e2aaae331c2d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4DDD7A29C\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "5ccc5850-2f75-480a-b3be-7751fe839f56" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4DDDB99A3\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "5ccc5850-2f75-480a-b3be-7751fe839f56", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4DDDB99A3\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a07e895d-0abb-474f-8f19-7ea75a054909" - }, - "RequestBody": { - "name": "hotel-live-test90486", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "787", - "ETag": "W/\u00220x8D9E2A4DE528CD5\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test90486\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a07e895d-0abb-474f-8f19-7ea75a054909", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4DE528CD5\u0022", - "name": "hotel-live-test90486", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-3\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "99cfd8ad-8b12-45b6-babb-91a757bca1b3" - }, - "RequestBody": { - "name": "my-azure-synonymmap-3", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:42 GMT", - "elapsed-time": "24", - "ETag": "W/\u00220x8D9E2A4E0BC2CCA\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-3\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "99cfd8ad-8b12-45b6-babb-91a757bca1b3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E0BC2CCA\u0022", - "name": "my-azure-synonymmap-3", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-3\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fc3787c3-747a-4996-a77e-abb400cd6c21" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:42 GMT", - "elapsed-time": "6", - "ETag": "W/\u00220x8D9E2A4E0BC2CCA\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fc3787c3-747a-4996-a77e-abb400cd6c21", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E0BC2CCA\u0022", - "name": "my-azure-synonymmap-3", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-3\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c80dcd9c-a35d-448b-a5c4-a724c6558376" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:42 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "c80dcd9c-a35d-448b-a5c4-a724c6558376", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test90486\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "dfcd7df8-5bbb-4ca6-87d6-7eb3a9be37b5" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:42 GMT", - "elapsed-time": "142", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "dfcd7df8-5bbb-4ca6-87d6-7eb3a9be37b5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "d02f309c-cc72-410a-af83-d58fc4fd2218" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:45 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "d02f309c-cc72-410a-af83-d58fc4fd2218", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "0dc60564-87f3-494c-bf44-3d531c5a3dca" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:45 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "0dc60564-87f3-494c-bf44-3d531c5a3dca", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test90486" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.js new file mode 100644 index 000000000000..b1abe88a58b9 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.js @@ -0,0 +1,39 @@ +let nock = require('nock'); + +module.exports.hash = "85be222d7e7fb0850e3f0eef01fa3d9b"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/synonymmaps('my-azure-synonymmap-1')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd5dcfdddf2655bb4d71f8d0c6c6a7441807fdf8f76de1d3c7df874efde83e3870f9e3c7978bcfbfb7e44ad96d922a7af17d7dbd90fd675beed606defd2d7e755bdc88058539535fdad5f37f4c957cba2cd67e9eb3623644769f0675a9da7c78bbc2ea659fad951fad5ebe3df77f9ddac9917cb8bb65a8e52fc3ec637df3d26a0f9725a5fafdaa25afe5ef9f5478f96ebb2fc25ff0f0af03d131c010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237A97BB9A1"', + 'Vary', + 'Accept-Encoding', + 'request-id', + '459df00f-ff9c-4d49-94cf-3238a37e225a', + 'elapsed-time', + '9', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:40 GMT', + 'Content-Length', + '334' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.json deleted file mode 100644 index b1048bc779ee..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_correct_synonymmap_object.json +++ /dev/null @@ -1,423 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "696cd2e3-66b8-4433-9812-71a93d6dfc8c" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:18 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "696cd2e3-66b8-4433-9812-71a93d6dfc8c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4944152e-1fa4-4ecf-a66d-31544646e7ff" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:18 GMT", - "elapsed-time": "19", - "ETag": "W/\u00220x8D9E2A4D31A84BE\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4944152e-1fa4-4ecf-a66d-31544646e7ff", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4D31A84BE\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a2c81181-73e9-4db3-b6fc-d389189aef6c" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:18 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4D31E2DAD\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "a2c81181-73e9-4db3-b6fc-d389189aef6c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4D31E2DAD\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "317a65f2-0107-4fa9-9d66-26e2a44c2542" - }, - "RequestBody": { - "name": "hotel-live-test15141", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:20 GMT", - "elapsed-time": "608", - "ETag": "W/\u00220x8D9E2A4D37A70E7\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test15141\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "317a65f2-0107-4fa9-9d66-26e2a44c2542", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4D37A70E7\u0022", - "name": "hotel-live-test15141", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c75efebb-7a5a-4957-ba3d-9984fb3a3808" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:24 GMT", - "elapsed-time": "8", - "ETag": "W/\u00220x8D9E2A4D31A84BE\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "c75efebb-7a5a-4957-ba3d-9984fb3a3808", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4D31A84BE\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test15141\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c3d8b680-1201-459c-aaf1-c5d29badb802" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:24 GMT", - "elapsed-time": "159", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "c3d8b680-1201-459c-aaf1-c5d29badb802", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f2bcb560-4a1a-432d-af00-ede877132a55" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "f2bcb560-4a1a-432d-af00-ede877132a55", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f8b01c05-817b-453d-8a7a-64e1b34ee80c" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "f8b01c05-817b-453d-8a7a-64e1b34ee80c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test15141" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.js new file mode 100644 index 000000000000..6551e6b9be39 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "66734a1da7e1c7e96a463d9764e21e9c"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/synonymmaps') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd57c34fae8322bd7f9478fbe67a153b30b02fdfb7eb4f3eee0e9c3a77bf71e3c3c7df0e4fea74f1efebe1f51fb65b6a0e61f2daeb7b31faceb7cdb41dbdea5afcfab7a9101b5a62a6bfa5bbf6ee893af96459bcfd2d76d46e88ed2e0cfb43a4f8f17795d4cb3f4b3a3f4abd7c7bfeff2bb59332f96176db51ca5f87d8c6fbe7b4c40f3e5b4be5eb545b5fcbdf2eb8f1e2dd765f94b461b0770b0777cf0f0e4a601ecd1d73f6703f8fe2ff97f0082a380bae1010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'ce219624-d322-4753-97df-b16fc5a5b5d1', + 'elapsed-time', + '19', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:22 GMT', + 'Content-Length', + '358' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.json deleted file mode 100644 index c28cc95ca017..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps.json +++ /dev/null @@ -1,488 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "857204e3-5fec-4996-b785-f000fa095d68" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "141", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:00 GMT", - "elapsed-time": "11", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "857204e3-5fec-4996-b785-f000fa095d68", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [ - { - "name": "my-azure-synonymmap-1" - }, - { - "name": "my-azure-synonymmap-2" - } - ] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6ce8b41f-b5b5-481e-9f91-ed6e71d15724" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:00 GMT", - "elapsed-time": "28", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "6ce8b41f-b5b5-481e-9f91-ed6e71d15724", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "39d8deec-79bd-4053-afff-9990bf0f05a4" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:00 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "39d8deec-79bd-4053-afff-9990bf0f05a4", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9fc07e10-e0f1-4079-b470-7fa3bbc27bf0" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:00 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4C8769069\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "9fc07e10-e0f1-4079-b470-7fa3bbc27bf0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4C8769069\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "fb8fb788-8147-4f0a-b9c1-80aa40f5bc98" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:01 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A4C87A8770\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "fb8fb788-8147-4f0a-b9c1-80aa40f5bc98", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4C87A8770\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "d4a47012-fe81-4e2e-af13-db1844e758fa" - }, - "RequestBody": { - "name": "hotel-live-test86733", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:01 GMT", - "elapsed-time": "557", - "ETag": "W/\u00220x8D9E2A4C8CEB589\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test86733\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "d4a47012-fe81-4e2e-af13-db1844e758fa", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4C8CEB589\u0022", - "name": "hotel-live-test86733", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "dedcb8eb-417c-495b-8d0b-67c854636155" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "455", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:05 GMT", - "elapsed-time": "17", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "dedcb8eb-417c-495b-8d0b-67c854636155", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps", - "value": [ - { - "@odata.etag": "\u00220x8D9E2A4C8769069\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - }, - { - "@odata.etag": "\u00220x8D9E2A4C87A8770\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test86733\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "af61c478-e943-42f4-b766-760ffbf5ecf7" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:05 GMT", - "elapsed-time": "168", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "af61c478-e943-42f4-b766-760ffbf5ecf7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9a2f87d1-cb6e-467c-b682-c3c956d83adf" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "24", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "9a2f87d1-cb6e-467c-b682-c3c956d83adf", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "22d93a26-95b0-4c94-8e3c-243301c0196d" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "22d93a26-95b0-4c94-8e3c-243301c0196d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test86733" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.js new file mode 100644 index 000000000000..558ba1c39326 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.js @@ -0,0 +1,37 @@ +let nock = require('nock'); + +module.exports.hash = "538b9f7c59af4955f47057eddbbadea8"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/synonymmaps') + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd56c2db3457ee7a3d1479759b9ce3f7af4bd5ffc113e21c88bebedec07eb3adf76adb7773ffa25a38d0df63efa25dfff25ff0fc3457414a7000000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'cdf0bf0b-4681-4876-b387-dd0295f001de', + 'elapsed-time', + '138', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:31 GMT', + 'Content-Length', + '236' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.json deleted file mode 100644 index 8c3d5868845a..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_gets_the_list_of_synonymmaps_names.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "f56ed2b4-81c8-40f5-8f09-260b9c2205b3" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "f56ed2b4-81c8-40f5-8f09-260b9c2205b3", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9007bd33-4595-45ca-8a8a-ef566bbe1802" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "21", - "ETag": "W/\u00220x8D9E2A4CDC30D1F\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "9007bd33-4595-45ca-8a8a-ef566bbe1802", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4CDC30D1F\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "3ffd063f-7bd7-4251-8911-7aba41ae25a1" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4CDC6DD1F\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "3ffd063f-7bd7-4251-8911-7aba41ae25a1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4CDC6DD1F\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "41f17188-86f2-4493-aa2e-c97aa14eb652" - }, - "RequestBody": { - "name": "hotel-live-test98247", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:10 GMT", - "elapsed-time": "651", - "ETag": "W/\u00220x8D9E2A4CE29D612\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test98247\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "41f17188-86f2-4493-aa2e-c97aa14eb652", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4CE29D612\u0022", - "name": "hotel-live-test98247", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "64b2ee81-800f-4914-993f-733a4c4dabe7" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "141", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:15 GMT", - "elapsed-time": "7", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "64b2ee81-800f-4914-993f-733a4c4dabe7", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [ - { - "name": "my-azure-synonymmap-1" - }, - { - "name": "my-azure-synonymmap-2" - } - ] - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test98247\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e3c241dd-d66c-4f09-8a98-69ee27675e05" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:15 GMT", - "elapsed-time": "172", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "e3c241dd-d66c-4f09-8a98-69ee27675e05", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4e9c3154-203d-4232-b034-37b4346b5ce1" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:18 GMT", - "elapsed-time": "13", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "4e9c3154-203d-4232-b034-37b4346b5ce1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "1f7797e7-2682-403a-b5a5-700db4d1c259" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:18 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "1f7797e7-2682-403a-b5a5-700db4d1c259", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test98247" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.js new file mode 100644 index 000000000000..02102000cb7e --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.js @@ -0,0 +1,107 @@ +let nock = require('nock'); + +module.exports.hash = "b43f30f7265158cc6e09ca580972fef2"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/synonymmaps('my-azure-synonymmap-1')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd5dcfdddf2655bb4d71f8d0c6c6a7441807fdf8f76de1d3c7df874efde8327c7f79eeced1decffbe1f51ab65b6c8e9ebc5f576f683759d6f3b58dbbbf4f579552f3220d654654d7febd70d7df2d5b268f359fabacd08d9511afc9956e7e9f122af8b69967e76947ef5faf8f75d7e376be6c5f2a2ad96a314bf8ff1cd778f0968be9cd6d7abb6a896bf577efdd1a3e5ba2c7fc9ff03048039951c010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237BA3B2284"', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'db36be00-8dc0-4202-abe5-e698aa1202ac', + 'elapsed-time', + '8', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:08 GMT', + 'Content-Length', + '334' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .put(`/synonymmaps('my-azure-synonymmap-1')`, {"name":"my-azure-synonymmap-1","format":"solr","synonyms":"United States, United States of America => USA\nWashington, Wash. => WA\nCalifornia, Clif. => CA","encryptionKey":null,"@odata.etag":"\"0x8D9D237BA3B2284\""}) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd5dcfdddf2655bb4d71f8d0c6c6a7441807fdf8f76de1d3c7df874efde83274f778f9fdd7bb8f7fb7e44ad96d922a7af17d7dbd90fd675beed606defd2d7e755bdc88058539535fdad5f37f4c957cba2cd67e9eb3623644769f0675a9da7c78bbc2ea659fad951fad5ebe3df77f9ddac9917cb8bb65a8e52fc3ec637dfa52f4eb2b2a07e9645364a4fe857fee2e4987acb97d3fa7ad516d5f2f7caaf3f7ab45c97e52ff97f00db4e622835010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237BD1AF392"', + 'Vary', + 'Accept-Encoding', + 'request-id', + 'dad934c3-3d1e-4747-bb84-751f1bbdff9c', + 'elapsed-time', + '21', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:08 GMT', + 'Content-Length', + '351' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/synonymmaps('my-azure-synonymmap-1')`) + .query(true) + .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147bf6735cbda6c3cad966dfeaefde8d147f3b65d358feede6df3a66df2ac9ecea759933763f97d7c552c67d555335ee6eddddf6d91b7195efff1e67a592daf178b6cd5dcfdddf2655bb4d71f8d0c6c6a7441807fdf8f76de1d3c7df874efde83274f778f9fdd7bb8f7fb7e44ad96d922a7af17d7dbd90fd675beed606defd2d7e755bdc88058539535fdad5f37f4c957cba2cd67e9eb3623644769f0675a9da7c78bbc2ea659fad951fad5ebe3df77f9ddac9917cb8bb65a8e52fc3ec637dfa52f4eb2b2a07e9645364a4fe857fee2e4987acb97d3fa7ad516d5f2f7caaf3f7ab45c97e52ff97f00db4e622835010000"], [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Encoding', + 'gzip', + 'Expires', + '-1', + 'ETag', + 'W/"0x8D9D237BD1AF392"', + 'Vary', + 'Accept-Encoding', + 'request-id', + '66247263-cdf9-40d8-987c-ca168a92328d', + 'elapsed-time', + '8', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:45:08 GMT', + 'Content-Length', + '351' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.json deleted file mode 100644 index b1e081544d73..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_modify_and_updates_the_synonymmap_object.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "de9b1521-e634-488e-b3a2-73f52ecf7184" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:45 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de9b1521-e634-488e-b3a2-73f52ecf7184", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "7e44a843-d5a8-4564-ac95-dc7f4300ae04" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:45 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4E346213C\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7e44a843-d5a8-4564-ac95-dc7f4300ae04", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E346213C\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c4962c02-e859-469f-8972-30deaf11e723" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:45 GMT", - "elapsed-time": "22", - "ETag": "W/\u00220x8D9E2A4E34A1847\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "c4962c02-e859-469f-8972-30deaf11e723", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E34A1847\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "6ec9b1db-f3ba-4929-ac45-c0ba8c2f408c" - }, - "RequestBody": { - "name": "hotel-live-test58040", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:47 GMT", - "elapsed-time": "776", - "ETag": "W/\u00220x8D9E2A4E3C0213C\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test58040\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "6ec9b1db-f3ba-4929-ac45-c0ba8c2f408c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4E3C0213C\u0022", - "name": "hotel-live-test58040", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "4d4aa236-4642-43fd-a8be-e60c75e158de" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:50 GMT", - "elapsed-time": "7", - "ETag": "W/\u00220x8D9E2A4E346213C\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "4d4aa236-4642-43fd-a8be-e60c75e158de", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E346213C\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "217", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "e0ac60d5-c432-40d1-83a7-0d8359b0d508" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA\nCalifornia, Clif. =\u003E CA", - "encryptionKey": null, - "@odata.etag": "\u00220x8D9E2A4E346213C\u0022" - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "283", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:50 GMT", - "elapsed-time": "24", - "ETag": "W/\u00220x8D9E2A4E62A8462\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "e0ac60d5-c432-40d1-83a7-0d8359b0d508", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E62A8462\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA\nCalifornia, Clif. =\u003E CA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "325242c5-e59a-42af-95e0-15471ec77a1f" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "283", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:50 GMT", - "elapsed-time": "8", - "ETag": "W/\u00220x8D9E2A4E62A8462\u0022", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "325242c5-e59a-42af-95e0-15471ec77a1f", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4E62A8462\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA\nCalifornia, Clif. =\u003E CA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test58040\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "05458bdb-f96b-4b28-a498-038cecd83058" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:50 GMT", - "elapsed-time": "159", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "05458bdb-f96b-4b28-a498-038cecd83058", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a44d6934-1f1f-4556-ab05-ad20d59efb40" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "a44d6934-1f1f-4556-ab05-ad20d59efb40", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "a6ffb284-1c6e-4970-9b46-5bc40b9b1b61" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:55 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "a6ffb284-1c6e-4970-9b46-5bc40b9b1b61", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test58040" - } -} diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.js b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.js new file mode 100644 index 000000000000..5559cb2f0f15 --- /dev/null +++ b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.js @@ -0,0 +1,35 @@ +let nock = require('nock'); + +module.exports.hash = "ccf19b9f89fdf08aa10e008ef5a026e7"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get(`/synonymmaps('garbxyz')`) + .query(true) + .reply(404, {"error":{"code":"","message":"No synonym map with the name 'garbxyz' was found in service 'testsearchcases'."}}, [ + 'Cache-Control', + 'no-cache', + 'Pragma', + 'no-cache', + 'Content-Type', + 'application/json; odata.metadata=minimal', + 'Content-Language', + 'en', + 'Expires', + '-1', + 'request-id', + 'd50208b9-0b42-4858-8fa9-93becfc6e9d1', + 'elapsed-time', + '160', + 'OData-Version', + '4.0', + 'Preference-Applied', + 'odata.include-annotations="*"', + 'Strict-Transport-Security', + 'max-age=15724800; includeSubDomains', + 'Date', + 'Fri, 07 Jan 2022 23:44:49 GMT', + 'Content-Length', + '112' +]); diff --git a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.json b/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.json deleted file mode 100644 index 579cd483b127..000000000000 --- a/sdk/search/search-documents/recordings/node/searchindexclient_synonymmaps/recording_throws_error_for_invalid_synonymmap_object.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview\u0026$select=name", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ac669ebd-6f6a-4375-8680-b64c6640d4ac" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "76", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "6", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "ac669ebd-6f6a-4375-8680-b64c6640d4ac", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps(name)", - "value": [] - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "9691f41d-546b-4071-a256-0848b695c376" - }, - "RequestBody": { - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "19", - "ETag": "W/\u00220x8D9E2A4D86887D1\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "9691f41d-546b-4071-a256-0848b695c376", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4D86887D1\u0022", - "name": "my-azure-synonymmap-1", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "133", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "54494fd1-2449-43e1-a3b1-837716be570e" - }, - "RequestBody": { - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA" - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "258", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "20", - "ETag": "W/\u00220x8D9E2A4D86C57D0\u0022", - "Expires": "-1", - "Location": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "54494fd1-2449-43e1-a3b1-837716be570e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#synonymmaps/$entity", - "@odata.etag": "\u00220x8D9E2A4D86C57D0\u0022", - "name": "my-azure-synonymmap-2", - "format": "solr", - "synonyms": "United States, United States of America =\u003E USA\nWashington, Wash. =\u003E WA", - "encryptionKey": null - } - }, - { - "RequestUri": "https://endpoint/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "Content-Length": "704", - "Content-Type": "application/json", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "324c5d44-cb2a-4497-a798-a23f2631bdd0" - }, - "RequestBody": { - "name": "hotel-live-test15368", - "fields": [ - { - "name": "id", - "type": "Edm.String", - "key": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "sortable": true, - "facetable": true - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "retrievable": false, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1692", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:28 GMT", - "elapsed-time": "813", - "ETag": "W/\u00220x8D9E2A4D8E7DE3C\u0022", - "Expires": "-1", - "Location": "https://endpoint/indexes(\u0027hotel-live-test15368\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "324c5d44-cb2a-4497-a798-a23f2631bdd0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://endpoint/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9E2A4D8E7DE3C\u0022", - "name": "hotel-live-test15368", - "defaultScoringProfile": null, - "fields": [ - { - "name": "id", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "awesomenessLevel", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "details", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "hiddenWeight", - "type": "Edm.Int32", - "searchable": false, - "filterable": false, - "retrievable": false, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [], - "corsOptions": null, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027garbxyz\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "273fe66b-f799-4021-b3b2-2948ab97ef8e" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Language": "en", - "Content-Length": "111", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Fri, 28 Jan 2022 21:26:33 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "273fe66b-f799-4021-b3b2-2948ab97ef8e", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "error": { - "code": "", - "message": "No synonym map with the name \u0027garbxyz\u0027 was found in service \u0027harshan-search\u0027." - } - } - }, - { - "RequestUri": "https://endpoint/indexes(\u0027hotel-live-test15368\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "ad05cf34-ab84-4718-b83a-040bf9fb1a0b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:33 GMT", - "elapsed-time": "158", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "ad05cf34-ab84-4718-b83a-040bf9fb1a0b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-1\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "bae91888-df1d-4bbf-a77d-1c298a438704" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "12", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "bae91888-df1d-4bbf-a77d-1c298a438704", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://endpoint/synonymmaps(\u0027my-azure-synonymmap-2\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip,deflate", - "api-key": "admin_key", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-search-documents/11.3.0-beta.5 azsdk-js-search-documents/11.3.0-beta.5 core-rest-pipeline/1.4.1 Node/v14.17.6 OS/(x64-Linux-5.4.0-1067-azure)", - "x-ms-client-request-id": "c2e23988-57e1-4b41-96f9-4e7380d270dd" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Fri, 28 Jan 2022 21:26:37 GMT", - "elapsed-time": "11", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "c2e23988-57e1-4b41-96f9-4e7380d270dd", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": { - "TEST_INDEX_NAME": "hotel-live-test15368" - } -} diff --git a/sdk/search/search-documents/test/public/node/searchClient.spec.ts b/sdk/search/search-documents/test/public/node/searchClient.spec.ts index 939042c2fb4e..f3529f160498 100644 --- a/sdk/search/search-documents/test/public/node/searchClient.spec.ts +++ b/sdk/search/search-documents/test/public/node/searchClient.spec.ts @@ -4,9 +4,9 @@ import { assert } from "chai"; import { Context } from "mocha"; import { Suite } from "mocha"; -import { Recorder } from "@azure-tools/test-recorder"; +import { Recorder, record, isPlaybackMode, isLiveMode } from "@azure-tools/test-recorder"; -import { createClients } from "../utils/recordedClient"; +import { createClients, environmentSetup } from "../utils/recordedClient"; import { SearchClient, SearchIndexClient, @@ -17,37 +17,40 @@ import { AzureKeyCredential, } from "../../../src"; import { Hotel } from "../utils/interfaces"; -import { createIndex, populateIndex, WAIT_TIME } from "../utils/setup"; +import { createIndex, populateIndex, WAIT_TIME, createRandomIndexName } from "../utils/setup"; import { delay, serviceVersions } from "../../../src/serviceUtils"; import { versionsToTest } from "@azure/test-utils"; +const TEST_INDEX_NAME = isLiveMode() ? createRandomIndexName() : "hotel-live-test1"; + versionsToTest(serviceVersions, {}, (serviceVersion, onVersions) => { onVersions({ minVer: "2020-06-30" }).describe("SearchClient tests", function (this: Suite) { let recorder: Recorder; let searchClient: SearchClient; let indexClient: SearchIndexClient; - let TEST_INDEX_NAME: string; this.timeout(99999); beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - ({ - searchClient, - indexClient, - indexName: TEST_INDEX_NAME, - } = await createClients(serviceVersion, recorder)); - await createIndex(indexClient, TEST_INDEX_NAME); - await delay(WAIT_TIME); - await populateIndex(searchClient); + ({ searchClient, indexClient } = createClients(TEST_INDEX_NAME, serviceVersion)); + if (!isPlaybackMode()) { + await createIndex(indexClient, TEST_INDEX_NAME); + await delay(WAIT_TIME); + await populateIndex(searchClient); + } + recorder = record(this, environmentSetup); + // create the clients again, but hooked up to the recorder + ({ searchClient, indexClient } = createClients(TEST_INDEX_NAME, serviceVersion)); }); afterEach(async function () { - await indexClient.deleteIndex(TEST_INDEX_NAME); - await delay(WAIT_TIME); if (recorder) { await recorder.stop(); } + if (!isPlaybackMode()) { + await indexClient.deleteIndex(TEST_INDEX_NAME); + await delay(WAIT_TIME); + } }); it("count returns the correct document count", async function () { diff --git a/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts b/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts index c81a41b8ae13..505385a4baad 100644 --- a/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts +++ b/sdk/search/search-documents/test/public/node/searchIndexClient.spec.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Recorder, isLiveMode } from "@azure-tools/test-recorder"; +import { isPlaybackMode, record, Recorder, isLiveMode } from "@azure-tools/test-recorder"; import { Context } from "mocha"; import { Suite } from "mocha"; import { assert } from "chai"; import { SearchIndexClient, SynonymMap, SearchIndex } from "../../../src"; import { Hotel } from "../utils/interfaces"; -import { createClients } from "../utils/recordedClient"; +import { createClients, environmentSetup } from "../utils/recordedClient"; import { createSimpleIndex, createSynonymMaps, @@ -18,34 +18,36 @@ import { import { delay, serviceVersions } from "../../../src/serviceUtils"; import { versionsToTest } from "@azure/test-utils"; +const TEST_INDEX_NAME = isLiveMode() ? createRandomIndexName() : "hotel-live-test3"; + versionsToTest(serviceVersions, {}, (serviceVersion, onVersions) => { onVersions({ minVer: "2020-06-30" }).describe("SearchIndexClient", function (this: Suite) { let recorder: Recorder; let indexClient: SearchIndexClient; - let TEST_INDEX_NAME: string; this.timeout(99999); beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - - ({ indexClient, indexName: TEST_INDEX_NAME } = await createClients( - serviceVersion, - recorder - )); - - await createSynonymMaps(indexClient); - await createSimpleIndex(indexClient, TEST_INDEX_NAME); - await delay(WAIT_TIME); + ({ indexClient } = createClients(TEST_INDEX_NAME, serviceVersion)); + if (!isPlaybackMode()) { + await createSynonymMaps(indexClient); + await createSimpleIndex(indexClient, TEST_INDEX_NAME); + await delay(WAIT_TIME); + } + recorder = record(this, environmentSetup); + // create the clients again, but hooked up to the recorder + ({ indexClient } = createClients(TEST_INDEX_NAME, serviceVersion)); }); afterEach(async function () { - await indexClient.deleteIndex(TEST_INDEX_NAME); - await delay(WAIT_TIME); - await deleteSynonymMaps(indexClient); if (recorder) { await recorder.stop(); } + if (!isPlaybackMode()) { + await indexClient.deleteIndex(TEST_INDEX_NAME); + await delay(WAIT_TIME); + await deleteSynonymMaps(indexClient); + } }); describe("#synonymmaps", function () { diff --git a/sdk/search/search-documents/test/public/utils/recordedClient.ts b/sdk/search/search-documents/test/public/utils/recordedClient.ts index bd42555d93d8..3d6253396cc9 100644 --- a/sdk/search/search-documents/test/public/utils/recordedClient.ts +++ b/sdk/search/search-documents/test/public/utils/recordedClient.ts @@ -3,7 +3,7 @@ import * as dotenv from "dotenv"; -import { env, Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { env, RecorderEnvironmentSetup } from "@azure-tools/test-recorder"; import { AzureKeyCredential, @@ -11,7 +11,6 @@ import { SearchIndexerClient, SearchIndexClient, } from "../../../src"; -import { createRandomIndexName } from "./setup"; const isNode = typeof process !== "undefined" && @@ -27,32 +26,41 @@ export interface Clients { searchClient: SearchClient; indexClient: SearchIndexClient; indexerClient: SearchIndexerClient; - indexName: string; } -const envSetupForPlayback: { [k: string]: string } = { +const replaceableVariables: { [k: string]: string } = { SEARCH_API_ADMIN_KEY: "admin_key", SEARCH_API_ADMIN_KEY_ALT: "admin_key_alt", ENDPOINT: "https://endpoint", }; -export const testEnv = new Proxy(envSetupForPlayback, { +export const testEnv = new Proxy(replaceableVariables, { get: (target, key: string) => { return env[key] || target[key]; }, }); -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback, +export const environmentSetup: RecorderEnvironmentSetup = { + replaceableVariables, + customizationsOnRecordings: [ + (recording: string): string => + recording.replace(/"access_token"\s?:\s?"[^"]*"/g, `"access_token":"access_token"`), + // If we put ENDPOINT in replaceableVariables above, it will not capture + // the endpoint string used with nock, which will be expanded to + // https://:443/ and therefore will not match, so we have to do + // this instead. + (recording: string): string => { + const match = testEnv.ENDPOINT.replace(/^https:\/\//, "").replace(/\/$/, ""); + return recording.replace(match, "endpoint"); + }, + ], + queryParametersToSkip: [], }; -export async function createClients( - serviceVersion: string, - recorder: Recorder -): Promise> { - await recorder.start(recorderOptions); - - const indexName = recorder.variable("TEST_INDEX_NAME", createRandomIndexName()); +export function createClients( + indexName: string, + serviceVersion: string +): Clients { const endPoint: string = process.env.ENDPOINT ?? "https://endpoint"; const credential = new AzureKeyCredential(testEnv.SEARCH_API_ADMIN_KEY); const searchClient = new SearchClient(endPoint, indexName, credential, { @@ -65,14 +73,9 @@ export async function createClients( serviceVersion, }); - recorder.configureClient(searchClient["client"]); - recorder.configureClient(indexClient["client"]); - recorder.configureClient(indexerClient["client"]); - return { searchClient, indexClient, indexerClient, - indexName, }; } diff --git a/sdk/search/search-documents/test/public/utils/setup.ts b/sdk/search/search-documents/test/public/utils/setup.ts index 1b50c510990e..e0ae80674eff 100644 --- a/sdk/search/search-documents/test/public/utils/setup.ts +++ b/sdk/search/search-documents/test/public/utils/setup.ts @@ -12,9 +12,8 @@ import { import { Hotel } from "./interfaces"; import { delay } from "../../../src/serviceUtils"; import { assert } from "chai"; -import { isPlaybackMode } from "@azure-tools/test-recorder"; -export const WAIT_TIME = isPlaybackMode() ? 0 : 4000; +export const WAIT_TIME = 4000; // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters export async function createIndex(client: SearchIndexClient, name: string): Promise { @@ -625,5 +624,5 @@ export async function createSimpleIndex(client: SearchIndexClient, name: string) } export function createRandomIndexName(): string { - return `hotel-live-test${Math.floor(Math.random() * 100000) + 10000}`; + return `hotel-live-test${Math.floor(Math.random() * 1000) + 1}`; }