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
Copy file name to clipboardExpand all lines: articles/search/search-get-started-vector.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ You can also start a new file on your local system and create requests manually
40
40
41
41
## Get a search endpoint and an API key
42
42
43
-
You can find the search service endpoint and API keys in the Azure portal.
43
+
You can find the search service endpoint and API keys in the Azure portal. You're pasting these values into a `.rest` or `.http` file in the next step.
44
44
45
45
Requests to the search endpoint must be authenticated and authorized. You can use API keys or roles for this task. Keys are easier to start with, but roles are more secure. Although we use API keys for this quickstart, we recommend [switching to a keyless connection](search-get-started-rbac.md).
46
46
@@ -50,12 +50,10 @@ Requests to the search endpoint must be authenticated and authorized. You can us
50
50
51
51
:::image type="content" source="media/search-get-started-rest/get-endpoint.png" lightbox="media/search-get-started-rest/get-endpoint.png" alt-text="Screenshot of the URL property on the overview page.":::
52
52
53
-
1. Select **Settings** > **Keys** and then copy an admin key. [Admin API keys](search-security-api-keys.md) are used to add, modify, and delete objects. There are two interchangeable admin keys. Copy either one.
53
+
1. Select **Settings** > **Keys**. Either **API keys** or **Both** must be enabled. [Admin API keys](search-security-api-keys.md) are used to add, modify, and delete objects. There are two interchangeable admin keys. Copy either one.
54
54
55
55
:::image type="content" source="media/search-get-started-rest/get-api-key.png" lightbox="media/search-get-started-rest/get-api-key.png" alt-text="Screenshot that shows the API keys in the Azure portal.":::
56
56
57
-
You're pasting these values into a `.rest` or `.http` file in the next step.
58
-
59
57
## Create a vector index
60
58
61
59
[Create Index (REST)](/rest/api/searchservice/indexes/create) creates a vector index and sets up the physical data structures on your search service.
@@ -212,13 +210,16 @@ The index schema is organized around hotel content. Sample data consists of vect
212
210
}
213
211
```
214
212
215
-
1. Save the file, and then select **Send request**. You should have an `HTTP/1.1 201 Created` response. The response body should include the JSON representation of the index schema.
213
+
1. Save the file again, and then select **Send request**. You should have an `HTTP/1.1 201 Created` response. The response body should include the JSON representation of the index schema.
216
214
217
215
Key takeaways about this REST API:
218
216
219
217
- The `fields` collection includes a required key field and text and vector fields (such as `Description` and `DescriptionVector`) for text and vector search. Colocating vector and nonvector fields in the same index enables hybrid queries. For instance, you can combine filters, text search with semantic ranking, and vectors into a single query operation.
218
+
220
219
- Vector fields must be `type: Collection(Edm.Single)` with `dimensions` and `vectorSearchProfile` properties.
220
+
221
221
- The `vectorSearch` section is an array of approximate nearest neighbor algorithm configurations and profiles. Supported algorithms include hierarchical navigable small world and exhaustive k-nearest neighbor. For more information, see [Relevance scoring in vector search](vector-search-ranking.md).
222
+
222
223
- [Optional]: The `semantic` configuration enables reranking of search results. You can rerank results in queries of type `semantic` for string fields that are specified in the configuration. To learn more, see [Semantic ranking overview](semantic-search-overview.md).
223
224
224
225
## Upload documents
@@ -369,6 +370,7 @@ api-key: {{apiKey}}
369
370
Key takeaways about this REST API:
370
371
371
372
- Documents in the payload consist of fields defined in the index schema.
373
+
372
374
- Vector fields contain floating point values. The dimensions attribute has a minimum of 2 and a maximum of 3,072 floating point values each. This quickstart sets the dimensions attribute to 1,536 because that's the size of embeddings generated by the Azure OpenAI **text-embedding-ada-002** model.
373
375
374
376
## Run queries
@@ -786,10 +788,12 @@ Here's the last query in the collection. This hybrid query with semantic ranking
786
788
}
787
789
```
788
790
789
-
Key points about this REST API:
791
+
Key takeaways about this REST API:
790
792
791
793
- Vector search is specified through the `vectors.value` property. Keyword search is specified through the `search` property.
794
+
792
795
- In a hybrid search, you can integrate vector search with full-text search over keywords. Filters, spell check, and semantic ranking apply to textual content only, and not vectors. In this final query, there's no semantic `answer` because the system didn't produce one that was sufficiently strong.
796
+
793
797
- Actual results include more detail, including semantic captions and highlights. Results were modified for readability. To get the full structure of the response, run the request in the REST client.
0 commit comments