Authored by 胡古飞

query trim

... ... @@ -44,7 +44,7 @@ public class FunctionScoreSearchHelper {
functionScoreQueryBuilder.add(QueryBuilders.termQuery("isGlobal", "Y"), genWeightFactorBuilder(globalWeight));
}
if (searchCommonHelper.isFuzzySearchDefault(paramMap)) {
String queryLowerCase = paramMap.get("query").toLowerCase();
String queryLowerCase = paramMap.get("query").trim().toLowerCase();
functionScoreQueryBuilder.add(QueryBuilders.termQuery("brandName.brandName_lowercase", queryLowerCase), this.genWeightFactorBuilder(brandTotalMatchWeight));
}
if (searchCommonHelper.isNeedDeScoreBrandSearch(paramMap)) {
... ...