升级Es驱动版本

This commit is contained in:
2021-04-08 17:54:07 +08:00
parent 32d1f77ec7
commit 1626ab944d
8 changed files with 199 additions and 321 deletions
@@ -319,7 +319,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
headers.put("Content-Type", "application/json");
headers.put("Authorization", "Basic "+authenticationEncoding+"");
try {
String response = request.postWithBody("http://es.fangjia.com:9200/"+table+"/_search", reqBody, headers, "UTF-8");
String response = request.postWithBody("http://es.fangjia.com:9200/"+table+"/_search?rest_total_hits_as_int=true", reqBody, headers, "UTF-8");
JSONObject json = JSONObject.fromObject(response);
long time2 = System.currentTimeMillis();
System.out.println(time2-time1);