Is there any way to find ids of document for which sum of field "salary" reach 10000?
I just want to fetch ids for which the total of salary is just less than or equal to 10000?
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
As they are different documents, I don't see how you can do that.
I believe you need to do it on the client side, do the sum manually and if you don't have enough records, ask for a new page of records...
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.