public static LuceneWorkSerializer createSerializer(String indexName, Properties cfg,
WorkerBuildContext buildContext) {
try {
return new PluggableSerializationLuceneWorkSerializer(
new AvroSerializationProvider(),
buildContext.getUninitializedSearchFactory() );
}
catch (RuntimeException e) {
if ( e instanceof SearchException ) {
throw e;