You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Indices Queryedit
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