org.apache.lucene.search.suggest.document

## Class CompletionsTermsReader

- java.lang.Object
- - org.apache.lucene.search.suggest.document.CompletionsTermsReader

- All Implemented Interfaces:
    Accountable

      public final class CompletionsTermsReader
      extends Object
      implements Accountable

  Holder for suggester and field-level info for a suggest field
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `long` | `maxWeight` Maximum entry weight for the suggester
    `long` | `minWeight` Minimum entry weight for the suggester
    `byte` | `type` type of suggester (context-enabled or not)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<Accountable>` | `getChildResources()`
    `long` | `ramBytesUsed()`
    `NRTSuggester` | `suggester()` Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary

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

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

- - ### Field Detail

    - #### minWeight

          public final long minWeight

      Minimum entry weight for the suggester

    - #### maxWeight

          public final long maxWeight

      Maximum entry weight for the suggester

    - #### type

          public final byte type

      type of suggester (context-enabled or not)

  - ### Method Detail

    - #### suggester

          public NRTSuggester suggester()
                                 throws IOException

      Returns the suggester for a field, if not loaded already, loads the appropriate suggester from CompletionDictionary
      Throws:
        `IOException`

    - #### ramBytesUsed

          public long ramBytesUsed()

      Specified by:
        `ramBytesUsed` in interface `Accountable`

    - #### getChildResources

          public Collection<Accountable> getChildResources()

      Specified by:
        `getChildResources` in interface `Accountable`

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