Authored by hugufei

Merge branch 'master' into 0815

... ... @@ -11,7 +11,6 @@ import com.yoho.search.service.scorer.SearchScorerFactory;
import com.yoho.search.service.scorer.YohoFilterFunctionBuilders;
import com.yoho.search.service.scorer.personal.PersonalVectorFeatureSearch;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.elasticsearch.common.lucene.search.function.CombineFunction;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
... ... @@ -193,7 +192,7 @@ public class FunctionScoreSearchHelper {
// 5、断码商品
//scorers.add(searchScorerFactory.getBreakSizeProductScorer(paramMap));
// 6、基于向量的个性化打分
scorers.add(this.getPersonalVectorFeatureScorer(persionalFilter, paramMap));
//scorers.add(this.getPersonalVectorFeatureScorer(persionalFilter, paramMap));
return scorers;
}
... ...
... ... @@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
... ... @@ -45,13 +44,15 @@ public class SearchScorerFactory {
return null;
}
if (!searchCommonHelper.isFuzzySearchPageDefault(paramMap)) {
return new UfoProductScorer(0.5f);
//return new UfoProductScorer(0.5f);
return null;
}
String query = MapUtils.getString(paramMap,SearchRequestParams.PARAM_SEARCH_QUERY,"");
if(dynamicConfig.ufoProductFirstBySearchKeyWord(query)){
String query = MapUtils.getString(paramMap, SearchRequestParams.PARAM_SEARCH_QUERY, "");
if (dynamicConfig.ufoProductFirstBySearchKeyWord(query)) {
return new UfoProductScorer(20f);
}else{
return new UfoProductScorer(0.5f);
} else {
//return new UfoProductScorer(0.5f);
return null;
}
}
... ...