From 056caf5d061035c22b689666fd50ea1333672c67 Mon Sep 17 00:00:00 2001 From: lzh <1625167628@qq.com> Date: Wed, 3 Sep 2025 16:34:19 +0800 Subject: [PATCH] edit es search rule --- internal/app/search/es/es.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/app/search/es/es.go b/internal/app/search/es/es.go index 1e08e0c..4167fd7 100644 --- a/internal/app/search/es/es.go +++ b/internal/app/search/es/es.go @@ -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.NewMatchQuery("log", v.Content)) + queryList = append(queryList, elastic.NewMatchPhraseQuery("log", v.Content)) case sr.NotMatch: - notQuery = append(notQuery, elastic.NewMatchQuery("log", v.Content)) + notQuery = append(notQuery, elastic.NewMatchPhraseQuery("log", v.Content)) case sr.WildCard: queryList = append(queryList, elastic.NewWildcardQuery("log.keyword", "*"+v.Content+"*")) case sr.NotWildCard: