http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index_.html
IndexResponse response = client.prepareIndex("twitter", "tweet")
.setSource(json)
.execute()
.actionGet();
IndexResponse object will give you report:
// Index name
String _index = response.index();
// Type name
String _type = response.type();
// Document ID (generated or not)
String _id = response.id();
// Version (if it's the first time you index this document, you will get: 1)
long _version = response.version();
index() -> getIndex()
type() -> getType()
id() -> getId()
version() -> getVersion()
Please make the correction.
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/16c87c0d-0b9e-4b9f-b6f0-271dfa533bf9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.