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;
}
final IndexBuilder indexBuilder = new IndexBuilder( jsapResult.getString( "basename" ), documentSequence )
.termProcessor( termProcessor )