Class AbstractAnalyzer
- java.lang.Object
-
- org.apache.cassandra.index.sai.analyzer.AbstractAnalyzer
-
- All Implemented Interfaces:
java.util.Iterator<java.nio.ByteBuffer>
- Direct Known Subclasses:
NonTokenizingAnalyzer
public abstract class AbstractAnalyzer extends java.lang.Object implements java.util.Iterator<java.nio.ByteBuffer>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractAnalyzer.AnalyzerFactory
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ByteBuffer
next
protected java.lang.String
nextLiteral
-
Constructor Summary
Constructors Constructor Description AbstractAnalyzer()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
end()
Call when tokenization is finished.static AbstractAnalyzer.AnalyzerFactory
fromOptions(IndexTermType indexTermType, java.util.Map<java.lang.String,java.lang.String> options)
static java.util.Map<java.lang.String,java.lang.String>
getAnalyzerOptions(java.util.Map<java.lang.String,java.lang.String> options)
java.nio.ByteBuffer
next()
Note: This method does not advance, as we rely onIterator.hasNext()
to buffer the next value.void
remove()
void
reset(java.nio.ByteBuffer input)
protected abstract void
resetInternal(java.nio.ByteBuffer input)
abstract boolean
transformValue()
-
-
-
Method Detail
-
transformValue
public abstract boolean transformValue()
- Returns:
- true if index value is transformed, e.g. normalized or lower-cased or tokenized.
-
end
public void end()
Call when tokenization is finished. Used by the LuceneAnalyzer.
-
next
public java.nio.ByteBuffer next()
Note: This method does not advance, as we rely onIterator.hasNext()
to buffer the next value.- Specified by:
next
in interfacejava.util.Iterator<java.nio.ByteBuffer>
- Returns:
- the raw value currently buffered by this iterator
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.nio.ByteBuffer>
-
resetInternal
protected abstract void resetInternal(java.nio.ByteBuffer input)
-
reset
public void reset(java.nio.ByteBuffer input)
-
fromOptions
public static AbstractAnalyzer.AnalyzerFactory fromOptions(IndexTermType indexTermType, java.util.Map<java.lang.String,java.lang.String> options)
-
getAnalyzerOptions
public static java.util.Map<java.lang.String,java.lang.String> getAnalyzerOptions(java.util.Map<java.lang.String,java.lang.String> options)
-
-