Package com.atlassian.jira.issue.index
Class JavaExceptionAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
com.atlassian.jira.issue.index.JavaExceptionAnalyzer
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class JavaExceptionAnalyzer
extends org.apache.lucene.analysis.Analyzer
This class wraps the given analyzer.
The Analyzer.tokenStream(String, java.io.Reader)
method wraps the resulting
TokenStream
in the SubtokenFilter
.
Note: This works on more than just Java exceptions due to the functionality implemented by SubtokenFilter
(JRA-7774).
- Since:
- v3.12
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents
-
Field Summary
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
-
Constructor Summary
ConstructorsConstructorDescriptionJavaExceptionAnalyzer
(org.apache.lucene.analysis.Analyzer analyzer) Constructs a new instance and wraps the given analyzer -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
createComponents
(String fieldName) Returns the token stream of the underlying analyzer with ExceptionFilter wrapped around itint
getPositionIncrementGap
(String fieldName) Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, normalize, setVersion, tokenStream, tokenStream
-
Constructor Details
-
JavaExceptionAnalyzer
public JavaExceptionAnalyzer(org.apache.lucene.analysis.Analyzer analyzer) Constructs a new instance and wraps the given analyzer- Parameters:
analyzer
- analyzer to wrap
-
-
Method Details
-
createComponents
protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName) Returns the token stream of the underlying analyzer with ExceptionFilter wrapped around it- Specified by:
createComponents
in classorg.apache.lucene.analysis.Analyzer
- Parameters:
fieldName
- field name- Returns:
- token stream of the underlying analyzer with ExceptionFilter wrapped around it
-
getPositionIncrementGap
- Overrides:
getPositionIncrementGap
in classorg.apache.lucene.analysis.Analyzer
-