org.elasticsearch.index.query
Class MissingFilterBuilder

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

public class MissingFilterBuilder
extends BaseFilterBuilder

Constructs a filter that only match on documents that the field has a value in them.


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
MissingFilterBuilder(String name)
           
 
Method Summary
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 MissingFilterBuilder existence(boolean existence)
          Should hte missing filter include documents where the field doesn't exists in the docs.
 MissingFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 MissingFilterBuilder nullValue(boolean nullValue)
          Should the missing filter automatically include fields with null value configured in the mappings.
 
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

MissingFilterBuilder

public MissingFilterBuilder(String name)
Method Detail

nullValue

public MissingFilterBuilder nullValue(boolean nullValue)
Should the missing filter automatically include fields with null value configured in the mappings. Defaults to false.


existence

public MissingFilterBuilder existence(boolean existence)
Should hte missing filter include documents where the field doesn't exists in the docs. Defaults to true.


filterName

public MissingFilterBuilder 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.