elasticsearch agg
OK
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_count -d '{"query":{"match":{"srv_content":"iis"}}}'
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search -d '{"aggs":{"group_yy":{"terms":{"field":"countryName"}}}}'
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search -d '{"query":{"match_all":{"ssh"}},"facets":{"tag":{"terms":{"field":"countryName","size":5}}}}'
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search -d '{"query":{"match_all":{"ssh"}},"facets":{"tag":{"terms":{"field":"countryName","size":5}}}}'
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search -d '{"query":{"match":"openssh"},"size":0,"facets":{"ips_stats":{"terms_stats":{"key_field":"countryName","size":5}}}}'
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search?search_type=count -d '{"query":{"match":{"srv_content":"openssh"}},"aggs":{"countryName":{"terms":{"field":"countryName"}}}}'
OK
curl -XGET http://21.3.5.121:9200/ipv4geo/service/_search?search_type=count -d '{"query":{"match":{"srv_content":"openssh"}},"aggs":{"countryName":{"terms":{"field":"countryName"}}}}'