From e2e15bdde49b02aee0195de3ecde3029c3bb5858 Mon Sep 17 00:00:00 2001 From: Thejas-bhat Date: Wed, 9 Aug 2023 12:09:03 +0530 Subject: [PATCH] added build tags --- build.go | 2 +- section.go | 1 - section_vector_index.go | 9 +++++++-- vector_search.go | 3 +++ vector_test.go | 3 +++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build.go b/build.go index 663289dc..b3e4c508 100644 --- a/build.go +++ b/build.go @@ -24,7 +24,7 @@ import ( "github.com/blevesearch/vellum" ) -const Version uint32 = 15 +const Version uint32 = 16 const Type string = "zap" diff --git a/section.go b/section.go index a069a325..0306846d 100644 --- a/section.go +++ b/section.go @@ -30,5 +30,4 @@ const ( var segmentSections = map[uint16]section{ sectionInvertedIndex: &invertedIndexSection{}, - sectionVectorIndex: &vectorIndexSection{}, } diff --git a/section_vector_index.go b/section_vector_index.go index 7d7673e8..646abe61 100644 --- a/section_vector_index.go +++ b/section_vector_index.go @@ -1,6 +1,7 @@ -package zap +//go:build densevector +// +build densevector -// keep a build tag for this file. +package zap import ( "encoding/binary" @@ -11,6 +12,10 @@ import ( faiss "github.com/blevesearch/go-faiss" ) +func init() { + segmentSections[sectionVectorIndex] = &vectorIndexSection{} +} + type vectorIndexSection struct { } diff --git a/vector_search.go b/vector_search.go index 1b6d0f72..7e3c3f7e 100644 --- a/vector_search.go +++ b/vector_search.go @@ -1,3 +1,6 @@ +//go:build densevector +// +build densevector + package zap import ( diff --git a/vector_test.go b/vector_test.go index 1da247b8..dee34814 100644 --- a/vector_test.go +++ b/vector_test.go @@ -1,3 +1,6 @@ +//go:build densevector +// +build densevector + package zap import (