void processIndexCommand(IndexingCommand cmd) { IndexRequest request; try { request = buildEsIndexingRequest(cmd); } catch (BlobNotFoundException pe) { request = null; } catch (DocumentNotFoundException e) { request = null; } catch (IllegalStateException e) { log.error("Fail to create request for indexing command: " + cmd, e); return; } if (request == null) { log.info("Cancel indexing command because target document does not exists anymore: " + cmd); return; } if (log.isDebugEnabled()) { logDebugMessageTruncated(String.format("Index request: curl -XPUT 'http://localhost:9200/%s/%s/%s' -d '%s'", getWriteIndexForRepository(cmd.getRepositoryName()), DOC_TYPE, cmd.getTargetDocumentId(), request.toString()), MAX_CURL_LINE); } try { esa.getClient().index(request); } catch (ConcurrentUpdateException e) { SequenceTracer.addNote("Ignore indexing of doc " + cmd.getTargetDocumentId()); log.info("Ignore indexing of doc " + cmd.getTargetDocumentId() + " a more recent version has already been indexed: " + e.getMessage()); } }