@Override public void update(SearchDocument doc) throws IOException { ElasticsearchDocument esDoc = (ElasticsearchDocument)doc; bulkRequest.add(client.prepareUpdate(esDoc.getIndex(), esDoc.getType(), esDoc.getId()).setVersion( esDoc.getVersion()).setDoc(esDoc.getSource())); }
if (options.isRefresh() != null) builder.setRefresh(options.isRefresh()); if (options.getConsistencyLevel() != null) builder.setConsistencyLevel(options.getConsistencyLevel()); if (options.getVersion() != null) builder.setVersion(options.getVersion()); if (options.getVersionType() != null) builder.setVersionType(options.getVersionType()); if (options.getTimeout() != null) builder.setTimeout(options.getTimeout());
@Override protected void updateDocument(SearchDocument doc) throws IOException { ElasticsearchDocument esDoc = (ElasticsearchDocument)doc; doUpdateRequest(client.prepareUpdate(esDoc.getIndex(), esDoc.getType(), esDoc.getId()).setVersion( esDoc.getVersion()).setDoc(esDoc.getSource())); }