private AnalyzerDef[] createAnalyzerDefArray() {
List<String> globalAnalyzerDefNames = new ArrayList<String>();
AnalyzerDef[] defs = new AnalyzerDef[mapping.getAnalyzerDefs().size()];
int index = 0;
for ( Map<String, Object> analyzerDef : mapping.getAnalyzerDefs() ) {
AnalyzerDef def = createAnalyzerDef( analyzerDef );
if ( globalAnalyzerDefNames.contains( def.name() ) ) {
throw new SearchException( "Multiple analyzer definitions with the same name: " + def.name() );
}
globalAnalyzerDefNames.add( def.name() );
defs[index] = def;
index++;
}
return defs;
}