Class RangeQueryBuilder

    • Constructor Detail

      • RangeQueryBuilder

        public RangeQueryBuilder​(java.lang.String fieldName)
        A Query that matches documents within an range of terms.
        Parameters:
        fieldName - The field name
      • RangeQueryBuilder

        public RangeQueryBuilder​(StreamInput in)
                          throws java.io.IOException
        Read from a stream.
        Throws:
        java.io.IOException
    • Method Detail

      • from

        public RangeQueryBuilder from​(java.lang.Object from,
                                      boolean includeLower)
        The from part of the range query. Null indicates unbounded. In case lower bound is assigned to a string, we internally convert it to a BytesRef because in RangeQueryBuilder field are later parsed as BytesRef and we need internal representation of query to be equal regardless of whether it was created from XContent or via Java API.
      • from

        public RangeQueryBuilder from​(java.lang.Object from)
        The from part of the range query. Null indicates unbounded.
      • from

        public java.lang.Object from()
        Gets the lower range value for this query.
      • gt

        public RangeQueryBuilder gt​(java.lang.Object from)
        The from part of the range query. Null indicates unbounded.
      • gte

        public RangeQueryBuilder gte​(java.lang.Object from)
        The from part of the range query. Null indicates unbounded.
      • to

        public RangeQueryBuilder to​(java.lang.Object to,
                                    boolean includeUpper)
        The to part of the range query. Null indicates unbounded.
      • to

        public RangeQueryBuilder to​(java.lang.Object to)
        The to part of the range query. Null indicates unbounded.
      • to

        public java.lang.Object to()
        Gets the upper range value for this query. In case upper bound is assigned to a string, we internally convert it to a BytesRef because in RangeQueryBuilder field are later parsed as BytesRef and we need internal representation of query to be equal regardless of whether it was created from XContent or via Java API.
      • lt

        public RangeQueryBuilder lt​(java.lang.Object to)
        The to part of the range query. Null indicates unbounded.
      • lte

        public RangeQueryBuilder lte​(java.lang.Object to)
        The to part of the range query. Null indicates unbounded.
      • includeLower

        public RangeQueryBuilder includeLower​(boolean includeLower)
        Should the lower bound be included or not. Defaults to true.
      • includeLower

        public boolean includeLower()
        Gets the includeLower flag for this query.
      • includeUpper

        public RangeQueryBuilder includeUpper​(boolean includeUpper)
        Should the upper bound be included or not. Defaults to true.
      • includeUpper

        public boolean includeUpper()
        Gets the includeUpper flag for this query.
      • timeZone

        public RangeQueryBuilder timeZone​(java.lang.String timeZone)
        In case of date field, we can adjust the from/to fields using a timezone
      • timeZone

        public java.lang.String timeZone()
        In case of date field, gets the from/to fields timezone adjustment
      • format

        public RangeQueryBuilder format​(java.lang.String format)
        In case of format field, we can parse the from/to fields using this time format
      • format

        public java.lang.String format()
        Gets the format field to parse the from/to fields