* the indexing queue to the index.
*/
private void checkIndexingQueue(boolean transactionPresent) {
Map<NodeId, Document> finished = new HashMap<NodeId, Document>();
for (Document document : indexingQueue.getFinishedDocuments()) {
NodeId id = new NodeId(document.get(FieldNames.UUID));
finished.put(id, document);
}
// now update index with the remaining ones if there are any
if (!finished.isEmpty()) {
log.debug("updating index with {} nodes from indexing queue.",
finished.size());
// Only useful for testing
synchronized (getIndexingQueue()) {
indexingQueueCommitPending = true;
}
try {
// remove documents from the queue
for (NodeId id : finished.keySet()) {
indexingQueue.removeDocument(id.toString());
}
try {
if (transactionPresent) {
synchronized (this) {