public final void putModel( final Logger logger, final Marker logMarker, final ModelEntryT modelEntry) throws IoExceptionT { logger.debug(logMarker, "putting model {} to index {}", modelEntry.getId(), indexName); try { __prepareIndex(modelEntry).execute().actionGet(); } catch (final ElasticsearchException e) { throw exceptionFactory.newIoException( e, String.format( "error putting model %s (%s) to index %s", modelEntry.getId(), modelEntry.getModel().getClass().getCanonicalName(), indexName)); } }
private IndexRequestBuilder __prepareIndex(final ModelEntryT modelEntry) throws IoExceptionT { return __prepareIndex(modelEntry.getModel()).setId(modelEntry.getId().toString()); }