~alanpearce/searchix

8656f47cd62b084a59546c79d437a120869661e3 — Alan Pearce 21 days ago bb8e236
fix: search all missing expected results

Fixes: https://todo.sr.ht/~alanpearce/searchix/1
1 files changed, 1 insertions(+), 1 deletions(-)

M internal/index/search.go
M internal/index/search.go => internal/index/search.go +1 -1
@@ 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,
		)
	}