Use NewQueryStringQuery to allow for using wildcards etc.

This commit is contained in:
André Duffeck committed 2022-04-11 08:47:18 +02:00
1 parent 6cc04872ee
commit 0768aef1b5
1 file changed
+1 -1
+1 -1
View File
@@ -64,7 +64,7 @@ func (i *Index) Add(ref *sprovider.Reference, ri *sprovider.ResourceInfo) error
}
func (i *Index) Search(ctx context.Context, req *search.SearchIndexRequest) (*search.SearchIndexResult, error) {
bleveReq := bleve.NewSearchRequest(bleve.NewMatchQuery(req.Query))
bleveReq := bleve.NewSearchRequest(bleve.NewQueryStringQuery(req.Query))
bleveReq.Fields = []string{"*"}
res, err := i.bleveIndex.Search(bleveReq)
if err != nil {