Class MatchOnlyTextProperty

java.lang.Object
co.elastic.clients.elasticsearch._types.mapping.MatchOnlyTextProperty
All Implemented Interfaces:
PropertyVariant, JsonpSerializable

@JsonpDeserializable
public class MatchOnlyTextProperty
extends java.lang.Object
implements PropertyVariant, JsonpSerializable
A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field effectively stores data the same way as a text field that only indexes documents (index_options: docs) and disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries that need positions such as the match_phrase query perform slower as they need to look at the _source document to verify whether a phrase matches. All queries return constant scores that are equal to 1.0.
See Also:
API specification
  • Field Details

  • Method Details

    • of

      public static MatchOnlyTextProperty of​(java.util.function.Function<MatchOnlyTextProperty.Builder,​ObjectBuilder<MatchOnlyTextProperty>> fn)
    • _propertyKind

      public Property.Kind _propertyKind()
      Property variant kind.
      Specified by:
      _propertyKind in interface PropertyVariant
    • fields

      public final java.util.Map<java.lang.String,​Property> fields()
      Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.

      API name: fields

    • meta

      public final java.util.Map<java.lang.String,​java.lang.String> meta()
      Metadata about the field.

      API name: meta

    • copyTo

      public final java.util.List<java.lang.String> copyTo()
      Allows you to copy the values of multiple fields into a group field, which can then be queried as a single field.

      API name: copy_to

    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • setupMatchOnlyTextPropertyDeserializer

      protected static void setupMatchOnlyTextPropertyDeserializer​(ObjectDeserializer<MatchOnlyTextProperty.Builder> op)