org.elasticsearch.index.query
Class IdsQueryBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseQueryBuilder
      extended by org.elasticsearch.index.query.IdsQueryBuilder
All Implemented Interfaces:
ToXContent, BoostableQueryBuilder<IdsQueryBuilder>, QueryBuilder

public class IdsQueryBuilder
extends BaseQueryBuilder
implements BoostableQueryBuilder<IdsQueryBuilder>

A query 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
IdsQueryBuilder(String... types)
           
 
Method Summary
 IdsQueryBuilder addIds(String... ids)
          Adds ids to the filter.
 IdsQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 IdsQueryBuilder ids(String... ids)
          Adds ids to the filter.
 
Methods inherited from class org.elasticsearch.index.query.BaseQueryBuilder
buildAsBytes, buildAsBytes, toString, toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdsQueryBuilder

public IdsQueryBuilder(String... types)
Method Detail

addIds

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


ids

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


boost

public IdsQueryBuilder boost(float boost)
Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.

Specified by:
boost in interface BoostableQueryBuilder<IdsQueryBuilder>

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.