Class MappingCharFilter
java.lang.Object
java.io.Reader
org.apache.lucene.analysis.CharFilter
org.apache.lucene.analysis.charfilter.BaseCharFilter
org.apache.lucene.analysis.charfilter.MappingCharFilter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
Simplistic
CharFilter
that applies the mappings contained in a NormalizeCharMap
to the character stream, and correcting the resulting changes to the offsets. Matching is greedy
(longest pattern matching at a given point wins). Replacement is allowed to be the empty string.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RollingCharBuffer
private final CharObjectHashMap
<FST.Arc<CharsRef>> private final FST.BytesReader
private int
private CharsRef
private int
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
-
Constructor Summary
ConstructorsConstructorDescriptionMappingCharFilter
(NormalizeCharMap normMap, Reader in) Default constructor that takes aReader
. -
Method Summary
Methods inherited from class org.apache.lucene.analysis.charfilter.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffset
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, skip, transferTo
-
Field Details
-
outputs
-
map
-
fstReader
-
buffer
-
scratchArc
-
cachedRootArcs
-
replacement
-
replacementPointer
private int replacementPointer -
inputOff
private int inputOff
-
-
Constructor Details
-
MappingCharFilter
Default constructor that takes aReader
.
-
-
Method Details
-
reset
- Overrides:
reset
in classReader
- Throws:
IOException
-
read
- Overrides:
read
in classReader
- Throws:
IOException
-
read
- Specified by:
read
in classReader
- Throws:
IOException
-