how about: First execute an aggregation to get the max value, then calculate the 90% out of that (to get the absolute value, might work with some scripting as well), and use this absolute value in a second query.
no, the execution order of search and aggregation is opposite as needed for your use-case (as the aggregations built in the search results and you need the search results built on top the aggs result - which would require more roundtrips).
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.