java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.SpanQuery
All Implemented Interfaces:
JsonpSerializable, OpenTaggedUnion<SpanQuery.Kind,Object>, TaggedUnion<SpanQuery.Kind,Object>

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final SpanQuery.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<SpanQuery.Kind,Object>
      Returns:
      the variant kind
    • _get

      public final Object _get()
      Specified by:
      _get in interface TaggedUnion<SpanQuery.Kind,Object>
    • of

    • isSpanContaining

      public boolean isSpanContaining()
      Is this variant instance of kind span_containing?
    • spanContaining

      public SpanContainingQuery spanContaining()
      Get the span_containing variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_containing kind.
    • isSpanFieldMasking

      public boolean isSpanFieldMasking()
      Is this variant instance of kind span_field_masking?
    • spanFieldMasking

      public SpanFieldMaskingQuery spanFieldMasking()
      Get the span_field_masking variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_field_masking kind.
    • isSpanFirst

      public boolean isSpanFirst()
      Is this variant instance of kind span_first?
    • spanFirst

      public SpanFirstQuery spanFirst()
      Get the span_first variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_first kind.
    • isSpanGap

      public boolean isSpanGap()
      Is this variant instance of kind span_gap?
    • spanGap

      public SpanGapQuery spanGap()
      Get the span_gap variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_gap kind.
    • isSpanMulti

      public boolean isSpanMulti()
      Is this variant instance of kind span_multi?
    • spanMulti

      public SpanMultiTermQuery spanMulti()
      Get the span_multi variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_multi kind.
    • isSpanNear

      public boolean isSpanNear()
      Is this variant instance of kind span_near?
    • spanNear

      public SpanNearQuery spanNear()
      Get the span_near variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_near kind.
    • isSpanNot

      public boolean isSpanNot()
      Is this variant instance of kind span_not?
    • spanNot

      public SpanNotQuery spanNot()
      Get the span_not variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_not kind.
    • isSpanOr

      public boolean isSpanOr()
      Is this variant instance of kind span_or?
    • spanOr

      public SpanOrQuery spanOr()
      Get the span_or variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_or kind.
    • isSpanTerm

      public boolean isSpanTerm()
      Is this variant instance of kind span_term?
    • spanTerm

      public SpanTermQuery spanTerm()
      Get the span_term variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_term kind.
    • isSpanWithin

      public boolean isSpanWithin()
      Is this variant instance of kind span_within?
    • spanWithin

      public SpanWithinQuery spanWithin()
      Get the span_within variant value.
      Throws:
      IllegalStateException - if the current variant is not of the span_within kind.
    • _isCustom

      public boolean _isCustom()
      Is this a custom SpanQuery defined by a plugin?
    • _customKind

      @Nullable public final String _customKind()
      Get the actual kind when _kind() equals SpanQuery.Kind._Custom (plugin-defined variant).
      Specified by:
      _customKind in interface OpenTaggedUnion<SpanQuery.Kind,Object>
    • _custom

      public JsonData _custom()
      Get the custom plugin-defined variant value.
      Throws:
      IllegalStateException - if the current variant is not SpanQuery.Kind._Custom.
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupSpanQueryDeserializer

      protected static void setupSpanQueryDeserializer(ObjectDeserializer<SpanQuery.Builder> op)