Skip to content

Commit

Permalink
Fix match query field
Browse files Browse the repository at this point in the history
  • Loading branch information
actumn committed Nov 3, 2020
1 parent e6863bc commit b9e8485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index/shard_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ func SearchTypeMatch(searchType interface{}) *query.MatchQuery {
}
queryString := field + ":\"" + message + "\""

return bleve.NewMatchQuery(queryString)
q := bleve.NewMatchQuery(queryString)
q.SetField(field)
return q
}

func SearchTypeMatchPhrase(searchType interface{}) *query.PhraseQuery {
Expand Down

0 comments on commit b9e8485

Please sign in to comment.