org.elasticsearch.index.query
Class IndicesQueryBuilder
java.lang.Object
org.elasticsearch.index.query.BaseQueryBuilder
org.elasticsearch.index.query.IndicesQueryBuilder
- All Implemented Interfaces:
- ToXContent, QueryBuilder
public class IndicesQueryBuilder
- extends BaseQueryBuilder
A query that will execute the wrapped query only for the specified indices, and "match_all" when
it does not match those indices (by default).
IndicesQueryBuilder
public IndicesQueryBuilder(QueryBuilder queryBuilder,
String... indices)
noMatchQuery
public IndicesQueryBuilder noMatchQuery(String type)
- Sets the no match query, can either be all or none.
noMatchQuery
public IndicesQueryBuilder noMatchQuery(QueryBuilder noMatchQuery)
- Sets the query to use when it executes on an index that does not match the indices provided.
doXContent
protected void doXContent(XContentBuilder builder,
ToXContent.Params params)
throws IOException
- Specified by:
doXContent
in class BaseQueryBuilder
- Throws:
IOException
Copyright © 2009-2012. All Rights Reserved.