Package org.elasticsearch.script.field
Class AbstractKeywordDocValuesField
java.lang.Object
org.elasticsearch.script.field.AbstractKeywordDocValuesField
- All Implemented Interfaces:
Iterable<String>,ScriptDocValues.Supplier<String>,DocValuesField<String>,Field<String>
- Direct Known Subclasses:
FlattenedDocValuesField,KeywordDocValuesField
public class AbstractKeywordDocValuesField
extends Object
implements DocValuesField<String>, ScriptDocValues.Supplier<String>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final SortedBinaryDocValuesprotected final Stringprotected ScriptDocValues.Stringsprotected org.apache.lucene.util.BytesRefBuilder[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbytesToString(org.apache.lucene.util.BytesRef bytesRef) getInternal(int index) getName()Returns the name of this field.Returns aScriptDocValuesof the appropriate type for this field.booleanisEmpty()Returnstrueif this field has no values, otherwisefalse.iterator()voidsetNextDocId(int docId) Set the current document ID.intsize()Returns the number of values this field has.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
input
-
name
-
values
protected org.apache.lucene.util.BytesRefBuilder[] values -
count
protected int count -
strings
-
-
Constructor Details
-
AbstractKeywordDocValuesField
-
-
Method Details
-
setNextDocId
Description copied from interface:DocValuesFieldSet the current document ID.- Specified by:
setNextDocIdin interfaceDocValuesField<String>- Specified by:
setNextDocIdin interfaceScriptDocValues.Supplier<String>- Throws:
IOException
-
getScriptDocValues
Description copied from interface:DocValuesFieldReturns aScriptDocValuesof the appropriate type for this field. This is used to support backwards compatibility for accessing field values through thedocvariable.- Specified by:
getScriptDocValuesin interfaceDocValuesField<String>
-
getInternal
- Specified by:
getInternalin interfaceScriptDocValues.Supplier<String>
-
bytesToString
-
getName
Description copied from interface:FieldReturns the name of this field. -
isEmpty
public boolean isEmpty()Description copied from interface:FieldReturnstrueif this field has no values, otherwisefalse. -
size
public int size()Description copied from interface:FieldReturns the number of values this field has. -
get
-
get
-
iterator
-