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.
Merge pull request Azure#48 from navalev/feature/TestCanUseHitHighlig…
…hting UT for canUseHitHighlighting
- Loading branch information
Showing
4 changed files
with
138 additions
and
0 deletions.
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
48 changes: 48 additions & 0 deletions
48
sdk/search/azure-search-data/src/test/resources/session-records/canUseHitHighlighting.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,48 @@ | ||
{ | ||
"networkCallRecords" : [ { | ||
"Method" : "POST", | ||
"Uri" : "https://azs-sdk17747141b950.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" : "fb686a2f-6b0b-4e9f-a7e2-f0bdc24a8dc8", | ||
"StatusCode" : "200", | ||
"Date" : "Mon, 02 Sep 2019 08:48:23 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"elapsed-time" : "143", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "795", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdk17747141b950.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-sdk17747141b950.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" : "79e464f6-b536-4bdb-9cbf-8e80ffe42102", | ||
"StatusCode" : "200", | ||
"Date" : "Mon, 02 Sep 2019 08:48:26 GMT", | ||
"Strict-Transport-Security" : "max-age=15724800; includeSubDomains", | ||
"Cache-Control" : "no-cache", | ||
"elapsed-time" : "54", | ||
"OData-Version" : "4.0", | ||
"Expires" : "-1", | ||
"Content-Length" : "1260", | ||
"Body" : "{\"@odata.context\":\"https://azs-sdk17747141b950.search.windows.net/indexes('hotels')/$metadata#docs(*)\",\"value\":[{\"@search.score\":0.60304105,\"@search.highlights\":{\"Description\":[\"Best <b>hotel</b> in town if you like <b>luxury</b> <b>hotels</b>.\",\"We highly recommend this <b>hotel</b>.\"],\"Category\":[\"<b>Luxury</b>\"]},\"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" : [ ] | ||
} |