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 aNameValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoc()Returns the value of thedocrecord component.final booleanIndicates 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 inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.intReturns the value of theparentOffsetrecord component.final StringtoString()Returns a string representation of this record class.org.apache.lucene.util.BytesRefvalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
NameValue
public NameValue(String name, int parentOffset, org.apache.lucene.util.BytesRef value, LuceneDocument doc) Creates an instance of aNameValuerecord class.- Parameters:
name- the value for thenamerecord componentparentOffset- the value for theparentOffsetrecord componentvalue- the value for thevaluerecord componentdoc- the value for thedocrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
parentOffset
public int parentOffset()Returns the value of theparentOffsetrecord component.- Returns:
- the value of the
parentOffsetrecord component
-
value
public org.apache.lucene.util.BytesRef value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
doc
Returns the value of thedocrecord component.- Returns:
- the value of the
docrecord component
-