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/cosmos-db/mongodb/vcore/vector-search.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ To create a vector index, use the following `createIndexes` template:
50
50
| Field | Type | Description |
51
51
| --- | --- | --- |
52
52
|`index_name`| string | Unique name of the index. |
53
-
|`path_to_property`| string | Path to the property that contains the vector. This path can be a top-level property or a dot notation path to the property. If a dot notation path is used, then all the nonleaf elements can't be arrays. |
53
+
|`path_to_property`| string | Path to the property that contains the vector. This path can be a top-level property or a dot notation path to the property. If a dot notation path is used, then all the nonleaf elements can't be arrays. Vectors must be a `number[]` to be indexed and return in vector search results.|
54
54
|`kind`| string | Type of vector index to create. Currently, `vector-ivf` is the only supported index option. |
55
55
|`numLists`| integer | This integer is the number of clusters that the inverted file (IVF) index uses to group the vector data. We recommend that `numLists` is set to `documentCount/1000` for up to 1 million documents and to `sqrt(documentCount)` for more than 1 million documents. Using a `numLists` value of `1` is akin to performing brute-force search, which will have limited performance. |
56
56
|`similarity`| string | Similarity metric to use with the IVF index. Possible options are `COS` (cosine distance), `L2` (Euclidean distance), and `IP` (inner product). |
@@ -63,6 +63,10 @@ To create a vector index, use the following `createIndexes` template:
63
63
>
64
64
> If you're experimenting with a new scenario or creating a small demo, you can start with `numLists` set to `1` to perform a brute-force search across all vectors. This should provide you with the most accurate results from the vector search, however be aware that the search speed and latency will be slow. After your initial setup, you should go ahead and tune the `numLists` parameter using the above guidance.
65
65
66
+
> [!IMPORTANT]
67
+
> Vectors must be a `number[]` to be indexed. Using another type, such as `double[]`, prevents the document from being indexed. Non-indexed documents won't be returned in the result of a vector search.
68
+
69
+
66
70
## Examples
67
71
68
72
The following examples show you how to index vectors, add documents that have vector properties, perform a vector search, and retrieve the index configuration.
@@ -206,4 +210,4 @@ This guide demonstrates how to create a vector index, add documents that have ve
206
210
> [!div class="nextstepaction"]
207
211
> [Build AI apps with Azure Cosmos DB for MongoDB vCore vector search](vector-search-ai.md)
208
212
* Learn more about [Azure OpenAI embeddings](../../../ai-services/openai/concepts/understand-embeddings.md)
209
-
* Learn how to [generate embeddings using Azure OpenAI](../../../ai-services/openai/tutorials/embeddings.md)
213
+
* Learn how to [generate embeddings using Azure OpenAI](../../../ai-services/openai/tutorials/embeddings.md)
0 commit comments