...
|
...
|
@@ -108,7 +108,7 @@ public class SearchLikeHelper { |
|
|
* @param productSkn
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getProductInfoInEs(String productSkn) {
|
|
|
protected JSONObject getProductInfoInEs(String productSkn) {
|
|
|
SearchParam searchParam = new SearchParam();
|
|
|
searchParam.setQuery(QueryBuilders.matchAllQuery());
|
|
|
BoolQueryBuilder boolFilter = QueryBuilders.boolQuery();
|
...
|
...
|
@@ -118,10 +118,6 @@ public class SearchLikeHelper { |
|
|
searchParam.setSize(1);
|
|
|
|
|
|
String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONObject jsonObject = searchCacheService.getJSONObjectFromCache(searchLikeSearchCache, productIndexName, searchParam);
|
|
|
if (jsonObject != null) {
|
|
|
return jsonObject;
|
|
|
}
|
|
|
SearchResult searchResult = searchCommonService.doSearch(productIndexName, searchParam);
|
|
|
if (searchResult == null) {
|
|
|
return null;
|
...
|
...
|
@@ -130,9 +126,8 @@ public class SearchLikeHelper { |
|
|
if (productLists == null || productLists.isEmpty()) {
|
|
|
return null;
|
|
|
}
|
|
|
jsonObject = new JSONObject();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.putAll(productLists.get(0));
|
|
|
searchCacheService.addJSONObjectToCache(searchLikeSearchCache, productIndexName, searchParam, jsonObject);
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
...
|
...
|
|