...
|
...
|
@@ -5,6 +5,7 @@ import com.yoho.search.base.utils.CollectionUtils; |
|
|
import com.yoho.search.base.utils.ProductIndexEsField;
|
|
|
import com.yoho.search.base.utils.Transfer;
|
|
|
import com.yoho.search.common.cache.aop.SearchCacheAble;
|
|
|
import com.yoho.search.common.productlist.aop.ProductListWithSknRetention;
|
|
|
import com.yoho.search.core.es.model.SearchParam;
|
|
|
import com.yoho.search.dal.model.SimilarSkn;
|
|
|
import com.yoho.search.models.SearchApiResult;
|
...
|
...
|
@@ -54,7 +55,6 @@ public class BigdataSimilarSknService { |
|
|
return results;
|
|
|
}
|
|
|
|
|
|
|
|
|
@SearchCacheAble(cacheInMinute = 600, cacheName = "SEARCH_LIKE_NOT_IN_SHOP_SIMILAR", includeParams = { "product_skn", "viewNum" })
|
|
|
public SearchApiResult searchLikeSimilarSknNotInShop(Map<String, String> paramMap) {
|
|
|
try {
|
...
|
...
|
@@ -90,7 +90,7 @@ public class BigdataSimilarSknService { |
|
|
searchParams.add(this.builderSimilarSknSearchParam(productInfoInEs, diffShopActionSimilarSkns, true));
|
|
|
|
|
|
//5.3)文字兜底[性别+不同店铺+文字相似性]
|
|
|
searchParams.add(this.builderCharactersSearchParam(productInfoInEs, Arrays.asList(productSkn), pageSize, true));
|
|
|
searchParams.add( searchLikeHelper.builderSearchLikeNotInShopCharactersSearchParam(productInfoInEs, Arrays.asList(productSkn), pageSize,true));
|
|
|
|
|
|
// 6、获取搜索结果
|
|
|
List<List<Map<String, Object>>> queryResults = searchLikeHelper.queryProductLists(searchParams);
|
...
|
...
|
@@ -157,10 +157,6 @@ public class BigdataSimilarSknService { |
|
|
return results;
|
|
|
}
|
|
|
|
|
|
private SearchParam builderCharactersSearchParam(JSONObject productInfoInEs, List<String> notProductSkns, int pageSize, boolean inSameSort) {
|
|
|
return searchLikeHelper.builderSearchLikeNotInShopCharactersSearchParam(productInfoInEs, notProductSkns, pageSize,inSameSort);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 构建SimilarSknSearchParam[考虑productSkns为空的情况]
|
...
|
...
|
|