mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-27 01:30:51 +00:00
v2.6.0发布
This commit is contained in:
parent
7733cf1e3f
commit
0d96ff81b6
@ -66,7 +66,7 @@ public enum ResponseStatus {
|
|||||||
/**
|
/**
|
||||||
* 搜索引擎相关错误
|
* 搜索引擎相关错误
|
||||||
* */
|
* */
|
||||||
ES_SEARCH_FAIL(9001,"密码错误!"),
|
ES_SEARCH_FAIL(9001,"搜索引擎查询错误!"),
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,8 +134,8 @@ public class SearchServiceImpl implements SearchService {
|
|||||||
log.debug(search.toString());
|
log.debug(search.toString());
|
||||||
SearchResult result;
|
SearchResult result;
|
||||||
result = jestClient.execute(search);
|
result = jestClient.execute(search);
|
||||||
if (result.isSucceeded()) {
|
|
||||||
log.debug(result.getJsonString());
|
log.debug(result.getJsonString());
|
||||||
|
if (result.isSucceeded()) {
|
||||||
|
|
||||||
Map resultMap = new ObjectMapper().readValue(result.getJsonString(), Map.class);
|
Map resultMap = new ObjectMapper().readValue(result.getJsonString(), Map.class);
|
||||||
if (resultMap.get("hits") != null) {
|
if (resultMap.get("hits") != null) {
|
||||||
@ -196,4 +196,7 @@ public class SearchServiceImpl implements SearchService {
|
|||||||
}
|
}
|
||||||
throw new BusinessException(ResponseStatus.ES_SEARCH_FAIL);
|
throw new BusinessException(ResponseStatus.ES_SEARCH_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@
|
|||||||
|
|
||||||
if(sortBy != false){
|
if(sortBy != false){
|
||||||
searchData.sort = sortBy;
|
searchData.sort = sortBy;
|
||||||
}else{
|
}else if(!keyword){
|
||||||
sortBy = "last_index_update_time";
|
sortBy = "last_index_update_time";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user