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

@JsonpDeserializable
public class SpanQuery
extends java.lang.Object
implements TaggedUnion<SpanQuery.Kind,​java.lang.Object>, JsonpSerializable
See Also:
API specification
  • 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,​java.lang.Object>
      Returns:
      the variant kind
    • _get

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

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

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

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

      public boolean isFieldMaskingSpan()
      Is this variant instance of kind field_masking_span?
    • fieldMaskingSpan

      public SpanFieldMaskingQuery fieldMaskingSpan()
      Get the field_masking_span variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the field_masking_span kind.
    • isSpanFirst

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

      public SpanFirstQuery spanFirst()
      Get the span_first variant value.
      Throws:
      java.lang.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:
      java.lang.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:
      java.lang.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:
      java.lang.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:
      java.lang.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:
      java.lang.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:
      java.lang.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:
      java.lang.IllegalStateException - if the current variant is not of the span_within kind.
    • serialize

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

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

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