org.elasticsearch.index.query
Class CustomFiltersScoreQueryBuilder

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

public class CustomFiltersScoreQueryBuilder
extends BaseQueryBuilder
implements BoostableQueryBuilder<CustomFiltersScoreQueryBuilder>

A query that uses a filters with a script associated with them to compute the score.


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
CustomFiltersScoreQueryBuilder(QueryBuilder queryBuilder)
           
 
Method Summary
 CustomFiltersScoreQueryBuilder add(FilterBuilder filter, float boost)
           
 CustomFiltersScoreQueryBuilder add(FilterBuilder filter, String script)
           
 CustomFiltersScoreQueryBuilder boost(float boost)
          Sets the boost for this query.
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 CustomFiltersScoreQueryBuilder lang(String lang)
          Sets the language of the script.
 CustomFiltersScoreQueryBuilder maxBoost(float maxBoost)
           
 CustomFiltersScoreQueryBuilder param(String key, Object value)
          Additional parameters that can be provided to the script.
 CustomFiltersScoreQueryBuilder params(Map<String,Object> params)
          Additional parameters that can be provided to the script.
 CustomFiltersScoreQueryBuilder scoreMode(String scoreMode)
           
 
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

CustomFiltersScoreQueryBuilder

public CustomFiltersScoreQueryBuilder(QueryBuilder queryBuilder)
Method Detail

add

public CustomFiltersScoreQueryBuilder add(FilterBuilder filter,
                                          String script)

add

public CustomFiltersScoreQueryBuilder add(FilterBuilder filter,
                                          float boost)

scoreMode

public CustomFiltersScoreQueryBuilder scoreMode(String scoreMode)

lang

public CustomFiltersScoreQueryBuilder lang(String lang)
Sets the language of the script.


params

public CustomFiltersScoreQueryBuilder params(Map<String,Object> params)
Additional parameters that can be provided to the script.


param

public CustomFiltersScoreQueryBuilder param(String key,
                                            Object value)
Additional parameters that can be provided to the script.


maxBoost

public CustomFiltersScoreQueryBuilder maxBoost(float maxBoost)

boost

public CustomFiltersScoreQueryBuilder 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<CustomFiltersScoreQueryBuilder>

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.