forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Scoring Profile search tests (Azure#43)
Adding test: searchWithScoringProfileBoostsScore()
- Loading branch information
Showing
5 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...e-search-data/src/test/resources/session-records/searchWithScoringProfileBoostsScore.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"networkCallRecords": [ | ||
{ | ||
"Method": "POST", | ||
"Uri": "https://azs-sdk0dc45984d559.search.windows.net/indexes('hotels')/docs/search.index?api-version=2019-05-06", | ||
"Headers": { | ||
"Content-Type": "application/json; charset=utf-8" | ||
}, | ||
"Response": { | ||
"Pragma": "no-cache", | ||
"retry-after": "0", | ||
"request-id": "12df1dae-aa08-4d8d-bfcf-bf4eac0895b1", | ||
"StatusCode": "200", | ||
"Date": "Sun, 25 Aug 2019 09:52:54 GMT", | ||
"Strict-Transport-Security": "max-age=15724800; includeSubDomains", | ||
"Cache-Control": "no-cache", | ||
"elapsed-time": "110", | ||
"OData-Version": "4.0", | ||
"Expires": "-1", | ||
"Content-Length": "795", | ||
"Body": "{\"@odata.context\":\"https://azs-sdk0dc45984d559.search.windows.net/indexes('hotels')/$metadata#Collection(Microsoft.Azure.Search.V2019_05_06.IndexResult)\",\"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}]}", | ||
"Preference-Applied": "odata.include-annotations=\"*\"", | ||
"Content-Type": "application/json; odata.metadata=minimal" | ||
} | ||
}, | ||
{ | ||
"Method": "POST", | ||
"Uri": "https://azs-sdk0dc45984d559.search.windows.net/indexes('hotels')/docs/search.post.search?api-version=2019-05-06", | ||
"Headers": { | ||
"Content-Type": "application/json; charset=utf-8" | ||
}, | ||
"Response": { | ||
"Pragma": "no-cache", | ||
"retry-after": "0", | ||
"request-id": "7512e13d-4676-47c6-9258-0d0bfc85c960", | ||
"StatusCode": "200", | ||
"Date": "Sun, 25 Aug 2019 09:53:21 GMT", | ||
"Strict-Transport-Security": "max-age=15724800; includeSubDomains", | ||
"Cache-Control": "no-cache", | ||
"elapsed-time": "84", | ||
"OData-Version": "4.0", | ||
"Expires": "-1", | ||
"Content-Length": "1574", | ||
"Body": "{\"@odata.context\":\"https://azs-sdk0dc45984d559.search.windows.net/indexes('hotels')/$metadata#docs(*)\",\"value\":[{\"@search.score\":0.17984489,\"HotelId\":\"2\",\"HotelName\":\"Roach Motel\",\"Description\":\"Cheapest hotel in town. Infact, a motel.\",\"Description_fr\":\"H\\u00f4tel le moins cher en ville. Infact, un motel.\",\"Category\":\"Budget\",\"Tags\":[\"motel\",\"budget\"],\"ParkingIncluded\":true,\"SmokingAllowed\":true,\"LastRenovationDate\":\"1982-04-28T00:00:00Z\",\"Rating\":1,\"Location\":{\"type\":\"Point\",\"coordinates\":[-122.131577,49.678581],\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}}},\"Address\":null,\"Rooms\":[]},{\"@search.score\":0.11593714,\"HotelId\":\"1\",\"HotelName\":\"Fancy Stay\",\"Description\":\"Best hotel in town if you like luxury hotels. They have an amazing infinity pool, a spa, and a really helpful concierge. The location is perfect -- right downtown, close to all the tourist attractions. We highly recommend this hotel.\",\"Description_fr\":\"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'emplacement est parfait \\u2013 en plein centre, \\u00e0 proximit\\u00e9 de toutes les attractions touristiques. Nous recommandons fortement cet h\\u00f4tel.\",\"Category\":\"Luxury\",\"Tags\":[\"pool\",\"view\",\"wifi\",\"concierge\"],\"ParkingIncluded\":false,\"SmokingAllowed\":false,\"LastRenovationDate\":\"2010-06-27T00:00:00Z\",\"Rating\":5,\"Location\":{\"type\":\"Point\",\"coordinates\":[-122.131577,47.678581],\"crs\":{\"type\":\"name\",\"properties\":{\"name\":\"EPSG:4326\"}}},\"Address\":null,\"Rooms\":[]}]}", | ||
"Preference-Applied": "odata.include-annotations=\"*\"", | ||
"Content-Type": "application/json; odata.metadata=minimal" | ||
} | ||
} | ||
], | ||
"variables": [] | ||
} |