DocumentCollectionBuilder builder = null;
if ( jsapResult.userSpecified( "buildCollection" ) ) {
final Class<? extends DocumentCollectionBuilder> builderClass = jsapResult.getClass( "builderClass" );
builder = builderClass != null ? builderClass.getConstructor( String.class, DocumentFactory.class, boolean.class ).newInstance(
jsapResult.getString( "buildCollection" ),
documentSequence.factory().numberOfFields() == indexedField.length ? documentSequence.factory().copy() : new SubDocumentFactory( documentSequence.factory().copy(), indexedField ),
Boolean.valueOf( jsapResult.getBoolean( "exact" ) ) ) : null;
}
run( jsapResult.getString( "basename" ), documentSequence, Completeness.valueOf( jsapResult.getString( "completeness" ) ), jsapResult.getBoolean( "downcase" ) ? DowncaseTermProcessor.getInstance() : ObjectParser.fromSpec( jsapResult
.getString( "termProcessor" ), TermProcessor.class, MG4JClassParser.PACKAGE, new String[] { "getInstance" } ), builder, jsapResult