private DeleteResult deleteInLucene(Delete delete, DeletionStrategy plan) throws IOException { try { if (plan.currentlyDeleted == false) { // any exception that comes from this is a either an ACE or a fatal exception there // can't be any document failures coming from this indexWriter.deleteDocuments(delete.uid()); } versionMap.putUnderLock(delete.uid().bytes(), new DeleteVersionValue(plan.versionOfDeletion, engineConfig.getThreadPool().relativeTimeInMillis())); return new DeleteResult(plan.versionOfDeletion, plan.currentlyDeleted == false); } catch (Exception ex) { if (indexWriter.getTragicException() == null) { // there is no tragic event and such it must be a document level failure return new DeleteResult(ex, plan.versionOfDeletion, plan.currentlyDeleted == false); } else { throw ex; } } }
versionMap.putUnderLock(create.uid().bytes(), new VersionValue(updatedVersion, translogLocation)); create.setTranslogLocation(translogLocation); indexingService.postCreateUnderLock(create);
versionMap.putUnderLock(index.uid().bytes(), new VersionValue(updatedVersion, translogLocation)); index.setTranslogLocation(translogLocation); indexingService.postIndexUnderLock(index);
index(index.docs(), indexWriter); versionMap.putUnderLock(index.uid().bytes(), new VersionValue(plan.versionForIndexing)); return new IndexResult(plan.versionForIndexing, plan.currentNotFoundOrDeleted); } catch (Exception ex) {
versionMap.putUnderLock(delete.uid().bytes(), new DeleteVersionValue(updatedVersion, engineConfig.getThreadPool() .estimatedTimeInMillis(), translogLocation)); delete.setTranslogLocation(translogLocation);