# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
namespace=vespa.config.search

attribute[].name                string
attribute[].datatype            enum { STRING, BOOL, UINT2, UINT4, INT8, INT16, INT32, INT64, FLOAT16, FLOAT, DOUBLE, PREDICATE, TENSOR, REFERENCE, RAW, NONE } default=NONE
attribute[].collectiontype      enum { SINGLE, ARRAY, WEIGHTEDSET } default=SINGLE
attribute[].dictionary.type     enum { BTREE, HASH, BTREE_AND_HASH } default = BTREE
attribute[].dictionary.match    enum { CASE_SENSITIVE, CASE_INSENSITIVE, CASED, UNCASED } default=UNCASED
attribute[].match               enum { CASED, UNCASED } default=UNCASED
attribute[].removeifzero        bool default=false
attribute[].createifnonexistent bool default=false
attribute[].fastsearch          bool default=false
attribute[].paged               bool default=false
# An attribute marked mutable can be updated by a query.
attribute[].ismutable           bool default=false
attribute[].sortascending       bool default=true
attribute[].sortfunction        enum { RAW, LOWERCASE, UCA } default=UCA
attribute[].sortstrength        enum { PRIMARY, SECONDARY, TERTIARY, QUATERNARY, IDENTICAL } default=PRIMARY
attribute[].sortlocale          string default=""
# Allow only bitvector postings, i.e. drop btree postings to save memory.?
attribute[].enableonlybitvector bool default=false
# Allow fast access to this attribute at all times.
# If so, attribute is kept in memory also for non-searchable documents.
attribute[].fastaccess          bool default=false
attribute[].arity               int default=8
attribute[].lowerbound         long default=-9223372036854775808
attribute[].upperbound         long default=9223372036854775807
# The threshold is given as a ratio of the corpus size
attribute[].densepostinglistthreshold   double default=0.40
# Specification of tensor type if this attribute is of type TENSOR.
attribute[].tensortype         string default=""
# Whether this is an imported attribute (from parent document db) or not.
attribute[].imported           bool default=false

# Max amount of uncommitted memory during feed. (Default just shy of 128k) 
attribute[].maxuncommittedmemory long default=130000

# 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, INNERPRODUCT, HAMMING, PRENORMALIZED_ANGULAR, DOTPRODUCT } 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
attribute[].index.hnsw.neighborstoexploreatinsert int default=200
# Whether multi-threaded indexing is enabled for this hnsw index.
attribute[].index.hnsw.multithreadedindexing bool default=true
