180,181-搜索中心bug修改
This commit is contained in:
+12
-5
@@ -591,9 +591,9 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// 关键字查询属性字段
|
||||
String keyWordField = field + ".keyword";
|
||||
String keyWordField2 = field + "Name.keyword";
|
||||
if(field.equals("NYLX")){
|
||||
field = field+"CLASS";
|
||||
}
|
||||
// if(field.equals("NYLX")){
|
||||
// field = field+"CLASS";
|
||||
// }
|
||||
if(collectAttrMap.containsKey(field)){
|
||||
List<String> fields = new ArrayList<>();
|
||||
Object json= new JSONTokener(collectAttrMap.get(field).toString()).nextValue();
|
||||
@@ -1647,6 +1647,7 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
// "title"
|
||||
// ).minimumShouldMatch("100%").field("title",1000f);
|
||||
|
||||
// 手机端搜索,不要搜不来企标
|
||||
if ("2".equals(searchInfoEO.getClientType())) {
|
||||
boolQueryBuilder.mustNot(QueryBuilders.termQuery("standTypeOrder", "3"));
|
||||
}
|
||||
@@ -1658,14 +1659,20 @@ public class SearchCenterServiceImpl implements SearchCenterService {
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS()) || StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getNYLXCLASS())){
|
||||
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
|
||||
"NYLXName"
|
||||
).minimumShouldMatch("100%"));
|
||||
/* queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getNYLXCLASS(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",1000f));
|
||||
).minimumShouldMatch("100%").field("title",1000f));*/
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(searchInfoEO.getCLLX())){
|
||||
queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
|
||||
"CLLXName"
|
||||
).minimumShouldMatch("100%"));
|
||||
/* queryBuilder.should(QueryBuilders.multiMatchQuery(searchInfoEO.getCLLX(),
|
||||
"textContent"
|
||||
).minimumShouldMatch("100%").field("title",1000f));
|
||||
).minimumShouldMatch("100%").field("title",1000f));*/
|
||||
}
|
||||
|
||||
boolQueryBuilder.must(queryBuilder);
|
||||
|
||||
Reference in New Issue
Block a user