This commit is contained in:
lzh
2025-09-03 16:36:38 +08:00
parent 056caf5d06
commit 8a29bf610c

View File

@@ -84,9 +84,9 @@ func (e *esSearch) Search(req model.GetLogReq, filterProcessName ...string) mode
for _, v := range sr.QueryStringAnalysis(req.Match.Log) {
switch v.Cond {
case sr.Match:
queryList = append(queryList, elastic.NewMatchPhraseQuery("log", v.Content))
queryList = append(queryList, elastic.NewMatchQuery("log", v.Content))
case sr.NotMatch:
notQuery = append(notQuery, elastic.NewMatchPhraseQuery("log", v.Content))
notQuery = append(notQuery, elastic.NewMatchQuery("log", v.Content))
case sr.WildCard:
queryList = append(queryList, elastic.NewWildcardQuery("log.keyword", "*"+v.Content+"*"))
case sr.NotWildCard: