| | |
| | | if tableId == "all" || tableId == "" { |
| | | // / 所有人员 |
| | | } else { |
| | | syncTerm = ",{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员 |
| | | syncTerm = "{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员 |
| | | } |
| | | if contentValue != "" { |
| | | contentParam = ",\"must\":[{\"multi_match\":{\"query\":\"" + contentValue + "\",\"type\":\"best_fields\"," + |
| | |
| | | if tableId == "all" || tableId == "" { |
| | | // / 所有人员 |
| | | } else { |
| | | syncTerm = ",{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员 |
| | | syncTerm = "{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员 |
| | | } |
| | | if orderType == "desc" { |
| | | orderType = "desc" |
| | |
| | | orderType = "asc" |
| | | } |
| | | |
| | | params := "{\"query\":{\"bool\":{\"filter\":[" + |
| | | "{\"term\":{\"isDelete\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}" |
| | | //params := "{\"query\":{\"bool\":{\"filter\":[" + |
| | | // "{\"term\":{\"isDelete\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}" |
| | | params := "{\"query\":{\"bool\":{\"must_not\":[" + |
| | | "{\"term\":{\"isDelete\":\"1\"}}],\"filter\":[" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}" |
| | | fmt.Print("请求url:%s;\n 请求参数params:%s", url, params) |
| | | data := esutil.GetEsDataReq(url, params, true) |
| | | featByte := make([]byte, 0, 1024) |