Class JackrabbitAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.jackrabbit.core.query.lucene.JackrabbitAnalyzer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class JackrabbitAnalyzer extends Analyzer
This is the global jackrabbit lucene analyzer. By default, all properties are indexed with theStandardAnalyzer(new String[]{})
, unless in the <SearchIndex> configuration a global analyzer is defined. In the indexing configuration, properties can be configured to be indexed with a specific analyzer. If configured, this analyzer is used to index the text of the property and to parse searchtext for this property.
-
-
Constructor Summary
Constructors Constructor Description JackrabbitAnalyzer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenStream
reusableTokenStream(String fieldName, Reader reader)
protected void
setDefaultAnalyzer(Analyzer analyzer)
protected void
setIndexingConfig(IndexingConfiguration indexingConfig)
A param indexingConfig the indexing configuration.TokenStream
tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader.-
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
-
-
-
-
Method Detail
-
setIndexingConfig
protected void setIndexingConfig(IndexingConfiguration indexingConfig)
A param indexingConfig the indexing configuration.
-
setDefaultAnalyzer
protected void setDefaultAnalyzer(Analyzer analyzer)
- Parameters:
analyzer
- the default jackrabbit analyzer
-
tokenStream
public final TokenStream tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader. If the fieldName (property) is configured to have a different analyzer than the default, this analyzer is used for tokenization- Specified by:
tokenStream
in classAnalyzer
-
reusableTokenStream
public final TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
- Overrides:
reusableTokenStream
in classAnalyzer
- Throws:
IOException
-
-