private void applyUpdates(List<LuceneWork> workList, IndexingMonitor monitor, boolean streaming) throws InterruptedException, ExecutionException {
DatastoreService datastoreService = DatastoreServiceFactory.getDatastoreService();
ErrorContextBuilder errorContextBuilder = new ErrorContextBuilder();
errorContextBuilder.allWorkToBeDone(workList);
IndexWriter indexWriter = workspace.getIndexWriter(errorContextBuilder);
if (indexWriter == null) {
LOG.log(Level.SEVERE, "Cannot open index writer");
return;