# Wrong function names documented for IndexResponse

**URL:** <https://discuss.elastic.co/t/wrong-function-names-documented-for-indexresponse/15289>\
**Category:** Elasticsearch\
**Created:** [January 17, 2014, 6:36am UTC](https://discuss.elastic.co/t/wrong-function-names-documented-for-indexresponse/15289 "2014-01-17T06:36:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Srivastava](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Abhishek\_Srivastava](https://discuss.elastic.co/u/Abhishek_Srivastava)\
**Post date:** [January 17, 2014, 6:36am UTC](https://discuss.elastic.co/t/wrong-function-names-documented-for-indexresponse/15289/1 "2014-01-17T06:36:42Z")

</div>

[http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index\_.html](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/16c87c0d-0b9e-4b9f-b6f0-271dfa533bf9%40googlegroups.com](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](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 17, 2014, 7:30am UTC](https://discuss.elastic.co/t/wrong-function-names-documented-for-indexresponse/15289/2 "2014-01-17T07:30:46Z")

</div>

Thanks! Could you open an issue or a pull request in elasticsearch repo?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 17 janv. 2014 à 07:36, Abhishek Srivastava [abhishek08aug@gmail.com](mailto:abhishek08aug@gmail.com) a écrit :

> [Elasticsearch Platform — Find real-time answers at scale | Elastic](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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/16c87c0d-0b9e-4b9f-b6f0-271dfa533bf9%40googlegroups.com](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](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CC6BF2DC-11F4-4BA4-ACE3-8DBFC5F0EA84%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/CC6BF2DC-11F4-4BA4-ACE3-8DBFC5F0EA84%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:56am UTC](https://discuss.elastic.co/t/wrong-function-names-documented-for-indexresponse/15289/3 "2017-07-06T01:56:15Z")

</div>


