...
|
...
|
@@ -30,6 +30,7 @@ import com.yoho.search.core.es.model.SearchParam; |
|
|
import com.yoho.search.core.es.model.SearchResult;
|
|
|
import com.yoho.search.service.aggregations.impls.AggregationFactoryService;
|
|
|
import com.yoho.search.service.cache.SearchCacheFactory;
|
|
|
import com.yoho.search.service.cache.SearchCacheMatchLogger;
|
|
|
import com.yoho.search.service.cache.model.SearchCache;
|
|
|
import com.yoho.search.service.service.SearchCacheService;
|
|
|
import com.yoho.search.service.service.SearchCommonService;
|
...
|
...
|
@@ -40,7 +41,6 @@ import com.yoho.search.service.service.base.StyleIndexBaseService; |
|
|
import com.yoho.search.service.service.helper.SearchParamHelper;
|
|
|
import com.yoho.search.service.service.helper.SearchServiceHelper;
|
|
|
import com.yoho.search.service.servicenew.ISelectionsForPc;
|
|
|
import com.yoho.search.service.utils.HttpServletRequestUtils;
|
|
|
import com.yoho.search.service.utils.SearchRequestParams;
|
|
|
import com.yoho.search.service.vo.SearchApiResult;
|
|
|
|
...
|
...
|
@@ -78,7 +78,6 @@ public class SelectionsForPcImpl implements ISelectionsForPc { |
|
|
}
|
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(SelectionsForPcImpl.class);
|
|
|
private static Logger CACHE_MATCH_REQUEST = LoggerFactory.getLogger("CACHE_MATCH_REQUEST");
|
|
|
|
|
|
@Override
|
|
|
public SearchApiResult getSelectionsForPc(Map<String, String> paramMap) {
|
...
|
...
|
@@ -107,7 +106,7 @@ public class SelectionsForPcImpl implements ISelectionsForPc { |
|
|
JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(aggregationSearchCache, indexName, searchParamClone);
|
|
|
if (cacheObject != null) {
|
|
|
Object newCacheObject = searchAfterCacheService.dealFilterCacheObject(cacheObject);
|
|
|
CACHE_MATCH_REQUEST.info("match cache , url is :/productindex/selectionsForPc.json?" + HttpServletRequestUtils.genParamString(paramMap));
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/selectionsForPc.json", paramMap);
|
|
|
return new SearchApiResult().setData(newCacheObject);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -192,8 +191,8 @@ public class SelectionsForPcImpl implements ISelectionsForPc { |
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private Object doPreSearch(SearchParam searchParam, Map<String, String> paramMap) throws Exception {
|
|
|
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
private Object doPreSearch(SearchParam searchParam, Map<String, String> paramMap) {
|
|
|
String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
|
|
|
SearchResult searchResult = searchCommonService.doSearch(indexName, searchParam);
|
|
|
Map<String, Aggregation> aggMaps = searchResult.getAggMaps();
|
...
|
...
|
|