Ver código fonte

wip:行业搜索一级分类其他

wangshan 1 ano atrás
pai
commit
578f563e49
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      jyBXCore/rpc/model/es/search.go

+ 3 - 1
jyBXCore/rpc/model/es/search.go

@@ -162,10 +162,12 @@ func GetSearchQuery(in *bxcore.SearchReq, mustQuery string) (qstr string) {
 				}
 			}
 		}
+		//一级行业-其他
 		if topQT {
-			mustNot = append(mustNot, `{"exists": {"field": "s_subscopeclass"}}`)
+			mustNot = append(mustNot, `{"exists": {"field": "s_topscopeclass"}}`)
 		}
 		if len(topSC) > 0 {
+			//二级行业-其他
 			musts = append(musts, fmt.Sprintf(queryBoolMustScopeClass, `"`+strings.ReplaceAll(in.Industry, ",", `","`)+`"`, `"`+strings.Join(topSC, `","`)+`"`))
 		} else {
 			musts = append(musts, fmt.Sprintf(queryBoolMustA, "s_subscopeclass", `"`+strings.ReplaceAll(in.Industry, ",", `","`)+`"`))