Class MappingParameters

java.lang.Object
org.springframework.data.elasticsearch.core.index.MappingParameters

public class MappingParameters extends Object
A class to hold the mapping parameters that might be set on Field or InnerField annotation. The class allows extensibility (non-final) to simplify mapping parameters customization, provided by MappingParametersCustomizer.
Since:
4.0
Author:
Peter-Josef Meisch, Aleksei Arsenev, Brian Kimmig, Morgan Lutz, Sascha Woo, Haibo Liu, Andriy Redko
  • Constructor Details

    • MappingParameters

      protected MappingParameters(Field field)
    • MappingParameters

      protected MappingParameters(InnerField field)
  • Method Details

    • from

      public static MappingParameters from(Annotation annotation)
      extracts the mapping parameters from the relevant annotations.
      Parameters:
      annotation - must not be null.
      Returns:
      empty Optional if the annotation does not have a conformant type.
    • isStore

      public boolean isStore()
    • writeTypeAndParametersTo

      public void writeTypeAndParametersTo(tools.jackson.databind.node.ObjectNode objectNode) throws IOException
      writes the different fields to an ObjectNode.
      Parameters:
      objectNode - must not be null
      Throws:
      IOException
    • analyzer

      protected String analyzer()
    • coerce

      protected boolean coerce()
    • copyTo

      protected String @Nullable [] copyTo()
    • dateFormats

      protected DateFormat[] dateFormats()
    • dateFormatPatterns

      protected String[] dateFormatPatterns()
    • hasDocValues

      protected boolean hasDocValues()
    • hasEagerGlobalOrdinals

      protected boolean hasEagerGlobalOrdinals()
    • isEnabled

      protected boolean isEnabled()
    • hasFielddata

      protected boolean hasFielddata()
    • ignoreAbove

      protected Integer ignoreAbove()
    • isIgnoreMalformed

      protected boolean isIgnoreMalformed()
    • isIndex

      protected boolean isIndex()
    • indexOptions

      protected IndexOptions indexOptions()
    • isIndexPhrases

      protected boolean isIndexPhrases()
    • indexPrefixes

      protected IndexPrefixes indexPrefixes()
    • normalizer

      protected String normalizer()
    • hasNorms

      protected boolean hasNorms()
    • maxShingleSize

      protected Integer maxShingleSize()
    • nullValue

      protected String nullValue()
    • nullValueType

      protected NullValueType nullValueType()
    • positionIncrementGap

      protected Integer positionIncrementGap()
    • positiveScoreImpact

      protected boolean positiveScoreImpact()
    • dims

      protected Integer dims()
    • elementType

      protected String elementType()
    • knnSimilarity

      protected KnnSimilarity knnSimilarity()
    • knnIndexOptions

      protected KnnIndexOptions knnIndexOptions()
    • searchAnalyzer

      protected String searchAnalyzer()
    • scalingFactor

      protected double scalingFactor()
    • similarity

      protected String similarity()
    • termVector

      protected TermVector termVector()
    • type

      protected FieldType type()
    • mappedTypeName

      protected String mappedTypeName()