|
@@ -32,7 +32,7 @@ const (
|
|
|
bidSearch_field = ``
|
|
|
|
|
|
forecastQuery = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match":1}}}`
|
|
|
- filter_must_time = `{"bool":{"%s":[{"exists":{"field":"top_category"}}]}},{"bool":{"should":[{"bool":{"must":[{"range":{"yucetime":{"gte":%d}}}],"must_not":[{"constant_score":{"filter":{"exists":{"field":"yuceendtime"}}}}]}},{"bool":{"must":[{"constant_score":{"filter":{"exists":{"field":"yuceendtime"}}}},{"range":{"yuceendtime":{"gte":%d,"lte":%d}}}]}}]}}`
|
|
|
+ filter_must_time = `{"bool":{"%s":[{"exists":{"field":"top_category"}}]}},{"bool":{"should":[{"bool":{"must":[{"constant_score":{"filter":{"exists":{"field":"yuceendtime"}}}},{"range":{"yuceendtime":{"gte":%d,"lte":%d}}}]}}]}}`
|
|
|
filter_must_area_city = `{"bool":{"should":[%s]}}`
|
|
|
query_should_keys = `{"bool":{"must":[%s],"must_not":[%s]}}`
|
|
|
query_should_multi_match = `{"multi_match":{"query":"%s","type":"phrase","fields":["results.purchasing.mypurchasing"]}}`
|
|
@@ -57,9 +57,9 @@ func getForecastProjectSql(scd *util.ViewCondition, startTime, endTime int, data
|
|
|
endTime = int(time.Now().Unix())
|
|
|
}
|
|
|
if dataType == "nj" {
|
|
|
- musts = append(musts, fmt.Sprintf(filter_must_time, "must", startTime, startTime, endTime))
|
|
|
+ musts = append(musts, fmt.Sprintf(filter_must_time, "must", startTime, endTime))
|
|
|
} else {
|
|
|
- musts = append(musts, fmt.Sprintf(filter_must_time, "must_not", startTime, startTime, endTime))
|
|
|
+ musts = append(musts, fmt.Sprintf(filter_must_time, "must_not", startTime, endTime))
|
|
|
}
|
|
|
//省份
|
|
|
areaCity := []string{}
|