AClerk
February 26, 2021, 2:50am
4
you can.
Look at the following
Hi,
I want to achieve some functionality which is available in SQL data stores. I have tried a lot but having a hard time achieving that functionality with elasticsearch. I am successful in creating the queries but the query does not seem to work correctly.
I want to do:
Group by based on some id
Filter out groups with some condition
Count the filtered results
Tried on Elasticsearch 5.2.2 and 5.6.3
Basically I want to perform query similar to the following SQL:
SELECT COUNT(*) FROM
(
S…
In SQL I would do it possibly like this:
SELECT field1,field2, count(*) as cnt FROM table GROUP BY field1,field2 ORDER BY cnt DESC;
Is aggregate query like that possible with ES?
And Terms Aggregation