Authored by hugufei

向量缓存在本地

... ... @@ -83,12 +83,10 @@ public class RecallResultBuilder {
paramMap.put("uid",""+uid);
PersonalizedSearch personalizedSearch = personalVectorFeatureSearch.getPersonalizedSearch(paramMap);
UserFeatureFactor userFeatureFactor = new UserFeatureFactor(personalizedSearch);
RECALL_NEW_LOGGER.info("userFeatureFactor info ,factor is[{}], version is[{}] ",userFeatureFactor.userFeatureFactors,userFeatureFactor.vectorFeatureVersion);
//2、计算相关性
for (RecallMergerResult.SknResult sknResult : sknResultList) {
double score = productFeatureFactorHepler.calProductFeatureFactor(userFeatureFactor, sknResult.getFactor());
sknResult.setScore(score);
RECALL_NEW_LOGGER.info("skn is [{}], factor is[{}] ,score is [{}] ",sknResult.getProductSkn(),sknResult.getFactor(),score);
}
//3、按得分排序
Collections.sort(sknResultList, new Comparator<RecallMergerResult.SknResult>() {
... ...
... ... @@ -54,7 +54,7 @@ public class QueryProductVectorInfoCacheBean extends AbstractCacheBean<SknVector
@Override
protected boolean useEhCache() {
return false;
return true;
}
@Override
... ...