IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

And Filter

edit

See And Filter

FilterBuilders.andFilter(
    FilterBuilders.rangeFilter("postDate").from("2010-03-01").to("2010-04-01"),
    FilterBuilders.prefixFilter("name.second", "ba")
    );

Note that you can cache the result using AndFilterBuilder#cache(boolean) method. See Caching.