合并分支 'fix_bug_first_stage' 到 'master'
Fix bug first stage 查看合并请求 laws-nio/laws-weilai!92
This commit is contained in:
+23
-2
@@ -380,7 +380,7 @@ public class JeroElasticsearchTemplate {
|
||||
|
||||
log.info("url:" + url + " ,search: " + queryObject.toJSONString());
|
||||
JSONObject res = RestUtil.post(url, queryObject);
|
||||
log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
||||
// log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
@@ -393,7 +393,7 @@ public class JeroElasticsearchTemplate {
|
||||
|
||||
log.info("url:" + url + " ,search: " + queryObject.toJSONString());
|
||||
JSONObject res = RestUtil.post(url,variables, queryObject);
|
||||
log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
||||
// log.info("url:" + url + " ,return res: \n" + res.toJSONString());
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -447,6 +447,27 @@ public class JeroElasticsearchTemplate {
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* 无排序
|
||||
* @param _source
|
||||
* @param query
|
||||
* @param highlight
|
||||
* @param from
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
public JSONObject buildQuery(List<String> _source, JSONObject query,Map<String, Object> highlight, int from, int size) {
|
||||
JSONObject json = new JSONObject();
|
||||
if (_source != null) {
|
||||
json.put("_source", _source);
|
||||
}
|
||||
json.put("highlight", highlight);
|
||||
json.put("query", query);
|
||||
json.put("from", from * size);
|
||||
json.put("size", size);
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return { "bool" : { "must": must, "must_not": mustNot, "should": should } }
|
||||
*/
|
||||
|
||||
+1359
-249
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user