I'm going to store search results for complex queries as a list of ids to perform aggregations some time ago.
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html
What is the max count of ids in ids query can I send?