From 6592b4c13b36c82c72fd75874a27a6241f9e3f6b Mon Sep 17 00:00:00 2001 From: Chang She <759245+changhiskhan@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:46:21 -0700 Subject: [PATCH] document metric in create_index --- docs/src/ann_indexes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/ann_indexes.md b/docs/src/ann_indexes.md index 41f26985f..be98cc451 100644 --- a/docs/src/ann_indexes.md +++ b/docs/src/ann_indexes.md @@ -28,6 +28,7 @@ tbl.create_index(num_partitions=256, num_sub_vectors=96) Since `create_index` has a training step, it can take a few minutes to finish for large tables. You can control the index creation by providing the following parameters: +- **metric** (default: "L2"): The distance metric to use. By default we use euclidean distance. We also support cosine distance. - **num_partitions** (default: 256): The number of partitions of the index. The number of partitions should be configured so each partition has 3-5K vectors. For example, a table with ~1M vectors should use 256 partitions. You can specify arbitrary number of partitions but powers of 2 is most conventional. A higher number leads to faster queries, but it makes index generation slower.