|
@@ -144,15 +144,6 @@ public class RankV3Strategy implements RankStrategy {
|
|
|
result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
|
|
|
}
|
|
|
|
|
|
- if (result.size() < param.getSize()) {
|
|
|
- // 兜底
|
|
|
- pool = param.getBackup();
|
|
|
- pool = deduplication(pool);
|
|
|
- log.info("Backup Deduplication {}", JSONUtils.toJson(pool));
|
|
|
- Collections.shuffle(pool);
|
|
|
- result.addAll(pool.subList(0, Math.min(pool.size(), param.getSize() - result.size())));
|
|
|
- }
|
|
|
-
|
|
|
return new RankResult(result);
|
|
|
}
|
|
|
|
|
@@ -174,7 +165,7 @@ public class RankV3Strategy implements RankStrategy {
|
|
|
if (!contentPool.equals(c.getContentPoolType())) {
|
|
|
continue;
|
|
|
}
|
|
|
- if (!similarity(c.getTitle(), titles)) {
|
|
|
+ if (!TitleSimilarCheckUtil.isDuplicateContent(c.getTitle(), titles)) {
|
|
|
result.add(c);
|
|
|
titles.add(c.getTitle());
|
|
|
}
|
|
@@ -184,8 +175,4 @@ public class RankV3Strategy implements RankStrategy {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- private boolean similarity(String title, List<String> titles) {
|
|
|
- return TitleSimilarCheckUtil.isDuplicateContent(title, titles);
|
|
|
- }
|
|
|
-
|
|
|
}
|