Skip to content

Commit f5942c6

Browse files
authored
Update vectordistance.md
Acrolinx fixes to bring file's overall Acrolinx score to at least 80
1 parent 7320a87 commit f5942c6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/cosmos-db/nosql/query/vectordistance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ VECTORDISTANCE(<vector_expr1>, <vector_expr2>, [<bool_expr>], [<obj_expr>])
3434
| --- | --- |
3535
| **`spatial_expr_1`** | An array of `float32` or smaller.|
3636
| **`spatial_expr_2`** | An array of `float32` or smaller.|
37-
| **`bool_expr`** | A boolean specifying how the computed value is used in an ORDER BY expression. If `true`, then brute force is used. A value of `false` will leverage any index defined on the vector property, if it exists. Default value is `false`.|
37+
| **`bool_expr`** | A boolean specifying how the computed value is used in an ORDER BY expression. If `true`, then brute force is used. A value of `false` leverages any index defined on the vector property, if it exists. Default value is `false`.|
3838
|**`obj_expr`**| A JSON formatted object literal used to specify options for the vector distance calculation. Valid items include `distanceFunction` and `dataType`.|
3939
| **`distanceFunction`** | The metric used to compute distance/similarity.
4040
| **`dataType`** | The data type of the vectors. `float32`, `float16`, `int8`, `uint8` values. Default value is `float32`. |
4141

4242

4343
Supported metrics for `distanceFunction` are:
44-
* [cosine](https://en.wikipedia.org/wiki/Cosine_similarity) which has values from -1 (least similar) to +1 (most similar).
45-
* [dotproduct](https://en.wikipedia.org/wiki/Dot_product) which has values from -inf (least similar) to +inf (most similar).
44+
* [cosine](https://en.wikipedia.org/wiki/Cosine_similarity), which has values from -1 (least similar) to +1 (most similar).
45+
* [dotproduct](https://en.wikipedia.org/wiki/Dot_product), which has values from -inf (least similar) to +inf (most similar).
4646
* [euclidean](https://en.wikipedia.org/wiki/Euclidean_distance), which has values from 0 (most similar) to +inf (least similar).
4747

4848
## Return types
@@ -68,8 +68,8 @@ ORDER BY VectorDistance(c.vector1, c.vector2)
6868
## Remarks
6969
- This function requires enrollment in the [Azure Cosmos DB NoSQL Vector Search preview feature](../vector-search.md#enroll-in-the-vector-search-preview-feature).
7070
- This function benefits from a [vector index](../../index-policy.md#vector-indexes)
71-
- if `false` is given as the optional `bool_expr`, then the vector index defined on the path is used, if one exists. If no index is defined on the vector path, then this will revert to full scan and incur higher RU charges and higher latency than if using a vector index.
72-
- When `VectorDistance` is used in an `ORDER BY` clause, no direction can be specified for the `ORDER BY`, as the results will always be sorted in order of most similar (first) to least similar (last) based on the similarity metric used. If a direction such as `ASC` or `DESC` is specified, an error will occur.
71+
- if `false` is given as the optional `bool_expr`, then the vector index defined on the path is used, if one exists. If no index is defined on the vector path, then this reverts to full scan and incurs higher RU charges and higher latency than if using a vector index.
72+
- When `VectorDistance` is used in an `ORDER BY` clause, no direction can be specified for the `ORDER BY`, as the results are always sorted in order of most similar (first) to least similar (last) based on the similarity metric used. If a direction such as `ASC` or `DESC` is specified, an error occurs.
7373
- The result is expressed as a similarity score.
7474

7575
## Related content

0 commit comments

Comments
 (0)