...
|
...
|
@@ -83,7 +83,12 @@ public class ProductListServiceImpl implements IProductListService { |
|
|
}
|
|
|
|
|
|
// 6)查询ES
|
|
|
SearchResult searchResult = searchCommonService.doSearch(indexName, searchParam);
|
|
|
List<String> indexNames = new ArrayList<String>();
|
|
|
indexNames.add(ISearchConstants.INDEX_NAME_PRODUCT_INDEX);
|
|
|
if(searchCommonHelper.containGlobal(paramMap)){
|
|
|
indexNames.add(ISearchConstants.INDEX_NAME_GLOBAL);
|
|
|
}
|
|
|
SearchResult searchResult = searchCommonService.doSearch(indexNames, searchParam);
|
|
|
if (searchResult == null) {
|
|
|
return new SearchApiResult().setCode(500).setMessage("execption");
|
|
|
}
|
...
|
...
|
@@ -97,7 +102,7 @@ public class ProductListServiceImpl implements IProductListService { |
|
|
searchKeyWordService.handleEmptyRecords(paramMap);
|
|
|
logger.info("search result is empty by operator of AND, will use operator of OR to reenforce search result");
|
|
|
searchParam.setQuery(searchServiceHelper.constructOrQueryBuilder(paramMap));
|
|
|
searchResult = searchCommonService.doSearch(indexName, searchParam);
|
|
|
searchResult = searchCommonService.doSearch(indexNames, searchParam);
|
|
|
}
|
|
|
|
|
|
// 9)构造返回结果
|
...
|
...
|
|