Bulk and IndexRequest constructor

Heya,

I'm looking at ES source code and here is what I can read in IndexRequest.java
class:

/**

  • Constructs a new index request against the specific index. The {@link
    #type(String)},
  • {@link #id(String)} and {@link #source(byte[])} must be set.
    */
    public IndexRequest(String index) {
    this.index = index;
    }

Is the Javadoc correct? I'm almost sure that id is not mandatory and will be
generated by Elasticsearch.

Can someone confirm that?

Thanks
David.

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Hi David,

I have tested it via rest interface, and ES generates id if it is not
provided.

KR,
Ferhat

http://searchbox.io
ferhat@searchbox.io

On Monday, September 24, 2012 7:13:28 PM UTC+3, David Pilato wrote:

Heya,

I'm looking at ES source code and here is what I can read
in IndexRequest.java class:

/**

  • Constructs a new index request against the specific index. The {@link
    #type(String)},
  • {@link #id(String)} and {@link #source(byte)} must be set.
    */
    public IndexRequest(String index) {
    this.index = index;
    }

Is the Javadoc correct? I'm almost sure that id is not mandatory and will
be generated by Elasticsearch.

Can someone confirm that?
Thanks
David.

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Hi David,

I have tested it via rest interface, and ES generates id if it is not
provided.

KR,
Ferhat

http://searchbox.io

On Monday, September 24, 2012 7:13:28 PM UTC+3, David Pilato wrote:

Heya,

I'm looking at ES source code and here is what I can read
in IndexRequest.java class:

/**

  • Constructs a new index request against the specific index. The {@link
    #type(String)},
  • {@link #id(String)} and {@link #source(byte)} must be set.
    */
    public IndexRequest(String index) {
    this.index = index;
    }

Is the Javadoc correct? I'm almost sure that id is not mandatory and will
be generated by Elasticsearch.

Can someone confirm that?
Thanks
David.

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

Thanks Ferhat.

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

Le 25 sept. 2012 à 10:00, ferhatsb ferhat.sobay@gmail.com a écrit :

Hi David,

I have tested it via rest interface, and ES generates id if it is not provided.

KR,
Ferhat

http://searchbox.io
ferhat@searchbox.io

On Monday, September 24, 2012 7:13:28 PM UTC+3, David Pilato wrote:
Heya,

I'm looking at ES source code and here is what I can read in IndexRequest.java class:
/**

  • Constructs a new index request against the specific index. The {@link #type(String)},
  • {@link #id(String)} and {@link #source(byte)} must be set.
    */
    public IndexRequest(String index) {
    this.index = index;
    }

Is the Javadoc correct? I'm almost sure that id is not mandatory and will be generated by Elasticsearch.

Can someone confirm that?

Thanks
David.

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

I sent a pull request to be able to do it in Java:
Add constructor IndexRequest(String index, String type) and fix javadoc by dadoonet · Pull Request #2287 · elastic/elasticsearch · GitHub
https://github.com/elasticsearch/elasticsearch/pull/2287

Le 25 septembre 2012 à 10:18, David Pilato david@pilato.fr a écrit :

Thanks Ferhat.

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

Le 25 sept. 2012 à 10:00, ferhatsb < ferhat.sobay@gmail.com
mailto:ferhat.sobay@gmail.com > a écrit :

 > >      Hi David,
 I have tested it via rest interface, and ES generates id if it is not

provided.

 KR,
 Ferhat

 http://searchbox.io <http://searchbox.io>
 ferhat@searchbox.io <mailto:ferhat@searchbox.io>

 On Monday, September 24, 2012 7:13:28 PM UTC+3, David Pilato wrote:
   > > >        Heya,
   I'm looking at ES source code and here is what I can read in

IndexRequest.java class:

   /**
   * Constructs a new index request against the specific index. The

{@link #type(String)},
* {@link #id(String)} and {@link #source(byte)} must be set.
*/
public IndexRequest(String index) {
this.index = index;
}

   Is the Javadoc correct? I'm almost sure that id is not mandatory

and will be generated by Elasticsearch.

   Can someone confirm that?

   Thanks
   David.

   --
   David Pilato
   http://www.scrutmydocs.org/ <http://www.scrutmydocs.org/>
   http://dev.david.pilato.fr/ <http://dev.david.pilato.fr/>
   Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
 > > 
 --

--

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--