Indices Query

edit

See Indices Query

// Using another query when no match for the main one
QueryBuilders.indicesQuery(
                QueryBuilders.termQuery("tag", "wow"),
                "index1", "index2"
            )
            .noMatchQuery(QueryBuilders.termQuery("tag", "kow"));

// Using all (match all) or none (match no documents)
QueryBuilders.indicesQuery(
                QueryBuilders.termQuery("tag", "wow"),
                "index1", "index2"
            )
            .noMatchQuery("all");       // all or none