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 Classes
    Modifier and Type
    Class
    Description
    static 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

    Fields
    Modifier and Type
    Field
    Description
    static 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

    Constructors
    Constructor
    Description
    JiraAnalyzer(boolean indexing, JiraAnalyzer.Stemming stemming, JiraAnalyzer.StopWordRemoval stopWordRemoval)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
     
    protected org.apache.lucene.analysis.TokenStream
    normalize(String fieldName, org.apache.lucene.analysis.TokenStream in)
     

    Methods inherited from class org.apache.lucene.analysis.Analyzer

    attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, setVersion, tokenStream, tokenStream

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

  • Method Details

    • createComponents

      public final org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName)
      Specified by:
      createComponents in class org.apache.lucene.analysis.Analyzer
    • normalize

      protected org.apache.lucene.analysis.TokenStream normalize(String fieldName, org.apache.lucene.analysis.TokenStream in)
      Overrides:
      normalize in class org.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.