Example usage for Java org.apache.lucene.analysis Analyzer fields, constructors, methods, implement or subclass
The text is from its open source code.
ReuseStrategy | GLOBAL_REUSE_STRATEGY A predefined ReuseStrategy that reuses the same components for every field. |
ReuseStrategy | PER_FIELD_REUSE_STRATEGY A predefined ReuseStrategy that reuses components per-field by maintaining a Map of TokenStreamComponent per field name. |
Analyzer() Create a new Analyzer, reusing the same set of components per-thread across calls to #tokenStream(String,Reader) . | |
Analyzer(ReuseStrategy reuseStrategy) Expert: create a new Analyzer with a custom ReuseStrategy . |
void | close() Frees persistent resources used by this Analyzer |
int | getOffsetGap(String fieldName) Just like #getPositionIncrementGap , except for Token offsets instead. |
int | getPositionIncrementGap(String fieldName) Invoked before indexing a IndexableField instance if terms have already been added to that field. |
ReuseStrategy | getReuseStrategy() Returns the used ReuseStrategy . |
Version | getVersion() Return the version of Lucene this analyzer will mimic the behavior of for analysis. |
TokenStream | normalize(String fieldName, TokenStream in) Wrap the given TokenStream in order to apply normalization filters. |
BytesRef | normalize(final String fieldName, final String text) Normalize a string down to the representation that it would have in the index. |
void | setVersion(Version v) Set the version of Lucene this analyzer should mimic the behavior for for analysis. |
TokenStream | tokenStream(final String fieldName, final Reader reader) Returns a TokenStream suitable for fieldName , tokenizing the contents of reader . |
TokenStream | tokenStream(final String fieldName, final String text) Returns a TokenStream suitable for fieldName , tokenizing the contents of text . |