|
|
@@ -63,28 +63,32 @@ public class RankV20Strategy implements RankStrategy {
|
|
|
double score;
|
|
|
int index = weightService.getIndex(item.getContent().getContentPoolType(), contentPools);
|
|
|
if (contentPools[0].equals(item.getContent().getContentPoolType())) {
|
|
|
- score = item.getScore(ScoreStrategyEnum.SIMILARITY.value())
|
|
|
- * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.SIMILARITY.value())
|
|
|
- + item.getScore(ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ double i2iScore = item.getScore(ScoreStrategyEnum.I2I_RECOMMEND_STRATEGY.value())
|
|
|
* weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.CATEGORY.value())
|
|
|
- + item.getScore(ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value())
|
|
|
- * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value())
|
|
|
- + item.getScore(ScoreStrategyEnum.I2I_RECOMMEND_STRATEGY.value())
|
|
|
- * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.I2I_RECOMMEND_STRATEGY.value())
|
|
|
- + item.getScore(ScoreStrategyEnum.FLOW_CTL_DECREASE.value())
|
|
|
- + item.getScore(ScoreStrategyEnum.CRAWLER_DAYS_DECREASE_STRATEGY.value());
|
|
|
- if (item.getScore(ScoreStrategyEnum.PUBLISH_TIMES.value()) >= 0) {
|
|
|
- score += item.getScore(ScoreStrategyEnum.VIEW_COUNT_RATE.value())
|
|
|
+ ScoreStrategyEnum.I2I_RECOMMEND_STRATEGY.value());
|
|
|
+ if (i2iScore > 0) {
|
|
|
+ score = i2iScore;
|
|
|
+ } else {
|
|
|
+ score = item.getScore(ScoreStrategyEnum.SIMILARITY.value())
|
|
|
* weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.VIEW_COUNT_RATE.value());
|
|
|
- }
|
|
|
- if (item.getScore(ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value()) == 0) {
|
|
|
- score += hisFissionOpenRateMissingBaseline * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
- ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value());
|
|
|
+ ScoreStrategyEnum.SIMILARITY.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.CATEGORY.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value())
|
|
|
+ * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.FLOW_CTL_DECREASE.value())
|
|
|
+ + item.getScore(ScoreStrategyEnum.CRAWLER_DAYS_DECREASE_STRATEGY.value());
|
|
|
+ if (item.getScore(ScoreStrategyEnum.PUBLISH_TIMES.value()) >= 0) {
|
|
|
+ score += item.getScore(ScoreStrategyEnum.VIEW_COUNT_RATE.value())
|
|
|
+ * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.VIEW_COUNT_RATE.value());
|
|
|
+ }
|
|
|
+ if (item.getScore(ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value()) == 0) {
|
|
|
+ score += hisFissionOpenRateMissingBaseline * weightService.getWeight(param.getStrategy(), param.getGhId(), index,
|
|
|
+ ScoreStrategyEnum.HIS_FISSION_OPEN_RATE.value());
|
|
|
+ }
|
|
|
}
|
|
|
} else if (contentPools[1].equals(item.getContent().getContentPoolType())) {
|
|
|
score = item.getScore(ScoreStrategyEnum.SIMILARITY.value())
|