...
|
...
|
@@ -141,7 +141,7 @@ public class SearchServiceHelper { |
|
|
// 4.设置查询字段和比重【AND表示多字段都要匹配,可提高精确度】
|
|
|
this.setDefaultSearchField(queryBuilder, paramMap);
|
|
|
queryBuilder.operator(MatchQueryBuilder.Operator.OR);
|
|
|
queryBuilder.minimumShouldMatch("50%");
|
|
|
queryBuilder.minimumShouldMatch("75%");
|
|
|
|
|
|
return queryBuilder;
|
|
|
}
|
...
|
...
|
@@ -166,6 +166,13 @@ public class SearchServiceHelper { |
|
|
// }
|
|
|
// return queryBuilder;
|
|
|
}
|
|
|
|
|
|
public QueryBuilder constructOrQueryBuilderForProductList(Map<String, String> paramMap) {
|
|
|
QueryBuilder queryBuilder = this.constructOrQueryBuilder(paramMap);
|
|
|
queryBuilder = this.buildPersonalSearch(queryBuilder, paramMap);
|
|
|
queryBuilder = this.buildFunctionScoreQueryBuild(queryBuilder, paramMap);
|
|
|
return queryBuilder;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 构建个性化的QueryBuilder
|
...
|
...
|
|