Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit d2df4ca

Browse files
committed
updated wording
1 parent d1c7efb commit d2df4ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/knn/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ has_toc: false
88

99
# KNN
1010

11-
Short for its associated *k-nearest neighbors* algorithm, the KNN plugin lets you search for points in a vector space and find the "nearest neighbors" for those points by Euclidean distance or Cosine similarity. Use cases include recommendations (for example, an "other songs you might like" feature in a music application), image recognition, and fraud detection. For background information on the algorithm, see [Wikipedia](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm).
11+
Short for its associated *k-nearest neighbors* algorithm, the KNN plugin lets you search for points in a vector space and find the "nearest neighbors" for those points by Euclidean distance or cosine similarity. Use cases include recommendations (for example, an "other songs you might like" feature in a music application), image recognition, and fraud detection. For background information on the algorithm, see [Wikipedia](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm).
1212

1313

1414
## Get started
1515

16-
To use the KNN plugin, you must create an index with the `index.knn` setting and add one or more fields of the `knn_vector` data type. Additionally, you can specify the `index.knn.space_type` with `l2` or `cosinesimil` to use either Euclidean or Cosine Similarity space for distance calculations, respectively. By default, `index.knn.space_type` is set to `l2`. For more information on these spaces, please refer to the [NMSLIB documentation](https://github.com/nmslib/nmslib/blob/master/manual/spaces.md). Here is an example that creates an index with 2 `knn_vector` fields that uses Cosine Similarity:
16+
To use the KNN plugin, you must create an index with the `index.knn` setting and add one or more fields of the `knn_vector` data type. Additionally, you can specify the `index.knn.space_type` with `l2` or `cosinesimil`, respectively, to use either Euclidean distance or cosine similarity for calculations. By default, `index.knn.space_type` is set to `l2`. Here is an example that creates an index with two knn_vector fields and uses cosine similarity:
1717

1818
```json
1919
PUT my-index

docs/knn/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Setting | Default | Description
1919
`index.knn.algo_param.ef_search` | 512 | The size of the dynamic list used during KNN searches. Higher values lead to more accurate, but slower searches.
2020
`index.knn.algo_param.ef_construction` | 512 | The size of the dynamic list used during KNN graph creation. Higher values lead to a more accurate graph, but slower indexing speed.
2121
`index.knn.algo_param.m` | 16 | The number of bidirectional links that the plugin creates for each new element. Increasing and decreasing this value can have a large impact on memory consumption. Keep this value between 2-100.
22-
`index.knn.space_type` | "l2" | The vector space used to calculate the distance between vectors. Currently, the KNN plugin supports the "l2" space (Euclidean distance) and "cosinesimil" space (Cosine Similarity). For more information on these spaces, please refer to the [NMSLIB documentation](https://github.com/nmslib/nmslib/blob/master/manual/spaces.md).
22+
`index.knn.space_type` | "l2" | The vector space used to calculate the distance between vectors. Currently, the KNN plugin supports the `l2` space (Euclidean distance) and `cosinesimil` space (cosine similarity). For more information on these spaces, refer to the [NMSLIB documentation](https://github.com/nmslib/nmslib/blob/master/manual/spaces.md).
2323

2424

2525
## Cluster settings

0 commit comments

Comments
 (0)