|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.analysis.Analyzer
fr.gouv.culture.sdx.search.lucene.analysis.AbstractAnalyzer
fr.gouv.culture.sdx.search.lucene.analysis.MetaAnalyzer
A dispatcher for field specific analyzers.
This analyzer knows about specific analyzers for the fields of a document base. Hence, when its tokenStream(fieldName, reader) method is called, it attempts to dispatch the task to a specific analyzer for the given field name.
Field Summary |
Fields inherited from class fr.gouv.culture.sdx.search.lucene.analysis.AbstractAnalyzer |
logger |
Constructor Summary | |
MetaAnalyzer()
Creates a MetaAnalyzer A logger must be set and then this MetaAnalyzer must be setUp. |
Method Summary | |
FieldsDefinition |
getFieldsDefinition()
Returns a the FieldsDefinition for this MetaAnalyzer (basically a Hashtable of all the Fields) |
void |
setUp(FieldsDefinition fields)
Builds an analyzer with definitions for fields. |
org.apache.lucene.analysis.TokenStream |
tokenStream(java.lang.String fieldName,
java.io.Reader reader)
Tokenizes contents. |
Methods inherited from class fr.gouv.culture.sdx.search.lucene.analysis.AbstractAnalyzer |
configure, enableLogging |
Methods inherited from class org.apache.lucene.analysis.Analyzer |
tokenStream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.gouv.culture.sdx.search.lucene.analysis.Analyzer |
tokenStream |
Constructor Detail |
public MetaAnalyzer()
A logger must be set and then this MetaAnalyzer must be setUp.
AbstractAnalyzer.enableLogging(org.apache.avalon.framework.logger.Logger)
,
setUp(fr.gouv.culture.sdx.search.lucene.FieldsDefinition)
Method Detail |
public void setUp(FieldsDefinition fields) throws SDXException
fields
- The fields and their definitions (cannot be null).
SDXException
public org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
The tokenizing is never done by this object. Instead, using the provided field name, it will try to get a specific analyzer from the fields definition. If it can't find one, it will use the default analyzer.
fieldName
- The field name for tokenizationreader
- The readerpublic FieldsDefinition getFieldsDefinition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |