Class ConfiguredAnalyzer

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

    public final class ConfiguredAnalyzer
    extends org.apache.lucene.analysis.Analyzer
    A full-text search analyzer usable by the OMERO model. Wraps an underlying analyzer. The wrapped analyzer class is configured according to server settings or otherwise.
    Since:
    5.5.0
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfiguredAnalyzer()
      Construct an analyzer wrapping the same class as previously passed to ConfiguredAnalyzer(Class).
      ConfiguredAnalyzer​(java.lang.Class<? extends org.apache.lucene.analysis.Analyzer> analyzerClass)
      Construct an analyzer wrapping the given class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      org.apache.lucene.analysis.TokenStream tokenStream​(java.lang.String fieldName, java.io.Reader reader)  
      • Methods inherited from class org.apache.lucene.analysis.Analyzer

        getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream
      • Methods inherited from class java.lang.Object

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

      • ConfiguredAnalyzer

        public ConfiguredAnalyzer()
        Construct an analyzer wrapping the same class as previously passed to ConfiguredAnalyzer(Class).
      • ConfiguredAnalyzer

        public ConfiguredAnalyzer​(java.lang.Class<? extends org.apache.lucene.analysis.Analyzer> analyzerClass)
        Construct an analyzer wrapping the given class.
        Parameters:
        analyzerClass - a non-abstract class of Lucene analyzer, never null
    • Method Detail

      • tokenStream

        public final org.apache.lucene.analysis.TokenStream tokenStream​(java.lang.String fieldName,
                                                                        java.io.Reader reader)
        Specified by:
        tokenStream in class org.apache.lucene.analysis.Analyzer
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class org.apache.lucene.analysis.Analyzer