From 2250141a3fe526a0c2a70a7285accf3af72635c7 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 14 八月 2019 16:33:07 +0800
Subject: [PATCH] fix GetLinkInfo by linkId and id

---
 controllers/esSearch.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/controllers/esSearch.go b/controllers/esSearch.go
index 7e18927..c275ab0 100644
--- a/controllers/esSearch.go
+++ b/controllers/esSearch.go
@@ -192,7 +192,7 @@
 func GetLinkInfo(linkId string, id string) []map[string]interface{} {
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
 		"/" + config.EsInfo.EsIndex.VideoPersons.IndexName + "," + config.EsInfo.EsIndex.Personaction.IndexName + "/_search?search_type=dfs_query_then_fetch"
-	jsonDSL := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"linkId.keyword\":\"" + linkId + "\"}}],\"must_not\":[{\"term\":{\"_id\":\"" + id + "\"}}]}},\"size\":100}"
+	jsonDSL := "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"linkId.keyword\":\"" + linkId + "\"}}],\"must_not\":[{\"term\":{\"id\":\"" + id + "\"}}]}},\"size\":100}"
 
 	buf, err := esutil.EsReq("POST", url, []byte(jsonDSL))
 	if err != nil {

--
Gitblit v1.8.0