about summary refs log tree commit diff stats
path: root/searchix.go
diff options
context:
space:
mode:
Diffstat (limited to 'searchix.go')
-rw-r--r--searchix.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/searchix.go b/searchix.go
index 9ea7b9a..8257dbc 100644
--- a/searchix.go
+++ b/searchix.go
@@ -39,8 +39,9 @@ func nextOccurrenceOfLocalTime(t toml.LocalTime) time.Time {
 }
 
 type IndexOptions struct {
-	Update  bool
-	Replace bool
+	Update    bool
+	Replace   bool
+	LowMemory bool
 }
 
 func (s *Server) SetupIndex(options *IndexOptions) error {
@@ -55,6 +56,9 @@ func (s *Server) SetupIndex(options *IndexOptions) error {
 	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")