| | |
| | | package controllers |
| | | package controllers |
| | | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | | "strconv" |
| | | "strings" |
| | | "webserver/cache" |
| | | "webserver/extend/code" |
| | | "webserver/extend/config" |
| | | "webserver/extend/esutil" |
| | | "basic.com/valib/logger.git" |
| | | "webserver/extend/util" |
| | | "webserver/models" |
| | | ) |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "basic.com/valib/logger.git" |
| | | "fmt" |
| | | "github.com/gin-gonic/gin" |
| | | "strconv" |
| | | "strings" |
| | | "webserver/cache" |
| | | "webserver/extend/code" |
| | | "webserver/extend/config" |
| | | "webserver/extend/esutil" |
| | | "webserver/extend/util" |
| | | "webserver/models" |
| | | ) |
| | | |
| | | type EsSearchController struct{} |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 检索 |
| | | // @Description 信息检索和比对检索 |
| | | // @Accept json |
| | |
| | | } |
| | | url := "http://" + localConf.AlarmIp + ":" + strconv.Itoa(int(localConf.AlarmPort)) + |
| | | "/" + 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\":\"" + linkId + "\"}}],\"must_not\":[{\"term\":{\"id\":\"" + id + "\"}}]}},\"size\":100}" |
| | | |
| | | buf, err := esutil.EsReq("POST", url, []byte(jsonDSL)) |
| | | if err != nil { |