...
|
...
|
@@ -127,7 +127,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, indexName, searchParam);
|
|
|
if (cacheJSONArray != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/productindex/aggBrand.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/aggBrand.json", paramMap);
|
|
|
return new SearchApiResult().setData(cacheJSONArray);
|
|
|
}
|
|
|
// 4、从ES中获取
|
...
|
...
|
@@ -164,7 +164,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
final String indexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(brandAndShopSearchCache, indexName, searchParam);
|
|
|
if (cacheObject != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/productindex/brands.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/brands.json", paramMap);
|
|
|
return new SearchApiResult().setData(cacheObject);
|
|
|
}
|
|
|
// 4、查询ES
|
...
|
...
|
@@ -248,7 +248,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
final String brandIndexName = ISearchConstants.INDEX_NAME_BRAND;
|
|
|
JSONArray cacheJSONArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, brandIndexName, searchParam);
|
|
|
if (cacheJSONArray != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/brand/list.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/brand/list.json", paramMap);
|
|
|
return new SearchApiResult().setData(cacheJSONArray);
|
|
|
}
|
|
|
// 3、执行搜索
|
...
|
...
|
@@ -299,7 +299,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
final String productIndexName = ISearchConstants.INDEX_NAME_PRODUCT_INDEX;
|
|
|
JSONObject groupBrandResult = searchCacheService.getJSONObjectFromCache(brandAndShopSearchCache, productIndexName, searchParam);
|
|
|
if (groupBrandResult != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/productindex/groupBrands.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/productindex/groupBrands.json", paramMap);
|
|
|
return new SearchApiResult().setData(groupBrandResult);
|
|
|
}
|
|
|
// 6、从ES中获取
|
...
|
...
|
@@ -367,7 +367,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
// 6、先从缓存中获取,如果能取到,则直接返回
|
|
|
JSONArray jsonArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParam);
|
|
|
if (jsonArray != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/new-shelve.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/new-shelve.json", paramMap);
|
|
|
return searchApiResult.setData(jsonArray);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -460,7 +460,7 @@ public class BrandServiceImpl implements IBrandService, ApplicationEventPublishe |
|
|
// 7、先从缓存中获取,如果能取到,则直接返回
|
|
|
JSONArray jsonArray = searchCacheService.getJSONArrayFromCache(brandAndShopSearchCache, ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParam);
|
|
|
if (jsonArray != null) {
|
|
|
SearchCacheMatchLogger.doCatchMatchLog("/new_product.json", paramMap);
|
|
|
SearchCacheMatchLogger.doSearchCacheMatchLog("/new_product.json", paramMap);
|
|
|
return searchApiResult.setData(jsonArray);
|
|
|
}
|
|
|
|
...
|
...
|
|