public class OLucenePerFieldAnalyzerWrapper
extends org.apache.lucene.analysis.DelegatingAnalyzerWrapper
Doesn't allow to wrap components or readers. Thread local resources can be delegated to the delegate analyzer, but not allocated on this analyzer (limit memory consumption). Uses a per field reuse strategy.
Constructor and Description |
---|
OLucenePerFieldAnalyzerWrapper(org.apache.lucene.analysis.Analyzer defaultAnalyzer)
Constructs with default analyzer.
|
OLucenePerFieldAnalyzerWrapper(org.apache.lucene.analysis.Analyzer defaultAnalyzer,
Map<String,org.apache.lucene.analysis.Analyzer> fieldAnalyzers)
Constructs with default analyzer and a map of analyzers to use for specific fields.
|
Modifier and Type | Method and Description |
---|---|
OLucenePerFieldAnalyzerWrapper |
add(OLucenePerFieldAnalyzerWrapper analyzer) |
OLucenePerFieldAnalyzerWrapper |
add(String field,
org.apache.lucene.analysis.Analyzer analyzer) |
protected Map<String,org.apache.lucene.analysis.Analyzer> |
getAnalyzers() |
protected org.apache.lucene.analysis.Analyzer |
getWrappedAnalyzer(String fieldName) |
OLucenePerFieldAnalyzerWrapper |
remove(String field) |
String |
toString() |
wrapComponents, wrapReader, wrapReaderForNormalization, wrapTokenStreamForNormalization
attributeFactory, createComponents, getOffsetGap, getPositionIncrementGap, initReader, initReaderForNormalization, normalize
public OLucenePerFieldAnalyzerWrapper(org.apache.lucene.analysis.Analyzer defaultAnalyzer)
defaultAnalyzer
- Any fields not specifically defined to use a different analyzer will use
the one provided here.public OLucenePerFieldAnalyzerWrapper(org.apache.lucene.analysis.Analyzer defaultAnalyzer, Map<String,org.apache.lucene.analysis.Analyzer> fieldAnalyzers)
defaultAnalyzer
- Any fields not specifically defined to use a different analyzer will use
the one provided here.fieldAnalyzers
- a Map (String field name to the Analyzer) to be used for those fieldsprotected org.apache.lucene.analysis.Analyzer getWrappedAnalyzer(String fieldName)
getWrappedAnalyzer
in class org.apache.lucene.analysis.AnalyzerWrapper
public OLucenePerFieldAnalyzerWrapper add(String field, org.apache.lucene.analysis.Analyzer analyzer)
public OLucenePerFieldAnalyzerWrapper add(OLucenePerFieldAnalyzerWrapper analyzer)
public OLucenePerFieldAnalyzerWrapper remove(String field)
Copyright © 2009–2020 OrientDB. All rights reserved.