Class AlfrescoAnalyzerWrapper

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class AlfrescoAnalyzerWrapper
    extends org.apache.lucene.analysis.AnalyzerWrapper
    Wraps SOLR access to for localising tokens As analysers are cached, and anylysers themselves cache token streams we have to be able to switch locales inside the MLAnalyser.
    Author:
    Andy
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AlfrescoAnalyzerWrapper.Mode  
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getPositionIncrementGap​(java.lang.String fieldName)  
      protected org.apache.lucene.analysis.Analyzer getWrappedAnalyzer​(java.lang.String fieldName)  
      • Methods inherited from class org.apache.lucene.analysis.AnalyzerWrapper

        attributeFactory, createComponents, getOffsetGap, initReader, initReaderForNormalization, normalize, wrapComponents, wrapReader, wrapReaderForNormalization, wrapTokenStreamForNormalization
      • Methods inherited from class org.apache.lucene.analysis.Analyzer

        close, getReuseStrategy, getVersion, normalize, setVersion, tokenStream, tokenStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlfrescoAnalyzerWrapper

        public AlfrescoAnalyzerWrapper​(org.apache.solr.schema.IndexSchema schema,
                                       AlfrescoAnalyzerWrapper.Mode mode)
        Parameters:
        schema -
        index -
    • Method Detail

      • getPositionIncrementGap

        public int getPositionIncrementGap​(java.lang.String fieldName)
        Overrides:
        getPositionIncrementGap in class org.apache.lucene.analysis.AnalyzerWrapper
      • getWrappedAnalyzer

        protected org.apache.lucene.analysis.Analyzer getWrappedAnalyzer​(java.lang.String fieldName)
        Specified by:
        getWrappedAnalyzer in class org.apache.lucene.analysis.AnalyzerWrapper