org.elasticsearch.script.mvel
Class MvelScriptEngineService.MvelSearchScript

java.lang.Object
  extended by org.elasticsearch.script.mvel.MvelScriptEngineService.MvelSearchScript
All Implemented Interfaces:
ExecutableScript, SearchScript
Enclosing class:
MvelScriptEngineService

public static class MvelScriptEngineService.MvelSearchScript
extends Object
implements SearchScript


Constructor Summary
MvelScriptEngineService.MvelSearchScript(Object script, SearchLookup lookup, Map<String,Object> vars)
           
 
Method Summary
 Object run()
          Executes the script.
 double runAsDouble()
           
 float runAsFloat()
           
 long runAsLong()
           
 void setNextDocId(int doc)
           
 void setNextReader(org.apache.lucene.index.IndexReader reader)
           
 void setNextScore(float score)
           
 void setNextSource(Map<String,Object> source)
           
 void setNextVar(String name, Object value)
           
 void setScorer(org.apache.lucene.search.Scorer scorer)
           
 Object unwrap(Object value)
          Unwraps a possible script value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MvelScriptEngineService.MvelSearchScript

public MvelScriptEngineService.MvelSearchScript(Object script,
                                                SearchLookup lookup,
                                                Map<String,Object> vars)
Method Detail

setScorer

public void setScorer(org.apache.lucene.search.Scorer scorer)
Specified by:
setScorer in interface SearchScript

setNextReader

public void setNextReader(org.apache.lucene.index.IndexReader reader)
Specified by:
setNextReader in interface SearchScript

setNextDocId

public void setNextDocId(int doc)
Specified by:
setNextDocId in interface SearchScript

setNextScore

public void setNextScore(float score)
Specified by:
setNextScore in interface SearchScript

setNextVar

public void setNextVar(String name,
                       Object value)
Specified by:
setNextVar in interface ExecutableScript

setNextSource

public void setNextSource(Map<String,Object> source)
Specified by:
setNextSource in interface SearchScript

run

public Object run()
Description copied from interface: ExecutableScript
Executes the script.

Specified by:
run in interface ExecutableScript

runAsFloat

public float runAsFloat()
Specified by:
runAsFloat in interface SearchScript

runAsLong

public long runAsLong()
Specified by:
runAsLong in interface SearchScript

runAsDouble

public double runAsDouble()
Specified by:
runAsDouble in interface SearchScript

unwrap

public Object unwrap(Object value)
Description copied from interface: ExecutableScript
Unwraps a possible script value. For example, when passing vars and expecting the returned value to be part of the vars.

Specified by:
unwrap in interface ExecutableScript


Copyright © 2009-2012. All Rights Reserved.