Package ome.services.fulltext
Class ConfiguredAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- ome.services.fulltext.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 toConfiguredAnalyzer(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)
-
-
-
Constructor Detail
-
ConfiguredAnalyzer
public ConfiguredAnalyzer()
Construct an analyzer wrapping the same class as previously passed toConfiguredAnalyzer(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, nevernull
-
-
Method Detail
-
tokenStream
public final org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
- Specified by:
tokenStream
in classorg.apache.lucene.analysis.Analyzer
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classorg.apache.lucene.analysis.Analyzer
-
-