about summary refs log tree commit diff stats
path: root/import
diff options
context:
space:
mode:
authorAlan Pearce2024-05-11 14:34:15 +0200
committerAlan Pearce2024-05-11 14:37:30 +0200
commit1aa991ae1f1a426424549c92060b204114c8b3c2 (patch)
tree59dc9e67d6b0c5604d9a70f52260ae7d85411e6f /import
parent48423548f4718886d32a87ddd65d5ee2620fd8c8 (diff)
downloadsearchix-1aa991ae1f1a426424549c92060b204114c8b3c2.tar.lz
searchix-1aa991ae1f1a426424549c92060b204114c8b3c2.tar.zst
searchix-1aa991ae1f1a426424549c92060b204114c8b3c2.zip
refactor: deduce index path automatically from config.DataPath
Diffstat (limited to 'import')
-rw-r--r--import/main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/import/main.go b/import/main.go
index db899e2..90f2b74 100644
--- a/import/main.go
+++ b/import/main.go
@@ -22,7 +22,6 @@ type Config struct {
 	LogLevel   slog.Level    `conf:"default:INFO"`
 	Timeout    time.Duration `conf:"default:30m,help:maximum time to wait for all fetchers and importers combined"`
 	Replace    bool          `conf:"default:false,help:whether to remove existing database, if exists"`
-	IndexPath  string        `conf:"default:data/index.bleve"`
 }
 
 func main() {
@@ -51,7 +50,7 @@ func main() {
 		return
 	}
 
-	indexer, err := search.NewIndexer(runtimeConfig.IndexPath, runtimeConfig.Replace)
+	indexer, err := search.NewIndexer(cfg.DataPath, runtimeConfig.Replace)
 	if err != nil {
 		log.Fatalf("Failed to create indexer: %v", err)
 	}