|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.search.suggest.BufferedInputIterator
public class BufferedInputIterator
This wrapper buffers incoming elements.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.lucene.search.suggest.InputIterator |
|---|
InputIterator.InputIteratorWrapper |
| Field Summary | |
|---|---|
protected int |
curPos
current buffer position |
protected BytesRefArray |
entries
buffered term entries |
protected long[] |
freqs
buffered weights, parallel with entries |
protected BytesRefArray |
payloads
buffered payload entries |
| Fields inherited from interface org.apache.lucene.search.suggest.InputIterator |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
BufferedInputIterator(InputIterator source)
Creates a new iterator, buffering entries from the specified iterator |
|
| Method Summary | |
|---|---|
Comparator<BytesRef> |
getComparator()
|
boolean |
hasPayloads()
Returns true if the iterator has payloads |
BytesRef |
next()
|
BytesRef |
payload()
An arbitrary byte[] to record per suggestion. |
long |
weight()
A term's weight, higher numbers mean better suggestions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected BytesRefArray entries
protected BytesRefArray payloads
protected int curPos
protected long[] freqs
entries
| Constructor Detail |
|---|
public BufferedInputIterator(InputIterator source)
throws IOException
IOException| Method Detail |
|---|
public long weight()
InputIterator
weight in interface InputIterator
public BytesRef next()
throws IOException
next in interface BytesRefIteratorIOExceptionpublic BytesRef payload()
InputIteratorLookup.LookupResult.payload to retrieve the payload
for each suggestion.
payload in interface InputIteratorpublic boolean hasPayloads()
InputIterator
hasPayloads in interface InputIteratorpublic Comparator<BytesRef> getComparator()
getComparator in interface BytesRefIterator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||