|
@@ -174,28 +174,27 @@ func GetSearchQuery(in *bxcore.SearchReq, mustQuery string) (qstr string) {
|
|
|
hasBuyerTel := in.BuyerTel
|
|
|
if hasBuyerTel != "" {
|
|
|
if hasBuyerTel == "y" {
|
|
|
- mustNot = append(mustNot, fmt.Sprintf(queryMissing, "buyertel"))
|
|
|
+ musts = append(musts, fmt.Sprintf(queryExists, "buyertel"))
|
|
|
} else {
|
|
|
- musts = append(musts, fmt.Sprintf(queryMissing, "buyertel"))
|
|
|
+ mustNot = append(mustNot, fmt.Sprintf(queryExists, "buyertel"))
|
|
|
}
|
|
|
}
|
|
|
//中标企业联系方式
|
|
|
hasWinnerTel := in.WinnerTel
|
|
|
if hasWinnerTel != "" {
|
|
|
if hasWinnerTel == "y" {
|
|
|
- mustNot = append(mustNot, fmt.Sprintf(queryMissing, "winnertel"))
|
|
|
+ musts = append(musts, fmt.Sprintf(queryExists, "winnertel"))
|
|
|
} else {
|
|
|
- musts = append(musts, fmt.Sprintf(queryMissing, "winnertel"))
|
|
|
+ mustNot = append(mustNot, fmt.Sprintf(queryExists, "winnertel"))
|
|
|
}
|
|
|
}
|
|
|
//附件
|
|
|
fileExists := in.FileExists
|
|
|
if !isFileSearch && fileExists != "" {
|
|
|
if fileExists == "1" { //有附件
|
|
|
- mustNot = append(mustNot, fmt.Sprintf(queryMissing, "isValidFile"))
|
|
|
- musts = append(musts, fmt.Sprintf(queryBoolMustTerm, 1))
|
|
|
+ musts = append(musts, fmt.Sprintf(queryBoolMustTerm, true))
|
|
|
} else if fileExists == "-1" { //无附件
|
|
|
- musts = append(musts, fmt.Sprintf(queryMissing, "isValidFile"))
|
|
|
+ mustNot = append(mustNot, fmt.Sprintf(queryBoolMustTerm, true))
|
|
|
}
|
|
|
}
|
|
|
// 如果是领域化数据则需要加标签
|