public abstract class AbstractSearchScript extends AbstractExecutableScript implements LeafSearchScript
If the script returns a specific numeric type, consider overriding the type specific base classes
such as AbstractDoubleSearchScript, AbstractFloatSearchScript and AbstractLongSearchScript
for better performance.
The use is required to implement the ExecutableScript.run() method.
| コンストラクタと説明 |
|---|
AbstractSearchScript() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected LeafDocLookup |
doc()
Returns the doc lookup allowing to access field data (cached) values as well as the current document score
(where applicable).
|
protected ScriptDocValues.Doubles |
docFieldDoubles(String field)
Returns field data double (floating point) access for the provided field.
|
protected ScriptDocValues.Longs |
docFieldLongs(String field)
Returns field data long (integers) access for the provided field.
|
protected ScriptDocValues.Strings |
docFieldStrings(String field)
Returns field data strings access for the provided field.
|
protected LeafFieldsLookup |
fields()
Allows to access the *stored* fields.
|
protected LeafIndexLookup |
indexLookup()
Allows to access statistics on terms and fields.
|
double |
runAsDouble() |
float |
runAsFloat() |
long |
runAsLong() |
protected float |
score()
Returns the current score and only applicable when used as a scoring script in a custom score query!.
|
void |
setDocument(int doc) |
void |
setScorer(org.apache.lucene.search.Scorer scorer) |
void |
setSource(Map<String,Object> source) |
protected SourceLookup |
source()
Allows to access the actual source (loaded and parsed).
|
setNextVar, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrun, setNextVar, unwrapprotected final LeafDocLookup doc()
protected final float score()
throws IOException
IOExceptionprotected ScriptDocValues.Strings docFieldStrings(String field)
protected ScriptDocValues.Doubles docFieldDoubles(String field)
protected ScriptDocValues.Longs docFieldLongs(String field)
protected final SourceLookup source()
protected final LeafIndexLookup indexLookup()
protected final LeafFieldsLookup fields()
public void setScorer(org.apache.lucene.search.Scorer scorer)
setScorer インタフェース内 ScorerAwarepublic void setDocument(int doc)
setDocument インタフェース内 LeafSearchScriptpublic void setSource(Map<String,Object> source)
setSource インタフェース内 LeafSearchScriptpublic float runAsFloat()
runAsFloat インタフェース内 LeafSearchScriptpublic long runAsLong()
runAsLong インタフェース内 LeafSearchScriptpublic double runAsDouble()
runAsDouble インタフェース内 LeafSearchScriptCopyright © 2009–2016. All rights reserved.