文档库--搜索分页

This commit is contained in:
zhn
2022-03-30 15:30:03 +08:00
parent a500d5b898
commit 7c781e52f9
@@ -177,7 +177,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(must, null, should);
//1. 封装分页和字段值
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(sourceList, jsonObject, null, null,
Integer.parseInt(map.get("pageNo").toString()), Integer.parseInt(map.get("pageSize").toString()));
Integer.parseInt(map.get("pageNo").toString())-1, Integer.parseInt(map.get("pageSize").toString()));
//2. 数据查询
JSONObject search = jeroElasticsearchTemplate.search(SearchEnum.INDEX_NAME_DOCUMENT.getValue(),
SearchEnum.TYPE_NAME_DOCUMENT.getValue(), queryObject);
@@ -516,7 +516,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
jsonObject,
null,
null,
pageNo,
pageNo-1,
pageSize);
// JSONObject queryObject11 = jeroElasticsearchTemplate.buildQuery(null, jsonObject11,highlightMap,null, Integer.parseInt(map.get("pageNo").toString()), Integer.parseInt(map.get("pageSize").toString()));
//2. 数据查询
@@ -529,7 +529,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
null,
null,
null,
pageNo,
pageNo-1,
pageSize);
//全部的数据(调试接口用--最后删除即可)
JSONObject searchAll = jeroElasticsearchTemplate.search(SearchEnum.FULL_TEXT_SEARCH.getValue(),