diff options
Diffstat (limited to 'config-model/src')
3 files changed, 2 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java index 210f54de6a6..3e421f9ba05 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/AttributeFields.java @@ -248,8 +248,6 @@ public class AttributeFields extends Derived implements AttributesConfig.Produce ib.hnsw.enabled(true); ib.hnsw.maxlinkspernode(params.maxLinksPerNode()); ib.hnsw.neighborstoexploreatinsert(params.neighborsToExploreAtInsert()); - var dm = AttributesConfig.Attribute.Index.Hnsw.Distancemetric.Enum.valueOf(dma.toString()); - ib.hnsw.distancemetric(dm); ib.hnsw.multithreadedindexing(params.multiThreadedIndexing()); aaB.index(ib); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java index 49d396327bf..f7f2259bd58 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java @@ -39,7 +39,7 @@ import java.util.Set; */ public final class Attribute implements Cloneable, Serializable { - public enum DistanceMetric { EUCLIDEAN, ANGULAR, GEODEGREES } + public enum DistanceMetric { EUCLIDEAN, ANGULAR, GEODEGREES, INNERPRODUCT } // Remember to change hashCode and equals when you add new fields diff --git a/config-model/src/test/derived/hnsw_index/attributes.cfg b/config-model/src/test/derived/hnsw_index/attributes.cfg index 9cea76174c7..c356fcb37ce 100644 --- a/config-model/src/test/derived/hnsw_index/attributes.cfg +++ b/config-model/src/test/derived/hnsw_index/attributes.cfg @@ -22,7 +22,7 @@ attribute[].imported false attribute[].distancemetric ANGULAR attribute[].index.hnsw.enabled true attribute[].index.hnsw.maxlinkspernode 32 -attribute[].index.hnsw.distancemetric ANGULAR +attribute[].index.hnsw.distancemetric EUCLIDEAN attribute[].index.hnsw.neighborstoexploreatinsert 300 attribute[].index.hnsw.multithreadedindexing true attribute[].name "t2" |