org.apache.lucene.search

## Class MultiRangeQuery.Builder

- java.lang.Object
- - org.apache.lucene.search.MultiRangeQuery.Builder

- Direct Known Subclasses:
    DoublePointMultiRangeBuilder, FloatPointMultiRangeBuilder, IntPointMultiRangeBuilder, LongPointMultiRangeBuilder
  Enclosing class:
    MultiRangeQuery

      public abstract static class MultiRangeQuery.Builder
      extends Object

  A builder for multirange queries.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `bytesPerDim`
    `protected List<MultiRangeQuery.RangeClause>` | `clauses`
    `protected String` | `field`
    `protected int` | `numDims`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder(String field, int bytesPerDim, int numDims)` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiRangeQuery.Builder` | `add(byte[] lowerValue, byte[] upperValue)` Add a new clause to this `MultiRangeQuery.Builder`.
    `MultiRangeQuery.Builder` | `add(MultiRangeQuery.RangeClause clause)` Add a new clause to this `MultiRangeQuery.Builder`.
    `abstract MultiRangeQuery` | `build()` Create a new `MultiRangeQuery` based on the parameters that have been set on this builder.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### field

          protected final String field

    - #### bytesPerDim

          protected final int bytesPerDim

    - #### numDims

          protected final int numDims

    - #### clauses

          protected final List<MultiRangeQuery.RangeClause> clauses

  - ### Constructor Detail

    - #### Builder

          public Builder(String field,
                         int bytesPerDim,
                         int numDims)

      Sole constructor.

  - ### Method Detail

    - #### add

          public MultiRangeQuery.Builder add(MultiRangeQuery.RangeClause clause)

      Add a new clause to this `MultiRangeQuery.Builder`.

    - #### add

          public MultiRangeQuery.Builder add(byte[] lowerValue,
                                             byte[] upperValue)

      Add a new clause to this `MultiRangeQuery.Builder`.

    - #### build

          public abstract MultiRangeQuery build()

      Create a new `MultiRangeQuery` based on the parameters that have been set on this builder.

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.