fix: always re-index if storage is (re-)created
1 file changed, 4 insertions(+), 4 deletions(-)
changed files
M internal/index/search_test.go → internal/index/search_test.go
@@ -38,7 +38,7 @@ t.Fatal(err) } defer store.Close() - read, _, exists, err := index.OpenOrCreate(&index.Options{ + read, _, err := index.OpenOrCreate(&index.Options{ Logger: log.Named("index"), Root: root, BatchSize: cfg.Importer.BatchSize,@@ -51,7 +51,7 @@ if err != nil { t.Fatal(err) } defer read.Close() - if !exists { + if !read.Exists() { t.Fatal("expected index to exist") }@@ -125,7 +125,7 @@ t.Fatal(err) } defer store.Close() - read, _, exists, err := index.OpenOrCreate(&index.Options{ + read, _, err := index.OpenOrCreate(&index.Options{ Force: false, LowMemory: false, Logger: log.Named("index"),@@ -138,7 +138,7 @@ if err != nil { t.Fatal(err) } defer read.Close() - if !exists { + if !read.Exists() { t.Fatal("expected index to exist") }