elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.74k stars 24.68k forks source link

SQL: consistent and content dependent naming for aggregations #43531

Open astefan opened 5 years ago

astefan commented 5 years ago

At the moment ES SQL generates unique IDs for aggregation names in the form of a long numeric value, making sure the same value is not assigned to more than one element in the execution tree.

In the context of Elasticsearch caching, though, a query is cached by its json key which means that the same logical query will generate a different JSON because the aggregation names will be different. This makes caching the same SQL query results impossible from ES caching point of view.

Ideally, naming elements in a query dsl should be consistent from one execution of a query to the other execution of the same query. Relevant link - https://discuss.elastic.co/t/elasticsearch-7-0-sql-access-request-cache/186467.

elasticmachine commented 5 years ago

Pinging @elastic/es-search

elasticsearchmachine commented 8 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)