summaryrefslogtreecommitdiffstats
path: root/configdefinitions
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-05-12 15:52:15 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-05-12 15:52:15 +0000
commitfe5a4c73f70cc451f461bc007d1ce7d32481edb2 (patch)
treebd8007d72484c81f11d43ca4a3ec0003f74d0bec /configdefinitions
parent2d5ddf827dcef2af9619f8a9fee148f9edd12b02 (diff)
Support specifying a distance metric for nearest neighbor search when not having a hnsw index.
This also changes the syntax in the sd file to specifying the distance metric in the attribute tag.
Diffstat (limited to 'configdefinitions')
-rw-r--r--configdefinitions/src/vespa/attributes.def5
1 files changed, 5 insertions, 0 deletions
diff --git a/configdefinitions/src/vespa/attributes.def b/configdefinitions/src/vespa/attributes.def
index 604ddd40930..3602c2b0fd7 100644
--- a/configdefinitions/src/vespa/attributes.def
+++ b/configdefinitions/src/vespa/attributes.def
@@ -31,8 +31,13 @@ attribute[].tensortype string default=""
# Whether this is an imported attribute (from parent document db) or not.
attribute[].imported bool default=false
+# The distance metric to use for nearest neighbor search.
+# Is only used when the attribute is a 1-dimensional indexed tensor.
+attribute[].distancemetric enum { EUCLIDEAN, ANGULAR, GEODEGREES } default=EUCLIDEAN
+
# Configuration parameters for a hnsw index used together with a 1-dimensional indexed tensor for approximate nearest neighbor search.
attribute[].index.hnsw.enabled bool default=false
attribute[].index.hnsw.maxlinkspernode int default=16
+# Deprecated: Remove on Vespa 8 or before when possible.
attribute[].index.hnsw.distancemetric enum { EUCLIDEAN, ANGULAR, GEODEGREES } default=EUCLIDEAN
attribute[].index.hnsw.neighborstoexploreatinsert int default=200