Package 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
Description
`final long`
`maxWeight`
Maximum entry weight for the suggester
`final long`
`minWeight`
Minimum entry weight for the suggester
`final byte`
`type`
type of suggester (context-enabled or not)

### Fields inherited from interface org.apache.lucene.util.Accountable

`NULL_ACCOUNTABLE`

## Method Summary

Modifier and Type
Method
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 Details

### 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 Details

### 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`