Package org.apache.lucene.util.fst
Class Util.TopNSearcher<T>
java.lang.Object
org.apache.lucene.util.fst.Util.TopNSearcher<T>
- Enclosing class:
- Util
Utility class to find top N shortest paths from start
point(s).
-
Constructor Summary
ConstructorsConstructorDescriptionTopNSearcher
(FST<T> fst, int topN, int maxQueueDepth, Comparator<T> comparator) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
acceptResult
(IntsRef input, T output) protected void
addIfCompetitive
(Util.FSTPath<T> path) void
addStartPaths
(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRef input) Adds all leaving arcs, including 'finished' arc, if the node is final, from this node into the queue.Util.MinResult<T>[]
search()
-
Constructor Details
-
TopNSearcher
-
-
Method Details
-
addIfCompetitive
-
addStartPaths
public void addStartPaths(FST.Arc<T> node, T startOutput, boolean allowEmptyString, IntsRef input) throws IOException Adds all leaving arcs, including 'finished' arc, if the node is final, from this node into the queue.- Throws:
IOException
-
search
- Throws:
IOException
-
acceptResult
-