Kibana is designed to connect to Elasticsearch and provide visualizations like charts and dashboards. It does not store data itself but helps users explore the data stored in Elasticsearch.
GET /sales/_search
{
"query": {
"match_all": {}
}
}The query requests all documents from the 'sales' index. Elasticsearch returns a JSON response with the matching documents. Kibana uses this data to build visualizations.
Kibana visualizations often depend on a time filter. If the filter is set to a period with no data, the visualization will appear empty even if data exists in Elasticsearch.
The match query is used for full-text search and works well for fields like 'status'. The term query expects exact values and is case-sensitive, often used for keyword fields.
The terms aggregation groups documents by unique values of a field, counting how many documents fall into each group. This is ideal for categorical data like 'category'.