Field statistics - sampling


As I understand, in Kibana4, the field statistics are done on the n records/documents that are returned to the browser (set under Advanced settings -> sampleSize). If this is correct, then how does Kibana select n records/docs out of the total query result population? Are there any attempts made to make sure it is a truly representative sample? Random sample?


I assume you're referring to top-values by field in the Discover pane? If so, those statistics are based on the 500 documents that appear in Discover. By default, for time-series data, those are the latest documents, but that also changes depending on what searches and filters you've applies in Discover.

Thanks for that clarification, Tanya. But sounds like the field statistics are highly misleading since they aren't a true sample of the query results.