org.apache.lucene.search.suggest.fst
Class InMemorySorter
java.lang.Object
org.apache.lucene.search.suggest.fst.InMemorySorter
- All Implemented Interfaces:
- BytesRefSorter
public final class InMemorySorter
- extends Object
- implements BytesRefSorter
An BytesRefSorter
that keeps all the entries in memory.
- 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 |
void |
add(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.BytesRefIterator |
iterator()
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns
an iterator over all sorted entries. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemorySorter
public InMemorySorter(Comparator<org.apache.lucene.util.BytesRef> comparator)
add
public void add(org.apache.lucene.util.BytesRef utf8)
- Description copied from interface:
BytesRefSorter
- Adds a single suggestion entry (possibly compound with its bucket).
- Specified by:
add
in interface BytesRefSorter
iterator
public org.apache.lucene.util.BytesRefIterator iterator()
- Description copied from interface:
BytesRefSorter
- Sorts the entries added in
BytesRefSorter.add(BytesRef)
and returns
an iterator over all sorted entries.
- Specified by:
iterator
in interface BytesRefSorter
getComparator
public Comparator<org.apache.lucene.util.BytesRef> getComparator()
- Specified by:
getComparator
in interface BytesRefSorter
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.