Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Record Class IgnoredSourceFieldMapper.NameValue
java.lang.Object
java.lang.Record
org.elasticsearch.index.mapper.IgnoredSourceFieldMapper.NameValue
- Enclosing class:
- IgnoredSourceFieldMapper
public static record IgnoredSourceFieldMapper.NameValue(String name, int parentOffset, org.apache.lucene.util.BytesRef value, LuceneDocument doc)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionNameValue
(String name, int parentOffset, org.apache.lucene.util.BytesRef value, LuceneDocument doc) Creates an instance of aNameValue
record class. -
Method Summary
Modifier and TypeMethodDescriptiondoc()
Returns the value of thedoc
record component.final boolean
Indicates whether some other object is "equal to" this one.fromContext
(DocumentParserContext context, String name, org.apache.lucene.util.BytesRef value) Factory method, for use with fields under the parent object.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.int
Returns the value of theparentOffset
record component.final String
toString()
Returns a string representation of this record class.org.apache.lucene.util.BytesRef
value()
Returns the value of thevalue
record component.
-
Constructor Details
-
NameValue
public NameValue(String name, int parentOffset, org.apache.lucene.util.BytesRef value, LuceneDocument doc) Creates an instance of aNameValue
record class.- Parameters:
name
- the value for thename
record componentparentOffset
- the value for theparentOffset
record componentvalue
- the value for thevalue
record componentdoc
- the value for thedoc
record component
-
-
Method Details
-
fromContext
public static IgnoredSourceFieldMapper.NameValue fromContext(DocumentParserContext context, String name, org.apache.lucene.util.BytesRef value) Factory method, for use with fields under the parent object. It doesn't apply to objects at root level.- Parameters:
context
- the parser context, containing a non-null parentname
- the fully-qualified field name, including the path from rootvalue
- the value to store
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
parentOffset
public int parentOffset()Returns the value of theparentOffset
record component.- Returns:
- the value of the
parentOffset
record component
-
value
public org.apache.lucene.util.BytesRef value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
doc
Returns the value of thedoc
record component.- Returns:
- the value of the
doc
record component
-