if ( !create )
{
dropIndexDirectories( schema, table, textcol );
}
Version luceneVersion = LuceneUtils.currentVersion();
// create the new directory
DerbyLuceneDir derbyLuceneDir = getDerbyLuceneDir( conn, schema, table, textcol );
// get the Analyzer and the field names. use the default if the user didn't specify an override
if ( indexDescriptorMaker == null ) { indexDescriptorMaker = LuceneUtils.class.getName() + ".defaultIndexDescriptor"; }
LuceneIndexDescriptor indexDescriptor = getIndexDescriptor( indexDescriptorMaker );
String[] fieldNames = indexDescriptor.getFieldNames();
Analyzer analyzer = indexDescriptor.getAnalyzer();
// make sure the field names don't overlap with the key names
sortAndVetFieldNames( fieldNames, primaryKeys );
Properties indexProperties = new Properties();
indexProperties.setProperty( LUCENE_VERSION, luceneVersion.toString() );
indexProperties.setProperty( UPDATE_TIMESTAMP, Long.toString( System.currentTimeMillis() ) );
indexProperties.setProperty( INDEX_DESCRIPTOR_MAKER, indexDescriptorMaker );
indexProperties.setProperty( ANALYZER, analyzer.getClass().getName() );
StringBuilder tableFunction = new StringBuilder();