org.elasticsearch.index.query
Class FilteredQueryBuilder
java.lang.Object
org.elasticsearch.index.query.BaseQueryBuilder
org.elasticsearch.index.query.FilteredQueryBuilder
- All Implemented Interfaces:
- ToXContent, BoostableQueryBuilder<FilteredQueryBuilder>, QueryBuilder
public class FilteredQueryBuilder
- extends BaseQueryBuilder
- implements BoostableQueryBuilder<FilteredQueryBuilder>
A query that applies a filter to the results of another query.
FilteredQueryBuilder
public FilteredQueryBuilder(QueryBuilder queryBuilder,
@Nullable
FilterBuilder filterBuilder)
- A query that applies a filter to the results of another query.
- Parameters:
queryBuilder
- The query to apply the filter tofilterBuilder
- The filter to apply on the query (Can be null)
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.
- Specified by:
boost
in interface BoostableQueryBuilder<FilteredQueryBuilder>
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.