org.apache.lucene.index

## Class PrefixCodedTerms.Builder

- java.lang.Object
- - org.apache.lucene.index.PrefixCodedTerms.Builder

- Enclosing class:
    PrefixCodedTerms

      public static class PrefixCodedTerms.Builder
      extends Object

  Builds a PrefixCodedTerms: call add repeatedly, then finish.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(String field, BytesRef bytes)` add a term.
    `void` | `add(Term term)` add a term
    `PrefixCodedTerms` | `finish()` return finalized form

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder()

      Sole constructor.

  - ### Method Detail

    - #### add

          public void add(Term term)

      add a term

    - #### add

          public void add(String field,
                          BytesRef bytes)

      add a term. This fully consumes in the incoming `BytesRef`.

    - #### finish

          public PrefixCodedTerms finish()

      return finalized form

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