com.atlassian.jira.issue.index
Class JavaExceptionAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by com.atlassian.jira.issue.index.JavaExceptionAnalyzer

public class JavaExceptionAnalyzer
extends org.apache.lucene.analysis.Analyzer

This class wraps the given analyzer.

The tokenStream(String,java.io.Reader) method wraps the resulting TokenStream in the ExceptionFilter.

Note: This works on more than just Java exceptions due to the functionality implemented by ExceptionFilter (JRA-7774).

Since:
v3.12
See Also:
ExceptionFilter

Constructor Summary
JavaExceptionAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
          Constructs a new instance and wraps the given analyzer
 
Method Summary
 int getPositionIncrementGap(String fieldName)
           
 org.apache.lucene.analysis.TokenStream tokenStream(String fieldName, Reader reader)
          Returns the token stream of the underlying analyzer with ExceptionFilter wrapped around it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaExceptionAnalyzer

public JavaExceptionAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
Constructs a new instance and wraps the given analyzer

Parameters:
analyzer - analyzer to wrap
Method Detail

tokenStream

public org.apache.lucene.analysis.TokenStream tokenStream(String fieldName,
                                                          Reader reader)
Returns the token stream of the underlying analyzer with ExceptionFilter wrapped around it

Specified by:
tokenStream in class org.apache.lucene.analysis.Analyzer
Parameters:
fieldName - field name
reader - reader
Returns:
token stream of the underlying analyzer with ExceptionFilter wrapped around it

getPositionIncrementGap

public int getPositionIncrementGap(String fieldName)
Overrides:
getPositionIncrementGap in class org.apache.lucene.analysis.Analyzer


Copyright © 2002-2009 Atlassian. All Rights Reserved.