Skip to content

Commit 076db3c

Browse files
authored
Update vector-search.md
fixed typo where nProbes appeared in index definition rather than a parameter of the search
1 parent b1639f1 commit 076db3c

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

articles/cosmos-db/mongodb/vcore/vector-search.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ To create a vector index, use the following `createIndexes` template:
4141
"cosmosSearchOptions": {
4242
"kind": "vector-ivf",
4343
"numLists": <integer_value>,
44-
"nProbes": <integer_value>,
4544
"similarity": "<string_value>",
4645
"dimensions": <integer_value>
4746
}
@@ -56,7 +55,6 @@ To create a vector index, use the following `createIndexes` template:
5655
| `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.|
5756
| `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).|
5857
| `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. |
6058
| `similarity` | string | Similarity metric to use with the IVF index. Possible options are `COS` (cosine distance), `L2` (Euclidean distance), and `IP` (inner product). |
6159
| `dimensions` | integer | Number of dimensions for vector similarity. The maximum number of supported dimensions is `2000`. |
6260

@@ -92,7 +90,6 @@ db.runCommand({
9290
cosmosSearchOptions: {
9391
kind: 'vector-ivf',
9492
numLists: 3,
95-
nProbes: 1
9693
similarity: 'COS',
9794
dimensions: 3
9895
}
@@ -142,7 +139,8 @@ To retrieve the similarity score (`searchScore`) along with the documents found
142139

143140
### Query vectors and vector distances (aka similarity scores) using $search"
144141

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.
143+
146144

147145
```javascript
148146
const queryVector = [0.52, 0.28, 0.12];

0 commit comments

Comments
 (0)