feat: There is no way the, 优化ES 权重 全文搜索

This commit is contained in:
super_liu
2022-04-28 13:22:57 +08:00
parent 464b11f47d
commit 375401e83a
2 changed files with 88 additions and 55 deletions
@@ -84,7 +84,7 @@ public class SearchCenterController extends BaseController<Map<String, Object>>
if (StringUtils.isAlphanumericSpace(searchInfoEO.getSelectIndex())) {
if(elasticsearchService.isIndexExist(searchInfoEO.getSelectIndex())){
if("fulltextserch".equals(searchInfoEO.getSelectIndex()) || "fulltextserch"== searchInfoEO.getSelectIndex()){
Pattern pattern = Pattern.compile("^[0-9a-zA-Z\\.\\(\\\\\\)\\s\\/\\-]+$");
Pattern pattern = Pattern.compile("^[0-9a-zA-Z\\.\\(\\\\\\)\\s\\/\\-\\:]+$");
if (null != searchInfoEO.getSelectValue() && StringUtils.isNotBlank(searchInfoEO.getSelectValue())) {
if (pattern.matcher(searchInfoEO.getSelectValue()).matches()) {
result = searchCenterService.searchSarBykeyAndHighLightNumber(searchInfoEO);