如果需要针对ES索引统计某个字段上出现的不同值的个数时,可以使用cardinality聚合查询完成:
GET /urlAttributes/_search?search_type=count { "aggs": {