You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -86,21 +86,20 @@ You use one `.rest` or `.http` file to run all the requests in this quickstart.
86
86
For the **recommended** keyless authentication via Microsoft Entra ID, you need to replace `@apiKey` with the `@token` variable.
87
87
88
88
```http
89
-
@baseUrl = PUT-YOUR-SEARCH-SERVICE-URL-HERE
90
89
@token = PUT-YOUR-MICROSOFT-ENTRA-TOKEN-HERE
91
90
```
92
91
93
92
If you prefer to use an API key, replace `@apiKey` with the key you copied from the Azure portal.
94
93
95
94
```http
96
-
@baseUrl = PUT-YOUR-SEARCH-SERVICE-URL-HERE
97
95
@apiKey = PUT-YOUR-ADMIN-KEY-HERE
98
96
```
99
97
100
98
1. For the **recommended** keyless authentication via Microsoft Entra ID, you need to replace `api-key: {{apiKey}}` with `Authorization: Bearer {{token}}`in the request headers. Replace all instances of `api-key: {{apiKey}}` that you find in the file.
101
99
102
100
103
101
## Create a vector index
102
+
104
103
You use the [Create Index](/rest/api/searchservice/indexes/create) REST API to create a vector index and set up the physical data structures on your search service.
105
104
106
105
The index schema in this example is organized around hotel content. Sample data consists of vector and nonvector names and descriptions of fictitious hotels. This schema includes configurations for vector indexing and queries, and for semantic ranking.
@@ -327,7 +326,7 @@ The response body should include the JSON representation of the index schema.
@@ -584,7 +583,7 @@ In Azure AI Search, the index contains all searchable data and queries run on th
584
583
> [!IMPORTANT]
585
584
> The code in this example isn't runable. Several characters or lines are removed for brevity. Use the code in your `az-search-vector-quickstart.rest` file to run the request.
586
585
587
-
1. Select **Send request**. You should have an `HTTP/1.1 201 Created` response. The response body should include the JSON representation of the search documents.
586
+
1. Select **Send request**. You should have an `HTTP/1.1 200 OK` response. The response body should include the JSON representation of the search documents.
588
587
589
588
Key takeaways about the [Documents - Index REST API](/rest/api/searchservice/documents/) request:
590
589
@@ -614,11 +613,11 @@ The vector query string is semantically similar to the search string, but it inc
614
613
615
614
1. In Visual Studio Code, open the `az-search-vector-quickstart.rest` file you created earlier.
616
615
617
-
1. Find the `### Run a query` code block in the file. This block contains the request to query the search index.
616
+
1. Find the `### Run a single vector query` code block in the file. This block contains the request to query the search index.
618
617
619
618
620
619
```http
621
-
### Run a query
620
+
### Run a single vector query
622
621
POST {{baseUrl}}/indexes/hotels-vector-quickstart/docs/search?api-version=2023-11-01 HTTP/1.1
623
622
Content-Type: application/json
624
623
Authorization: Bearer {{token}}
@@ -653,45 +652,59 @@ The response for the vector equivalent of `classic lodging near running trails,
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley."
663
-
},
664
-
{
665
-
"@search.score": 0.8399129,
666
-
"HotelName": "Swirling Currents Hotel",
667
-
"Description": "Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center."
668
-
},
669
-
{
670
-
"@search.score": 0.8383954,
671
-
"HotelName": "Luxury Lion Resort",
672
-
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort"
673
-
},
674
-
{
675
-
"@search.score": 0.8254346,
676
-
"HotelName": "Sublime Palace Hotel",
677
-
"Description": "Sublime Palace Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Palace is part of a lovingly restored 1800 palace."
678
-
},
679
-
{
680
-
"@search.score": 0.82380056,
681
-
"HotelName": "Stay-Kay City Hotel",
682
-
"Description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York."
683
-
},
684
-
{
685
-
"@search.score": 0.81514084,
686
-
"HotelName": "Old Century Hotel",
687
-
"Description": "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts."
688
-
},
689
-
{
690
-
"@search.score": 0.8133763,
691
-
"HotelName": "Gastronomic Landscape Hotel",
692
-
"Description": "The Hotel stands out for its gastronomic excellence under the management of William Dough, who advises on and oversees all of the Hotel’s restaurant services."
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley.",
663
+
"Category": "Boutique"
664
+
},
665
+
{
666
+
"@search.score": 0.8399132,
667
+
"HotelId": "49",
668
+
"HotelName": "Old Carrabelle Hotel",
669
+
"Description": "Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center.",
670
+
"Category": "Luxury"
671
+
},
672
+
{
673
+
"@search.score": 0.83839583,
674
+
"HotelId": "13",
675
+
"HotelName": "Historic Lion Resort",
676
+
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort",
677
+
"Category": "Resort and Spa"
678
+
},
679
+
{
680
+
"@search.score": 0.82543474,
681
+
"HotelId": "4",
682
+
"HotelName": "Sublime Cliff Hotel",
683
+
"Description": "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
684
+
"Category": "Boutique"
685
+
},
686
+
{
687
+
"@search.score": 0.82380104,
688
+
"HotelId": "1",
689
+
"HotelName": "Secret Point Hotel",
690
+
"Description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York.",
691
+
"Category": "Boutique"
692
+
},
693
+
{
694
+
"@search.score": 0.8151413,
695
+
"HotelId": "2",
696
+
"HotelName": "Twin Dome Hotel",
697
+
"Description": "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts.",
698
+
"Category": "Boutique"
699
+
},
700
+
{
701
+
"@search.score": 0.8133767,
702
+
"HotelId": "3",
703
+
"HotelName": "Triple Landscape Hotel",
704
+
"Description": "The Hotel stands out for its gastronomic excellence under the management of William Dough, who advises on and oversees all of the Hotel\u2019s restaurant services.",
705
+
"Category": "Resort and Spa"
706
+
}
707
+
]
695
708
}
696
709
```
697
710
@@ -736,40 +749,47 @@ The query was the same as the previous [single vector search example](#single-ve
736
749
737
750
```json
738
751
{
739
-
740
-
"@odata.count": 3,
741
-
"value": [
742
-
{
743
-
"@search.score": 0.857736,
744
-
"HotelName": "Nordick's Valley Motel",
745
-
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley.",
746
-
"Tags": [
747
-
"continental breakfast",
748
-
"air conditioning",
749
-
"free wifi"
750
-
]
751
-
},
752
-
{
753
-
"@search.score": 0.8383954,
754
-
"HotelName": "Luxury Lion Resort",
755
-
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort",
756
-
"Tags": [
757
-
"view",
758
-
"free wifi",
759
-
"pool"
760
-
]
761
-
},
762
-
{
763
-
"@search.score": 0.81514084,
764
-
"HotelName": "Old Century Hotel",
765
-
"Description": "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts.",
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley.",
760
+
"Category": "Boutique",
761
+
"Tags": [
762
+
"continental breakfast",
763
+
"air conditioning",
764
+
"free wifi"
765
+
]
766
+
},
767
+
{
768
+
"@search.score": 0.83839583,
769
+
"HotelId": "13",
770
+
"HotelName": "Historic Lion Resort",
771
+
"Description": "Unmatched Luxury. Visit our downtown hotel to indulge in luxury accommodations. Moments from the stadium, we feature the best in comfort",
772
+
"Category": "Resort and Spa",
773
+
"Tags": [
774
+
"view",
775
+
"free wifi",
776
+
"pool"
777
+
]
778
+
},
779
+
{
780
+
"@search.score": 0.8151413,
781
+
"HotelId": "2",
782
+
"HotelName": "Twin Dome Hotel",
783
+
"Description": "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts.",
784
+
"Category": "Boutique",
785
+
"Tags": [
786
+
"pool",
787
+
"free wifi",
788
+
"air conditioning",
789
+
"concierge"
790
+
]
791
+
}
792
+
]
773
793
}
774
794
```
775
795
@@ -980,58 +1000,43 @@ The Swirling Currents Hotel now moves into the top spot. Without semantic rankin
980
1000
981
1001
```json
982
1002
{
983
-
"@odata.count": 3,
984
-
"@search.facets": {
985
-
"Address/StateProvince": [
986
-
{
987
-
"count": 1,
988
-
"value": "NY"
989
-
},
990
-
{
991
-
"count": 1,
992
-
"value": "VA"
993
-
}
994
-
]
995
-
},
996
-
"@search.answers": [],
997
-
"value": [
998
-
{
999
-
"@search.score": 0.03306011110544205,
1000
-
"@search.rerankerScore": 2.5094974040985107,
1001
-
"HotelId": "49",
1002
-
"HotelName": "Swirling Currents Hotel",
1003
-
"Description": "Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center.",
1004
-
"Category": "Luxury",
1005
-
"Address": {
1006
-
"City": "Arlington",
1007
-
"StateProvince": "VA"
1008
-
}
1009
-
},
1010
-
{
1011
-
"@search.score": 0.03306011110544205,
1012
-
"@search.rerankerScore": 2.0370211601257324,
1013
-
"HotelId": "48",
1014
-
"HotelName": "Nordick's Valley Motel",
1015
-
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley.",
1016
-
"Category": "Boutique",
1017
-
"Address": {
1018
-
"City": "Washington D.C.",
1019
-
"StateProvince": null
1020
-
}
1021
-
},
1022
-
{
1023
-
"@search.score": 0.032258063554763794,
1024
-
"@search.rerankerScore": 1.6706111431121826,
1025
-
"HotelId": "1",
1026
-
"HotelName": "Stay-Kay City Hotel",
1027
-
"Description": "The hotel is ideally located on the main commercial artery of the city in the heart of New York.",
"Description": "Spacious rooms, glamorous suites and residences, rooftop pool, walking access to shopping, dining, entertainment and the city center.",
1021
+
"Category": "Luxury",
1022
+
"Address": {
1023
+
"City": "Arlington",
1024
+
"StateProvince": "VA"
1025
+
}
1026
+
},
1027
+
{
1028
+
"@search.score": 0.03306011110544205,
1029
+
"@search.rerankerScore": 2.1703834533691406,
1030
+
"HotelId": "48",
1031
+
"HotelName": "Nordick's Motel",
1032
+
"Description": "Only 90 miles (about 2 hours) from the nation's capital and nearby most everything the historic valley has to offer. Hiking? Wine Tasting? Exploring the caverns? It's all nearby and we have specially priced packages to help make our B&B your home base for fun while visiting the valley.",
0 commit comments