|
@@ -153,6 +153,7 @@ func NewSearchOptimize(userId, phone, province, city, district, subtype, topType
|
|
|
Period: period,
|
|
|
Changehand: changehand,
|
|
|
Scale: scale,
|
|
|
+ Isfile: isfile,
|
|
|
}
|
|
|
so.SearchParamsHandle()
|
|
|
return so
|
|
@@ -457,9 +458,9 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
|
} else {
|
|
|
wordsMusts = append(wordsMusts, keyWordsMusts...)
|
|
|
}
|
|
|
- }
|
|
|
- //附加词
|
|
|
- if so.AdditionalWords != "" {
|
|
|
+ //附加词
|
|
|
+ if so.AdditionalWords != "" {
|
|
|
+ }
|
|
|
//多组附加词,每组间,号隔开。每组内如果关键词中间有空格,自动分词
|
|
|
var (
|
|
|
addWordsMusts []string
|
|
@@ -553,10 +554,20 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
|
|
|
}
|
|
|
//换手率
|
|
|
if so.Changehand != 0 && isLogin {
|
|
|
- musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.changehand", `"`+gconv.String(so.Changehand)+`"`))
|
|
|
+ /*musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.changehand", `"`+gconv.String(so.Changehand)+`"`))
|
|
|
+ if so.Changehand > 0 {
|
|
|
+ //存在
|
|
|
+ musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"63"`))
|
|
|
+ } */
|
|
|
}
|
|
|
if so.Isfile != 0 && isLogin {
|
|
|
- musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"`+gconv.String(so.Isfile)+`"`))
|
|
|
+ if so.Isfile > 0 {
|
|
|
+ //存在
|
|
|
+ musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"63"`))
|
|
|
+ } else {
|
|
|
+ //不存在
|
|
|
+ mustNot = append(mustNot, fmt.Sprintf(queryExists, "tag_set.wuye.isfile"))
|
|
|
+ }
|
|
|
}
|
|
|
//价格
|
|
|
if so.Price != "" && len(strings.Split(so.Price, "-")) > 1 && isLogin {
|
|
@@ -1028,6 +1039,7 @@ func SearchListFormat(industry string, repl []map[string]interface{}, b bool, bi
|
|
|
|
|
|
}
|
|
|
if bidField == "BIProperty" {
|
|
|
+ v["fileExists"] = false
|
|
|
//物业数据处理
|
|
|
subinformationArr := gconv.SliceStr(v["tag_subinformation"])
|
|
|
if len(subinformationArr) > 0 {
|
|
@@ -1042,9 +1054,13 @@ func SearchListFormat(industry string, repl []map[string]interface{}, b bool, bi
|
|
|
wuye := gconv.Map(tag["wuye"])
|
|
|
if tag != nil {
|
|
|
isFile := gconv.Int64(wuye["isfile"])
|
|
|
+ propertyForm := gconv.Int64(wuye["property_form"])
|
|
|
if isFile == 63 {
|
|
|
v["fileExists"] = true
|
|
|
}
|
|
|
+ if propertyForm != 0 {
|
|
|
+ v["property_form"] = propertyForm
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
delete(v, "tag_set")
|