org.elasticsearch.index.query
Class FilteredQueryBuilder

java.lang.Object
  extended by org.elasticsearch.index.query.BaseQueryBuilder
      extended by org.elasticsearch.index.query.FilteredQueryBuilder
All Implemented Interfaces:
ToXContent, QueryBuilder

public class FilteredQueryBuilder
extends BaseQueryBuilder

A query that applies a filter to the results of another query.


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
FilteredQueryBuilder(QueryBuilder queryBuilder, FilterBuilder filterBuilder)
          A query that applies a filter to the results of another query.
 
Method Summary
 FilteredQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 
Methods inherited from class org.elasticsearch.index.query.BaseQueryBuilder
buildAsBytes, buildAsBytes, buildAsUnsafeBytes, buildAsUnsafeBytes, toString, toXContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilteredQueryBuilder

public FilteredQueryBuilder(QueryBuilder queryBuilder,
                            FilterBuilder filterBuilder)
A query that applies a filter to the results of another query.

Parameters:
queryBuilder - The query to apply the filter to
filterBuilder - The filter to apply on the query
Method Detail

boost

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


doXContent

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