Authored by hugufei

去除人气值和点击率的A/B

... ... @@ -8,15 +8,14 @@ import com.yoho.search.base.utils.Transfer;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.recall.common.ABUserPartitionUtils;
import com.yoho.search.recall.scene.beans.builder.UserRecallRequestBuilder;
import com.yoho.search.recall.scene.beans.cache.SknReturnInfoCacheBean;
import com.yoho.search.recall.scene.beans.cache.UserRecallCacheBean;
import com.yoho.search.recall.scene.beans.helper.SortBuilderHelper;
import com.yoho.search.recall.scene.beans.strategy.StrategyEnum;
import com.yoho.search.recall.scene.models.common.RecallSknInfo;
import com.yoho.search.recall.scene.models.req.UserRecallRequest;
import com.yoho.search.recall.scene.models.req.UserRecallResponse;
import com.yoho.search.recall.scene.models.common.RecallSknInfo;
import com.yoho.search.service.base.SearchCommonService;
import com.yoho.search.service.base.SearchDynamicConfigService;
import com.yoho.search.service.helper.SearchCommonHelper;
... ... @@ -165,7 +164,7 @@ public class SceneRecallProductListService {
private List<RecallSknInfo> queryProductSknByFilterSkn(UserRecallRequest userRecallRequest, List<RecallSknInfo> recallSknInfos, int realPage, int pageSize) {
long begin = System.currentTimeMillis();
//0、策略区分
StrategyEnum strategyEnum = ABUserPartitionUtils.isAUserComplete(userRecallRequest.getUid(), userRecallRequest.getUdid()) ? StrategyEnum.DEFAULT_HEAT_VALUE : StrategyEnum.DEFAULT_CTR_VALUE;
StrategyEnum strategyEnum = StrategyEnum.DEFAULT_HEAT_VALUE;
//1、设置query
SearchParam searchParam = new SearchParam();
... ... @@ -186,11 +185,7 @@ public class SceneRecallProductListService {
searchParam.setIncludeFields(Arrays.asList(ProductIndexEsField.productSkn));
//5、设置排序
List<SortBuilder<?>> sortBuilders = new ArrayList<>();
if (strategyEnum.equals(StrategyEnum.DEFAULT_HEAT_VALUE)) {
sortBuilders.add(SortBuilderHelper.getHeatValueDescSort());
} else {
sortBuilders.add(SortBuilderHelper.getCtrValueDescSort());
}
sortBuilders.add(SortBuilderHelper.getHeatValueDescSort());
sortBuilders.add(SortBuilderHelper.getSevendayMoneyDescSort());
sortBuilders.add(SortBuilderHelper.getIdDescSort());
searchParam.setSortBuilders(sortBuilders);
... ...
package com.yoho.search.recall.scene.beans.builder;
import com.yoho.search.recall.common.ABUserPartitionUtils;
import com.yoho.search.recall.scene.beans.strategy.impls.*;
import com.yoho.search.recall.scene.constants.SknCountConstants;
import com.yoho.search.recall.scene.models.common.ParamQueryFilter;
... ... @@ -35,11 +34,7 @@ public class CommonRecallRequestBuilder {
//1.4) 流量补偿的召回
requests.add(this.buildAddFlowRequest(paramQueryFilter, SknCountConstants.ADD_FLOW));
//1.5) 页面的兜底召回
if (ABUserPartitionUtils.isAUserComplete(userRecallRequest.getUid(), userRecallRequest.getUdid())) {
requests.add(this.buildCommonHeatValueStrategy(paramQueryFilter, pageSize));
} else {
requests.add(this.buildCommonCtrValueStrategy(paramQueryFilter, pageSize));
}
requests.add(this.buildCommonHeatValueStrategy(paramQueryFilter, pageSize));
return requests;
}
... ...
package com.yoho.search.service.list;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.recall.common.ABUserPartitionUtils;
import com.yoho.search.recall.scene.SceneRecallProductListService;
import com.yoho.search.service.base.SearchDynamicConfigService;
import com.yoho.search.service.helper.SearchCommonHelper;
... ...