文档库--搜索全部修改
This commit is contained in:
+9
-6
@@ -290,14 +290,17 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
fieldList.add("content");
|
fieldList.add("content");
|
||||||
|
|
||||||
JSONArray queryMapJson = new JSONArray();
|
JSONArray queryMapJson = new JSONArray();
|
||||||
for (String field : fieldList) {
|
if(StringUtils.isNotBlank(selectValue)){
|
||||||
Map<String, Object> queryMap = new HashMap<>();
|
for (String field : fieldList) {
|
||||||
Map<String, Object> map2 = new HashMap<>();
|
Map<String, Object> queryMap = new HashMap<>();
|
||||||
map2.put(field, selectValue);
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
queryMap.put("match", map2);
|
map2.put(field, selectValue);
|
||||||
queryMapJson.add(queryMap);
|
queryMap.put("match", map2);
|
||||||
|
queryMapJson.add(queryMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//基础添加封装
|
//基础添加封装
|
||||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
|
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
|
||||||
//全部
|
//全部
|
||||||
|
|||||||
Reference in New Issue
Block a user