*/
public static Analyzer buildAnalyzer(AnalyzerDef analyzerDef, Version luceneMatchVersion) {
ResourceLoader defaultResourceLoader = new HibernateSearchResourceLoader();
TokenizerDef token = analyzerDef.tokenizer();
TokenizerFactory tokenFactory = instanceFromClass( TokenizerFactory.class, token.factory(), "Tokenizer factory" );
final Map<String, String> tokenMapsOfParameters = getMapOfParameters( token.params(), luceneMatchVersion );
tokenFactory.init( tokenMapsOfParameters );
injectResourceLoader( tokenFactory, defaultResourceLoader, tokenMapsOfParameters );
final int length = analyzerDef.filters().length;
final int charLength = analyzerDef.charFilters().length;