|
query := `{"query": {"bool": {"must": [{"range": {"pici": {"gte": ` + fmt.Sprint(config.TaskConfig.Pici) + `,"lt": ` + fmt.Sprint(time.Now().Unix()) + `}}},{"bool": {"should": [{"terms": {"toptype": ["预告","招标","结果","其它"]}}],"minimum_should_match": 1}}]}},"_source": ["id","title","projectname","publishtime","buyer","area","pici"],"sort": [{"publishtime": "desc"}],"size": 1}`
|
|
query := `{"query": {"bool": {"must": [{"range": {"pici": {"gte": ` + fmt.Sprint(config.TaskConfig.Pici) + `,"lt": ` + fmt.Sprint(time.Now().Unix()) + `}}},{"bool": {"should": [{"terms": {"toptype": ["预告","招标","结果","其它"]}}],"minimum_should_match": 1}}]}},"_source": ["id","title","projectname","publishtime","buyer","area","pici"],"sort": [{"publishtime": "desc"}],"size": 1}`
|
|
countQ := `{"query": {"bool": {"must": [{"range": {"pici": {"gte": ` + util.ObjToString(config.TaskConfig.Pici) + `,"lt": ` + util.ObjToString(time.Now().Unix()) + `}}},{"bool": {"should": [{"terms": {"toptype": ["预告","招标","结果","其它"]}}],"minimum_should_match": 1}}]}}}`
|
|
countQ := `{"query": {"bool": {"must": [{"range": {"pici": {"gte": ` + util.ObjToString(config.TaskConfig.Pici) + `,"lt": ` + util.ObjToString(time.Now().Unix()) + `}}},{"bool": {"should": [{"terms": {"toptype": ["预告","招标","结果","其它"]}}],"minimum_should_match": 1}}]}}}`
|
|
c, info := elastic.GetWithCount("bidding", "", countQ, query)
|
|
c, info := elastic.GetWithCount("bidding", "", countQ, query)
|