Authored by hugufei

移包

... ... @@ -3,7 +3,7 @@ package com.yoho.search.recall.scene.builder.request;
import com.yoho.search.recall.scene.constants.SknCountConstants;
import com.yoho.search.recall.scene.models.ParamQueryFilter;
import com.yoho.search.recall.scene.models.RecallRequest;
import com.yoho.search.recall.scene.persional.PersionalFactor;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.recall.scene.strategy.impls.SortPriceStrategy;
import org.springframework.stereotype.Component;
... ...
... ... @@ -4,7 +4,7 @@ import com.yoho.search.base.utils.CollectionUtils;
import com.yoho.search.recall.scene.models.RecallSknParams;
import com.yoho.search.recall.scene.models.RecallResponseBatch;
import com.yoho.search.recall.scene.models.RecallSknList;
import com.yoho.search.recall.scene.persional.PersionalFactor;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.recall.scene.strategy.StrategyNameEnum;
import com.yoho.search.service.base.ProductListSortKey;
import com.yoho.search.service.base.ProductListSortService;
... ...
... ... @@ -9,8 +9,8 @@ import com.yoho.search.recall.scene.models.RecallRequest;
import com.yoho.search.recall.scene.models.RecallResponseBatch;
import com.yoho.search.recall.scene.models.RecallSknParams;
import com.yoho.search.recall.scene.models.RecallSknList;
import com.yoho.search.recall.scene.persional.PersionalFactor;
import com.yoho.search.recall.scene.persional.RecallPersionalService;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.recall.scene.persional.PersionalFactorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
... ... @@ -23,7 +23,7 @@ import java.util.Map;
public class CacheRecallSknParamsRecallSknListBean extends AbstractCacheRequestResponseComponent<RecallSknParams,RecallSknList,CacheRecallSknParamsRecallSknList> {
@Autowired
private RecallPersionalService recallPersionalService;
private PersionalFactorService persionalFactorService;
@Autowired
private CacheRecallRequestRecallResponseBean cacheRecallRequestResponseBean;
@Autowired
... ... @@ -74,7 +74,7 @@ public class CacheRecallSknParamsRecallSknListBean extends AbstractCacheRequestR
*/
private RecallSknList doRealRecall(RecallSknParams param) {
//1、获取个性化因子
PersionalFactor persionalFactor = recallPersionalService.queryPersionalFactor(param);
PersionalFactor persionalFactor = persionalFactorService.queryPersionalFactor(param);
//2、构造请求
List<RecallRequest> batchRequests = this.buildBatchRequests(param, persionalFactor);
//3、批量召回
... ...
package com.yoho.search.recall.scene.persional;
package com.yoho.search.recall.scene.models;
import java.io.Serializable;
import java.util.List;
/**
* 个性化因子参数
*/
public class PersionalFactor implements Serializable{
private static final long serialVersionUID = 89030356435559223L;
... ...
... ... @@ -7,10 +7,9 @@ import com.yoho.search.common.cache.model.SearchCache;
import com.yoho.search.core.es.model.SearchParam;
import com.yoho.search.core.es.model.SearchResult;
import com.yoho.search.recall.scene.models.ParamQueryFilter;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.service.base.SearchCacheService;
import com.yoho.search.service.base.SearchCommonService;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.AggregationBuilders;
... ... @@ -26,7 +25,7 @@ import java.util.List;
import java.util.Map;
@Component
class PersionalFactorPageComponent {
class PagePersionalFactorComponent {
@Autowired
private SearchCommonService searchCommonService;
... ...
package com.yoho.search.recall.scene.persional;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.recall.scene.models.RecallSknParams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -10,14 +11,14 @@ import java.util.ArrayList;
import java.util.List;
@Component
public class RecallPersionalService {
public class PersionalFactorService {
private static final Logger logger = LoggerFactory.getLogger(RecallPersionalService.class);
private static final Logger logger = LoggerFactory.getLogger(PersionalFactorService.class);
@Autowired
private PersionalFactorPageComponent pageComponent;
private PagePersionalFactorComponent pageComponent;
@Autowired
private PersionalFactorUserComponent userComponent;
private UserPersionalFactorComponent userComponent;
/**
* 获取个性化因子
... ...
package com.yoho.search.recall.scene.persional;
import com.yoho.search.recall.scene.models.PersionalFactor;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
@Component
class PersionalFactorUserComponent {
class UserPersionalFactorComponent {
/**
* 获取用户的个性化因子
... ...
... ... @@ -2,7 +2,7 @@ package com.yoho.search.recall.scene.strategy.helper;
import com.yoho.search.base.utils.DateUtil;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.recall.scene.persional.PersionalFactor;
import com.yoho.search.recall.scene.models.PersionalFactor;
import org.apache.lucene.search.join.ScoreMode;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
... ...
... ... @@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.yoho.search.recall.scene.constants.CacheTimeConstants;
import com.yoho.search.recall.scene.strategy.helper.ExtendFilterHelper;
import com.yoho.search.recall.scene.strategy.helper.SortBuilderHelper;
import com.yoho.search.recall.scene.persional.PersionalFactor;
import com.yoho.search.recall.scene.models.PersionalFactor;
import com.yoho.search.recall.scene.strategy.IStrategy;
import com.yoho.search.recall.scene.strategy.StrategyNameEnum;
import org.elasticsearch.index.query.QueryBuilder;
... ...