In the search request it uses the query to filter documents that have at least one order with the prod_type "OLP" and then in the aggregations uses the nested aggregation to get all of the order nested documents (the orders), uses the filter aggregation to filter those orders by those with a prod_type of "OLP" and then uses the sum aggregation to get the total price of all the "OLP" orders
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.