Package com.atlassian.jira.issue.index
Class JiraAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
com.atlassian.jira.issue.index.JiraAnalyzer
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class JiraAnalyzer
extends org.apache.lucene.analysis.Analyzer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
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
FieldsModifier and TypeFieldDescriptionstatic final org.apache.lucene.analysis.Analyzer
static final org.apache.lucene.analysis.Analyzer
static final org.apache.lucene.analysis.Analyzer
Fields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
-
Constructor Summary
ConstructorsConstructorDescriptionJiraAnalyzer
(boolean indexing, JiraAnalyzer.Stemming stemming, JiraAnalyzer.StopWordRemoval stopWordRemoval) -
Method Summary
Modifier and TypeMethodDescriptionstatic final com.atlassian.jira.issue.index.JiraAnalyzer.PerFieldIndexingAnalyzer
DELTA-537: Helper method for creating consistently configured analyzers for indexing.protected static final org.apache.lucene.analysis.Analyzer
DELTA-537: Helper method for creating consistently configured analyzers for search.final org.apache.lucene.analysis.Analyzer.TokenStreamComponents
createComponents
(String fieldName) protected org.apache.lucene.analysis.TokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, setVersion, tokenStream, tokenStream
-
Field Details
-
ANALYZER_FOR_INDEXING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_INDEXING -
ANALYZER_FOR_SEARCHING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_SEARCHING -
ANALYZER_FOR_EXACT_SEARCHING
public static final org.apache.lucene.analysis.Analyzer ANALYZER_FOR_EXACT_SEARCHING
-
-
Constructor Details
-
JiraAnalyzer
public JiraAnalyzer(boolean indexing, JiraAnalyzer.Stemming stemming, JiraAnalyzer.StopWordRemoval stopWordRemoval)
-
-
Method Details
-
createComponents
public final org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName) - Specified by:
createComponents
in classorg.apache.lucene.analysis.Analyzer
-
normalize
protected org.apache.lucene.analysis.TokenStream normalize(String fieldName, org.apache.lucene.analysis.TokenStream in) - Overrides:
normalize
in classorg.apache.lucene.analysis.Analyzer
-
createAnalyzerForIndexing
public static final com.atlassian.jira.issue.index.JiraAnalyzer.PerFieldIndexingAnalyzer createAnalyzerForIndexing()DELTA-537: Helper method for creating consistently configured analyzers for indexing. Created to avoid direct usage of JiraAnalyzer#ANALYZER_FOR_INDEXING in tests- See Also:
-
createAnalyzerForSearching
protected static final org.apache.lucene.analysis.Analyzer createAnalyzerForSearching()DELTA-537: Helper method for creating consistently configured analyzers for search. Created to avoid direct usage of JiraAnalyzer#ANALYZER_FOR_SEARCHING in unit tests, which may cause issues when reused in multiple tests with different language settings. Analyzers reuse TokenStreamComponents(which on turn have languge specific configuration) so using static final analyzer with perticular language set may lead to unpredictable results in other tests relying on the same analyzer.
-