Authored by hugufei

向量缓存在本地

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