fix: get highlight working

This commit is contained in:
decentral1se 2023-05-13 01:31:13 +02:00
parent 299ff79397
commit 190b888e5d
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410

View File

@ -95,6 +95,7 @@ func main() {
search := bleve.NewSearchRequest(query) search := bleve.NewSearchRequest(query)
search.Highlight = bleve.NewHighlightWithStyle(ansi.Name) search.Highlight = bleve.NewHighlightWithStyle(ansi.Name)
search.Size = 5 search.Size = 5
search.Fields = []string{"*"}
searchResults, err := index.Search(search) searchResults, err := index.Search(search)
if err != nil { if err != nil {