I am currently working on a search page for my application. Since I already have a front-end I couldn't use Kibana directly, but I like some ideas such as the stats displayed in available fields.
So, how does Kibana gets this info? Is it possible to have those stats for all occurrences in ES?
the (experimental) field stats api might be helpful for your purposes. Depending on your specific requirements, the mapping api could also be of interest.
I knew about mapping API, actually that's how I am retrieving all fields from my documents. For finding top values I checked Aggregations
This gives me the information I want but it's kind of "manual". I mean I have to first make mappings and then for every field retrieved I have to perform an aggregation query. Is there anything to make it in a single query?
Thanks @weltenwort. But I am more interested in how many different values and its distribution we have for certain attributes (i.e: country) rather than that kind stats. Maybe my question wasn't clear.
The answers to those questions are quite computationally expensive and highly dependent on the semantics of the individual type. That is why Elasticsearch can not do that for you in the general case. I don't see a way around executing aggregations appropriate for each particular field in your application code.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.