Class FilterScript


  • public abstract class FilterScript
    extends java.lang.Object
    A script implementation of a query filter. See ScriptQueryBuilder.
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterScript​(java.util.Map<java.lang.String,​java.lang.Object> params, SearchLookup lookup, org.apache.lucene.index.LeafReaderContext leafContext)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean execute()
      Return true if the current document matches the filter, or false otherwise.
      java.util.Map<java.lang.String,​ScriptDocValues<?>> getDoc()
      The doc lookup for the Lucene segment this script was created for.
      java.util.Map<java.lang.String,​java.lang.Object> getParams()
      Return the parameters for this script.
      void setDocument​(int docid)
      Set the current document to run the script on next.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilterScript

        public FilterScript​(java.util.Map<java.lang.String,​java.lang.Object> params,
                            SearchLookup lookup,
                            org.apache.lucene.index.LeafReaderContext leafContext)
    • Method Detail

      • execute

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

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

        public final java.util.Map<java.lang.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.