Nested Filter

edit

See Nested Filter

FilterBuilders.nestedFilter("obj1",
    QueryBuilders.boolQuery()
        .must(QueryBuilders.matchQuery("obj1.name", "blue"))
        .must(QueryBuilders.rangeQuery("obj1.count").gt(5))
    );

Note that you can ask not to cache the result using NestedFilterBuilder#cache(boolean) method. See Caching.