|
@@ -23,6 +23,7 @@ import com.tzld.piaoquan.recommend.server.util.JSONUtils;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|
|
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
|
|
|
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
|
@@ -43,6 +44,8 @@ public class TopRecommendPipeline {
|
|
|
|
|
|
public static final String MERGE_CONF = "merge_config.conf";
|
|
|
|
|
|
+ @Value("${recommend.recall.num:500}")
|
|
|
+ private int recallNum;
|
|
|
@Resource
|
|
|
private RedisSmartClient client;
|
|
|
@Resource
|
|
@@ -111,8 +114,6 @@ public class TopRecommendPipeline {
|
|
|
public List<RankItem> feedByRec(final RecommendRequest requestData,
|
|
|
final int requestIndex,
|
|
|
final User userInfo, Boolean logPrint) {
|
|
|
- int recallNum = 150;
|
|
|
-
|
|
|
Stopwatch stopwatch = Stopwatch.createStarted();
|
|
|
|
|
|
// Step 2: create top queue
|