about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-11-10 12:27:50 +0100
committerAlan Pearce2024-11-10 12:27:50 +0100
commit8656f47cd62b084a59546c79d437a120869661e3 (patch)
tree1f42137202cd6cb973e0886e6c8fbc958d8ce7f9
parentbb8e236fd5b4dbc083c1cbd18a18c380b9fc8d3b (diff)
downloadsearchix-8656f47cd62b084a59546c79d437a120869661e3.tar.lz
searchix-8656f47cd62b084a59546c79d437a120869661e3.tar.zst
searchix-8656f47cd62b084a59546c79d437a120869661e3.zip
fix: search all missing expected results
Fixes: https://todo.sr.ht/~alanpearce/searchix/1
-rw-r--r--internal/index/search.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/index/search.go b/internal/index/search.go
index cdffc1e..c9f1dbd 100644
--- a/internal/index/search.go
+++ b/internal/index/search.go
@@ -142,11 +142,11 @@ func (index *ReadIndex) Search(
 	// match the user's query in any field ...
 	userQuery := bleve.NewMatchQuery(keyword)
 	userQuery.Analyzer = "option_name"
+	query.AddMust(userQuery)
 
 	if source != nil {
 		query.AddMust(
 			setField(bleve.NewTermQuery(source.Key), "Source"),
-			userQuery,
 		)
 	}