diff --git a/indexing_options.go b/indexing_options.go index 4e92024..ff27523 100644 --- a/indexing_options.go +++ b/indexing_options.go @@ -14,7 +14,7 @@ package index -type FieldIndexingOptions int +type FieldIndexingOptions uint64 const ( IndexField FieldIndexingOptions = 1 << iota @@ -22,6 +22,7 @@ const ( IncludeTermVectors DocValues SkipFreqNorm + GPU ) const ( @@ -59,6 +60,10 @@ func (o FieldIndexingOptions) SkipFreqNorm() bool { return o&SkipFreqNorm != 0 } +func (o FieldIndexingOptions) UseGPU() bool { + return o&GPU != 0 +} + func (o FieldIndexingOptions) String() string { rv := "" if o.IsIndexed() { @@ -88,5 +93,11 @@ func (o FieldIndexingOptions) String() string { } rv += "FN" } + if o.UseGPU() { + if rv != "" { + rv += ", " + } + rv += "GPU" + } return rv } diff --git a/vector.go b/vector.go index 1057cf9..97b5146 100644 --- a/vector.go +++ b/vector.go @@ -18,6 +18,9 @@ package index type VectorField interface { + // Name of the vector field + Name() string + // The vector data Vector() []float32 // Dimensionality of the vector Dims() int