Package org.apache.lucene.util.fst
Class BytesRefFSTEnum<T>
java.lang.Object
org.apache.lucene.util.fst.BytesRefFSTEnum<T>
Enumerates all input (BytesRef) + output pairs in an FST.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Holds a single input (BytesRef) + output pair. -
Field Summary
-
Constructor Summary
ConstructorDescriptionBytesRefFSTEnum
(FST<T> fst) doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()
protected void
doNext()
protected void
Seeks to smallest term that's >= target.protected int
protected int
protected void
grow()
next()
Seeks to smallest term that's >= target.Seeks to exactly this term, returning null if the term doesn't exist.Seeks to biggest term that's <= target.protected void
setCurrentLabel
(int label)
-
Field Details
-
fst
-
arcs
-
output
-
NO_OUTPUT
-
fstReader
-
upto
protected int upto
-
-
Constructor Details
-
BytesRefFSTEnum
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
-
-
Method Details
-
current
-
next
- Throws:
IOException
-
seekCeil
Seeks to smallest term that's >= target.- Throws:
IOException
-
seekFloor
Seeks to biggest term that's <= target.- Throws:
IOException
-
seekExact
Seeks to exactly this term, returning null if the term doesn't exist. This is faster than usingseekFloor(org.apache.lucene.util.BytesRef)
orseekCeil(org.apache.lucene.util.BytesRef)
because it short-circuits as soon the match is not found.- Throws:
IOException
-
getTargetLabel
protected int getTargetLabel() -
getCurrentLabel
protected int getCurrentLabel() -
setCurrentLabel
protected void setCurrentLabel(int label) -
grow
protected void grow() -
doNext
- Throws:
IOException
-
doSeekCeil
Seeks to smallest term that's >= target.- Throws:
IOException
-