Module org.elasticsearch.server
Package org.elasticsearch.script.field
Class BaseKeywordDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractScriptFieldFactory<String>
org.elasticsearch.script.field.BaseKeywordDocValuesField
- All Implemented Interfaces:
Iterable<String>
,ScriptDocValues.Supplier<String>
,DocValuesScriptFieldFactory
,Field<String>
,ScriptFieldFactory
- Direct Known Subclasses:
FlattenedDocValuesField
,KeywordDocValuesField
,MatchOnlyTextDocValuesField
,TextDocValuesField
public abstract class BaseKeywordDocValuesField
extends AbstractScriptFieldFactory<String>
implements Field<String>, DocValuesScriptFieldFactory, ScriptDocValues.Supplier<String>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected final SortedBinaryDocValues
protected final String
protected ScriptDocValues.Strings
protected org.apache.lucene.util.BytesRefBuilder[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static String
bytesToString
(org.apache.lucene.util.BytesRef bytesRef) getInternal
(int index) getName()
Returns the name of this field.boolean
isEmpty()
Returnstrue
if this field has no values, otherwisefalse
.iterator()
void
setNextDocId
(int docId) Set the current document ID.int
size()
Returns the number of values this field has.Returns aScriptDocValues
of the appropriate type for this field.Methods inherited from class org.elasticsearch.script.field.AbstractScriptFieldFactory
toScriptField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.script.field.ScriptFieldFactory
toScriptField
-
Field Details
-
input
-
name
-
values
protected org.apache.lucene.util.BytesRefBuilder[] values -
count
protected int count -
strings
-
-
Constructor Details
-
BaseKeywordDocValuesField
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesScriptFieldFactory
Set the current document ID.- Specified by:
setNextDocId
in interfaceDocValuesScriptFieldFactory
- Specified by:
setNextDocId
in interfaceScriptDocValues.Supplier<String>
- Throws:
IOException
-
toScriptDocValues
Description copied from interface:DocValuesScriptFieldFactory
Returns aScriptDocValues
of the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedoc
variable.- Specified by:
toScriptDocValues
in interfaceDocValuesScriptFieldFactory
-
getInternal
- Specified by:
getInternal
in interfaceScriptDocValues.Supplier<String>
-
bytesToString
-
getName
Description copied from interface:Field
Returns the name of this field. -
isEmpty
public boolean isEmpty()Description copied from interface:Field
Returnstrue
if this field has no values, otherwisefalse
. -
size
public int size()Description copied from interface:Field
Returns the number of values this field has. -
get
-
get
-
iterator
-