Everything in a filter is required, so that takes care of the AND between the terms and the ranges. A terms filter is naturally an OR, so that handles that. And for the ranges, we setup a boolean with a should containing each range, which satisfy the OR there.
It gets a bit complicated with deep boolean logic due to the nesting, but not too terrible once you get used to it You can keep embedding these boolean queries as much as you want/need to express the appropriate boolean logic.
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.