Commit 72e3692a by xupeng

调整过滤

parent 8878b19d
...@@ -442,11 +442,6 @@ public class SuggestTask { ...@@ -442,11 +442,6 @@ public class SuggestTask {
return true; return true;
} }
// 敏感词过滤
if (suggestKeywordInfo.getIsSensitive()) {
return true;
}
// 前缀过滤 // 前缀过滤
for (String prefix : prefixFilterList) { for (String prefix : prefixFilterList) {
if (suggestKeywordInfo.getKeyword().startsWith(prefix)) { if (suggestKeywordInfo.getKeyword().startsWith(prefix)) {
...@@ -460,6 +455,11 @@ public class SuggestTask { ...@@ -460,6 +455,11 @@ public class SuggestTask {
return false; return false;
} }
// 敏感词过滤
if (suggestKeywordInfo.getIsSensitive()) {
return true;
}
// 过滤掉纯数字的搜索词,原:过滤掉商品id,商品id是有7位数字组成 // 过滤掉纯数字的搜索词,原:过滤掉商品id,商品id是有7位数字组成
if (suggestKeywordInfo.getKeyword().length() > 6 && StringUtils.isNumber(suggestKeywordInfo.getKeyword())) { if (suggestKeywordInfo.getKeyword().length() > 6 && StringUtils.isNumber(suggestKeywordInfo.getKeyword())) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment