iw.addDocument(doc);
synchronized(lock) {
docsAdded++;
}
} catch (IOException e) {
throw new DBException(FaultCodes.IDX_CORRUPTED,
"Failed to add document to the index " + name + ", collection " + collection.getCanonicalName(), e);
}
}
}
public void onDocumentDeleted(Key key) throws DBException {
assertOpen();
try {
iw.deleteDocuments(new Term(KEYNAME, key.toString()));
synchronized(lock) {
docsDeleted++;
}
} catch (IOException e) {
throw new DBException(FaultCodes.IDX_CORRUPTED,
"Failed to delete document from the index " + name + ", collection " + collection.getCanonicalName(), e);
}
}
public void onValueAdded(IndexPattern pattern, String value, Key key, int pos, int len, short elemID, short attrID) {