diff options
author | Alan Pearce | 2024-05-09 18:47:37 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-09 19:28:13 +0200 |
commit | 0986e8699e87addccbef43c0ce30a466988fed15 (patch) | |
tree | fa40d9609b8764966c7c477fb91ef3c01113635d /import/main.go | |
parent | 1db7c2a1630c3d80c3c696c8fabaa5476eb2184e (diff) | |
download | searchix-0986e8699e87addccbef43c0ce30a466988fed15.tar.lz searchix-0986e8699e87addccbef43c0ce30a466988fed15.tar.zst searchix-0986e8699e87addccbef43c0ce30a466988fed15.zip |
feat: enable index path to be configured
Diffstat (limited to 'import/main.go')
-rw-r--r-- | import/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/import/main.go b/import/main.go index 90f2b74..db899e2 100644 --- a/import/main.go +++ b/import/main.go @@ -22,6 +22,7 @@ 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() { @@ -50,7 +51,7 @@ func main() { return } - indexer, err := search.NewIndexer(cfg.DataPath, runtimeConfig.Replace) + indexer, err := search.NewIndexer(runtimeConfig.IndexPath, runtimeConfig.Replace) if err != nil { log.Fatalf("Failed to create indexer: %v", err) } |