org.elasticsearch.index.query
Class IdsFilterBuilder

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

public class IdsFilterBuilder
extends BaseFilterBuilder

A filter that will return only documents matching specific ids (and a type).


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
IdsFilterBuilder(String... types)
          Create an ids filter based on the type.
 
Method Summary
 IdsFilterBuilder addIds(String... ids)
          Adds ids to the filter.
 void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 IdsFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 IdsFilterBuilder ids(String... ids)
          Adds ids to the filter.
 
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

IdsFilterBuilder

public IdsFilterBuilder(String... types)
Create an ids filter based on the type.

Method Detail

addIds

public IdsFilterBuilder addIds(String... ids)
Adds ids to the filter.


ids

public IdsFilterBuilder ids(String... ids)
Adds ids to the filter.


filterName

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


doXContent

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


Copyright © 2009-2012. All Rights Reserved.