|
@@ -552,7 +552,6 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
}
|
|
}
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_subinformation":[%s]}}`, strings.Join(arr, ","))))
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_subinformation":[%s]}}`, strings.Join(arr, ","))))
|
|
- //musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_subinformation", `"`+strings.ReplaceAll(so.Subinformation, ", ", `", "`)+`"`))
|
|
|
|
}
|
|
}
|
|
//价格区间
|
|
//价格区间
|
|
if so.Scale != "" && isLogin {
|
|
if so.Scale != "" && isLogin {
|
|
@@ -561,7 +560,6 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
}
|
|
}
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.scale":[%s]}}`, strings.Join(arr, ","))))
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.scale":[%s]}}`, strings.Join(arr, ","))))
|
|
- //musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_set.wuye.scale", `"`+gconv.String(so.Scale)+`"`))
|
|
|
|
}
|
|
}
|
|
//合同周期
|
|
//合同周期
|
|
if so.Period != "" && isLogin {
|
|
if so.Period != "" && isLogin {
|
|
@@ -570,13 +568,12 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
arr = append(arr, fmt.Sprintf(`"%s"`, v))
|
|
}
|
|
}
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.period":[%s]}}`, strings.Join(arr, ","))))
|
|
musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.period":[%s]}}`, strings.Join(arr, ","))))
|
|
- //musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_set.wuye.period", `"`+gconv.String(so.Period)+`"`))
|
|
|
|
}
|
|
}
|
|
//换手率
|
|
//换手率
|
|
if so.Changehand != 0 && isLogin {
|
|
if so.Changehand != 0 && isLogin {
|
|
if so.Changehand > 0 {
|
|
if so.Changehand > 0 {
|
|
//存在
|
|
//存在
|
|
- musts = append(musts, `{"range":{"tag_set.wuye.changehand":{"gte":0}}}`)
|
|
|
|
|
|
+ musts = append(musts, `{"range":{"tag_set.wuye.changehand":{"gt":0.3}}}`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if so.Isfile != 0 && isLogin {
|
|
if so.Isfile != 0 && isLogin {
|