if (iw == null) {
iw = new IndexWriter(getFile(), getAnalyzer(), create);
}
} catch (IOException e) {
if (create) {
throw new DBException(FaultCodes.IDX_CANNOT_CREATE,
"Failed to cleate index " + name + ", collection " + collection.getCanonicalName(), e);
} else {
throw new DBException(FaultCodes.IDX_CORRUPTED,
"Failed to open index " + name + ", collection " + collection.getCanonicalName(), e);
}
}
}