org.compass.core.lucene.engine.analyzer
Interface LuceneAnalyzerFactory

All Known Implementing Classes:
DefaultLuceneAnalyzerFactory

public interface LuceneAnalyzerFactory

A factory for Lucene Analyzer.

Author:
kimchy

Method Summary
 Analyzer createAnalyzer(String analyzerName, CompassSettings settings)
          Creates a thread safe analyzer instance to be used.
 

Method Detail

createAnalyzer

Analyzer createAnalyzer(String analyzerName,
                        CompassSettings settings)
                        throws SearchEngineException
Creates a thread safe analyzer instance to be used. The factory is given the analyzer name and the settings that are relevant for that analyzer.

For example, setting compass.engine.analyzer.[analyzer name].factory with the factory class name (or the actual instance of the factory) will use the factory to create the actual instance of the analyzer.

The settings are the one bounded to the specific analyzer. For examle, a setting under the key: compass.engine.analyzer.[analyzer name].key1=prop1 will be injected as key1=prop1. The global settings can still be accessed using CompassSettings.getGloablSettings().

Parameters:
analyzerName - The analyzer name
settings - The settings boudned to the specific analyzer
Returns:
An instnace of Lucene Analyzer
Throws:
SearchEngineException


Copyright (c) 2004-2009 The Compass Project.