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
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,6 @@ To create a vector index, use the following `createIndexes` template:
41
41
"cosmosSearchOptions": {
42
42
"kind": "vector-ivf",
43
43
"numLists": <integer_value>,
44
-
"nProbes": <integer_value>,
45
44
"similarity": "<string_value>",
46
45
"dimensions": <integer_value>
47
46
}
@@ -56,7 +55,6 @@ To create a vector index, use the following `createIndexes` template:
56
55
|`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.|
57
56
|`kind`| string | Type of vector index to create. Primarily, `vector-ivf` is supported. `vector-hnsw` is available as a preview feature that requires enablement via [Azure Feature Enablement Control](../../../azure-resource-manager/management/preview-features.md).|
58
57
|`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 has limited performance. |
59
-
|`nProbes`| integer | This integer controls the number of nearby clusters that are inspected in each search. A higher value may improve accuracy, however the search will be slower as a result. This is an optional parameter, with a default value of 1. |
60
58
|`similarity`| string | Similarity metric to use with the IVF index. Possible options are `COS` (cosine distance), `L2` (Euclidean distance), and `IP` (inner product). |
61
59
|`dimensions`| integer | Number of dimensions for vector similarity. The maximum number of supported dimensions is `2000`. |
62
60
@@ -92,7 +90,6 @@ db.runCommand({
92
90
cosmosSearchOptions: {
93
91
kind:'vector-ivf',
94
92
numLists:3,
95
-
nProbes:1
96
93
similarity:'COS',
97
94
dimensions:3
98
95
}
@@ -142,7 +139,8 @@ To retrieve the similarity score (`searchScore`) along with the documents found
142
139
143
140
### Query vectors and vector distances (aka similarity scores) using $search"
144
141
145
-
Continuing with the last example, create another vector, `queryVector`. Vector search measures the distance between `queryVector` and the vectors in the `vectorContent` path of your documents. You can set the number of results that the search returns by setting the parameter `k`, which is set to `2` here.
142
+
Continuing with the last example, create another vector, `queryVector`. Vector search measures the distance between `queryVector` and the vectors in the `vectorContent` path of your documents. You can set the number of results that the search returns by setting the parameter `k`, which is set to `2` here. You can also set `nProbes`, which is an integer that controls the number of nearby clusters that are inspected in each search. A higher value may improve accuracy, however the search will be slower as a result. This is an optional parameter with a default value of 1 and cannot be larger than the `numLists` value specified in the vector index.
0 commit comments