August 2019
Intermediate to advanced
560 pages
13h 41m
English
Instead of an unbound number of documents to process, the sampler aggregation can limit its sub-aggregation results by sampling the top scores within a shard by a shard_size parameter (the default value is 100).
"aggs": { "sampling": {"sampler": { "shard_size":150},"aggs": {"significant_terms_category": {"significant_terms": {"field": "category"}}}}}
"sampling": {"doc_count": 150,"significant_terms_category": {"doc_count": 150,"bg_count": 314, "buckets": [{"key": "International","doc_count": 61,"score": 0.13425648148148153,"bg_count": ...Read now
Unlock full access