Class FilterScript

java.lang.Object
org.elasticsearch.script.FilterScript

public abstract class FilterScript extends Object
A script implementation of a query filter. See ScriptQueryBuilder.
  • Field Details

  • Constructor Details

    • FilterScript

      public FilterScript(Map<String,Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)
  • Method Details

    • execute

      public abstract boolean execute()
      Return true if the current document matches the filter, or false otherwise.
    • getParams

      public Map<String,Object> getParams()
      Return the parameters for this script.
    • getDoc

      public final Map<String,ScriptDocValues<?>> getDoc()
      The doc lookup for the Lucene segment this script was created for.
    • setDocument

      public void setDocument(int docid)
      Set the current document to run the script on next.