|
@@ -157,7 +157,7 @@ const (
|
|
SearchMaxPageNum = 10 //免费用户500条记录
|
|
SearchMaxPageNum = 10 //免费用户500条记录
|
|
SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
|
|
SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
|
|
|
|
|
|
- bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","filetext","spidercode","site"`
|
|
|
|
|
|
+ bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","spidercode","site"` //,"filetext"
|
|
bidSearch_field = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
|
|
bidSearch_field = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
|
|
query_bool_should = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
|
|
query_bool_should = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
|
|
)
|
|
)
|
|
@@ -270,13 +270,15 @@ func GetBidSearchQuery(in *bxcore.SearchReq) string {
|
|
alltype := ``
|
|
alltype := ``
|
|
//二级分类
|
|
//二级分类
|
|
if subtype != "" {
|
|
if subtype != "" {
|
|
|
|
+ var typeInt = 0
|
|
alltype += `{"terms":{"subtype":[`
|
|
alltype += `{"terms":{"subtype":[`
|
|
for k, v := range strings.Split(subtype, ",") {
|
|
for k, v := range strings.Split(subtype, ",") {
|
|
if ttype := MC.If(topTypeMap[v] != "" && in.Toptype == "", topTypeMap[v], "").(string); ttype != "" {
|
|
if ttype := MC.If(topTypeMap[v] != "" && in.Toptype == "", topTypeMap[v], "").(string); ttype != "" {
|
|
toptype = append(toptype, ttype)
|
|
toptype = append(toptype, ttype)
|
|
|
|
+ typeInt += 1
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- if k > 0 {
|
|
|
|
|
|
+ if k > typeInt {
|
|
alltype += `,`
|
|
alltype += `,`
|
|
}
|
|
}
|
|
alltype += `"` + v + `"`
|
|
alltype += `"` + v + `"`
|