|
@@ -11,7 +11,7 @@ import (
|
|
|
|
|
|
const (
|
|
|
query_aggs_sortprice = `"sortprice_ranges": {"range":{"field":"sortprice","ranges":[%s]},"aggs":{"sum_sortprice":{"sum":{"field":"sortprice"}}}}`
|
|
|
- aggs_area = `"area_distribution": {"terms": {"field": "area"},"aggs": {"area_amount": {"sum": {"field": "sortprice"}},"area_total": {"filter": {}}}}`
|
|
|
+ aggs_area = `"area_distribution": {"terms": {"field": "area","size": 40},"aggs": {"area_amount": {"sum": {"field": "sortprice"}},"area_total": {"filter": {}}}}`
|
|
|
query_top10 = `,"sort": [{"sortprice": "desc"}],"from": 0,"size": 10`
|
|
|
aggs_area_amounttop3 = `"area_amount_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_amount":"desc"}],"size":3},"aggs":{"area_amount":{"sum":{"field":"sortprice"}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_amount":"desc"}],"size":3},"aggs":{"area_winner_amount":{"sum":{"field":"sortprice"}}}}}}`
|
|
|
aggs_area_counttop3 = `"area_count_top3":{"terms":{"field":"area","exclude":["全国"],"order":[{"area_count":"desc"}],"size":3},"aggs":{"area_count":{"filter":{}},"winner_top":{"terms":{"field":"entidlist","exclude": ["-"],"order":[{"area_winner_count":"desc"}],"size":3},"aggs":{"area_winner_count":{"filter":{}}}}}}`
|