Class DerivedField

java.lang.Object
org.opensearch.index.mapper.DerivedField
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment

@PublicApi(since="2.14.0") public class DerivedField extends Object implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
DerivedField representation: expects a name, type and script.
  • Constructor Details

    • DerivedField

      public DerivedField(String name, String type, Script script)
    • DerivedField

      public DerivedField(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • toXContent

      public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException
    • getName

      public String getName()
    • getType

      public String getType()
    • getScript

      public Script getScript()
    • getProperties

      public Map<String,Object> getProperties()
    • getNestedFieldType

      public String getNestedFieldType(String fieldName)
    • getPrefilterField

      public String getPrefilterField()
    • getFormat

      public String getFormat()
    • getIgnoreMalformed

      public boolean getIgnoreMalformed()
    • setProperties

      public void setProperties(Map<String,Object> properties)
    • setPrefilterField

      public void setPrefilterField(String prefilterField)
    • setFormat

      public void setFormat(String format)
    • setIgnoreMalformed

      public void setIgnoreMalformed(boolean ignoreMalformed)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object