org.elasticsearch.index.query
Class ScriptFilterBuilder

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

public class ScriptFilterBuilder
extends BaseFilterBuilder


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
ScriptFilterBuilder(String script)
           
 
Method Summary
 ScriptFilterBuilder addParam(String name, Object value)
           
 ScriptFilterBuilder cache(boolean cache)
          Should the filter be cached or not.
 ScriptFilterBuilder cacheKey(String cacheKey)
           
protected  void doXContent(XContentBuilder builder, ToXContent.Params params)
           
 ScriptFilterBuilder filterName(String filterName)
          Sets the filter name for the filter that can be used when searching for matched_filters per hit.
 ScriptFilterBuilder lang(String lang)
          Sets the script language.
 ScriptFilterBuilder params(Map<String,Object> params)
           
 
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

ScriptFilterBuilder

public ScriptFilterBuilder(String script)
Method Detail

addParam

public ScriptFilterBuilder addParam(String name,
                                    Object value)

params

public ScriptFilterBuilder params(Map<String,Object> params)

lang

public ScriptFilterBuilder lang(String lang)
Sets the script language.


filterName

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


cache

public ScriptFilterBuilder cache(boolean cache)
Should the filter be cached or not. Defaults to false.


cacheKey

public ScriptFilterBuilder cacheKey(String cacheKey)

doXContent

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


Copyright © 2009-2012. All Rights Reserved.