feat: add low-memory mode
1 file changed, 6 insertions(+), 2 deletions(-)
changed files
M searchix.go → searchix.go
@@ -39,8 +39,9 @@ return nextRun } type IndexOptions struct { - Update bool - Replace bool + Update bool + Replace bool + LowMemory bool } func (s *Server) SetupIndex(options *IndexOptions) error {@@ -55,6 +56,9 @@ read, write, exists, err := index.OpenOrCreate( s.cfg.DataPath, options.Replace, + &index.Options{ + LowMemory: options.LowMemory, + }, ) if err != nil { return errors.Wrap(err, "Failed to open or create index")