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/vector-search-how-to-create-index.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ Be sure to have a strategy for [vectorizing your content](vector-search-how-to-g
201
201
202
202
[**2024-05-01-preview**](/rest/api/searchservice/search-service-api-versions#2024-05-01-preview) is the most recent preview version. It's inclusive of previous preview versions.
203
203
204
-
Preview and stable API versions support the same `"vectorSearch"` configurations. You would choose the preview over the stable version for other reasons, such as newer [vectorizers](vector-search-how-to-configure-vectorizer.md) invoked at query time.
204
+
Preview and stable API versions support the same `"vectorSearch"` configurations. You would choose the preview over the stable version for other reasons, such as [more compression options](vector-search-how-to-quantization.md) or [newer vectorizers](vector-search-how-to-configure-vectorizer.md) invoked at query time.
205
205
206
206
1. Use the [Create or Update Index Preview REST API](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2024-05-01-preview&preserve-view=true) to create the index.
207
207
@@ -405,9 +405,26 @@ Vector fields are characterized by [their data type](/rest/api/searchservice/sup
405
405
406
406
[**2024-05-01-preview**](/rest/api/searchservice/search-service-api-versions#2024-05-01-preview) is the most recent preview version. It supports the same vector field definitions as the stable version, including support for all [vector data types](/rest/api/searchservice/supported-data-types#edm-data-types-for-vector-fields).
407
407
408
-
1. Use the [Create or Update Index Preview REST API](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2024-05-01-preview&preserve-view=true) to define the fields collection of an index.
408
+
1. Use the [Create or Update Index Preview REST API](/rest/api/searchservice/indexes/create-or-update?view=rest-searchservice-2024-05-01-preview&preserve-view=true) to create the index and add a vector field to the fields collection.
409
409
410
-
1. Add vector fields to the fields collection. You can store one generated embedding per document field. For each vector field:
410
+
```json
411
+
{
412
+
"name": "example-index",
413
+
"fields": [
414
+
{
415
+
"name": "contentVector",
416
+
"type": "Collection(Edm.Single)",
417
+
"searchable": true,
418
+
"retrievable": false,
419
+
"stored": false,
420
+
"dimensions": 1536,
421
+
"vectorSearchProfile": "vector-profile-1"
422
+
}
423
+
]
424
+
}
425
+
```
426
+
427
+
1. Specify a vector field with the following attributes. You can store one generated embedding per document field. For each vector field:
411
428
412
429
+ `type` can be `Collection(Edm.Single)`, `Collection(Edm.Half)`, `Collection(Edm.Int16)`, `Collection(Edm.SByte)`
413
430
+ `dimensions` is the number of dimensions generated by the embedding model. For text-embedding-ada-002, it's 1536.
@@ -648,6 +665,6 @@ Key points include:
648
665
649
666
As a next step, we recommend [Query vector data in a search index](vector-search-how-to-query.md).
650
667
651
-
Code samples in the [azure-search-vector](https://github.com/Azure/azure-search-vector-samples) repository demonstrate end-to-end workflows that include schema definition, vectorization, indexing, and queries.
668
+
Code samples in the [azure-search-vector-samples](https://github.com/Azure/azure-search-vector-samples) repository demonstrate end-to-end workflows that include schema definition, vectorization, indexing, and queries.
652
669
653
670
There's demo code for [Python](https://github.com/Azure/azure-search-vector-samples/tree/main/demo-python), [C#](https://github.com/Azure/azure-search-vector-samples/tree/main/demo-dotnet), and [JavaScript](https://github.com/Azure/azure-search-vector-samples/tree/main/demo-javascript).
0 commit comments