From b41c888631e74462dcc0bdcb426d80b2a6c5cb2d Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期三, 17 七月 2019 10:52:11 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.14:10010/r/webserver --- controllers/es.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/es.go b/controllers/es.go index 97126ef..0753d32 100644 --- a/controllers/es.go +++ b/controllers/es.go @@ -167,7 +167,7 @@ queryBody := searchBody.InputValue //妫�绱㈡ if queryBody != "" { - queryStr = "\"must\":[{\"multi_match\":{\"query\":\"" + queryBody + "\",\"fields\":[\"tableName^1.5\",\"sex^2.0\",\"race^2.0\",\"content^1.0\",\"idCard^1.8\",\"cameraAddr^1.0\"]," + + queryStr = "\"must\":[{\"multi_match\":{\"query\":\"" + queryBody + "\",\"fields\":[\"alarmRules.alarmLevel^1.5\",\"ageDescription^1.5\",\"taskName^1.5\",\"baseInfo.tableName^1.5\",\"sex^2.0\",\"race^2.0\",\"content^1.0\",\"baseInfo.idCard^1.8\",\"cameraAddr^1.0\"]," + "\"type\":\"cross_fields\",\"operator\":\"OR\",\"slop\":0,\"prefix_length\":0,\"max_expansions\":50,\"zero_terms_query\":\"NONE\",\"auto_generate_synonyms_phrase_query\":true,\"fuzzy_transpositions\":true,\"boost\":1}}]," } gteDate := searchBody.SearchTime[0] @@ -192,7 +192,7 @@ esTableIdStr := "" if tableId != nil && len(tableId) > 0 { esTableId = strings.Replace(strings.Trim(fmt.Sprint(tableId), "[]"), " ", "\",\"", -1) - esTableIdStr = "{\"terms\":{\"tableId\":[\"" + esTableId + "\"]}}," + esTableIdStr = "{\"terms\":{\"baseInfo.tableId\":[\"" + esTableId + "\"]}}," } isCollectionStr := "" isCollection := searchBody.Collection -- Gitblit v1.8.0