Interface BytesRefSorter
-
- All Known Implementing Classes:
ExternalRefSorter,InMemorySorter
public interface BytesRefSorterCollectsBytesRefand then allows one to iterate over their sorted order. Implementations of this interface will be called in a single-threaded scenario.- WARNING: This API is experimental and might change in incompatible ways in the next release.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(org.apache.lucene.util.BytesRef utf8)Adds a single suggestion entry (possibly compound with its bucket).Comparator<org.apache.lucene.util.BytesRef>getComparator()org.apache.lucene.util.BytesRefIteratoriterator()Sorts the entries added inadd(BytesRef)and returns an iterator over all sorted entries.
-
-
-
Method Detail
-
add
void add(org.apache.lucene.util.BytesRef utf8) throws IOException, IllegalStateException
Adds a single suggestion entry (possibly compound with its bucket).- Throws:
IOException- If an I/O exception occurs.IllegalStateException- If an addition attempt is performed after a call toiterator()has been made.
-
iterator
org.apache.lucene.util.BytesRefIterator iterator() throws IOExceptionSorts the entries added inadd(BytesRef)and returns an iterator over all sorted entries.- Throws:
IOException- If an I/O exception occurs.
-
getComparator
Comparator<org.apache.lucene.util.BytesRef> getComparator()
-
-