org.elasticsearch.index.query
Class IndicesFilterBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseFilterBuilder
      extended by org.elasticsearch.index.query.IndicesFilterBuilder
All Implemented Interfaces:
ToXContent, FilterBuilder

public class IndicesFilterBuilder
extends BaseFilterBuilder

A filter that will execute the wrapped filter only for the specified indices, and "match_all" when it does not match those indices (by default).


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
IndicesFilterBuilder(FilterBuilder filterBuilder, String... indices)
           
 
Method Summary
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 IndicesFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 IndicesFilterBuilder noMatchFilter(FilterBuilder noMatchFilter)
          Sets the filter to use when it executes on an index that does not match the indices provided.
 IndicesFilterBuilder noMatchFilter(String type)
          Sets the no match filter, can either be all or none.
 
Methods inherited from class org.elasticsearch.index.query.BaseFilterBuilder
toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndicesFilterBuilder

public IndicesFilterBuilder(FilterBuilder filterBuilder,
                            String... indices)
Method Detail

noMatchFilter

public IndicesFilterBuilder noMatchFilter(String type)
Sets the no match filter, can either be all or none.


noMatchFilter

public IndicesFilterBuilder noMatchFilter(FilterBuilder noMatchFilter)
Sets the filter to use when it executes on an index that does not match the indices provided.


filterName

public IndicesFilterBuilder filterName(String filterName)
Sets the filter name for the filter that can be used when searching for matched_filters per hit.


doXContent

protected void doXContent(XContentBuilder builder,
                          ToXContent.Params params)
                   throws IOException
Specified by:
doXContent in class BaseFilterBuilder
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.