elasticsearch/elasticsearch — pull request #2287 by dadoonet (2012-09-25 11:30:44+00:00)
Title: Add constructor IndexRequest(String index, String type) and fix javadoc

When using Bulk insertion, we need to add IndexRequest to the bulk.
But, constructors does not allow not to provide the id.

```java
IndexRequest irq = new IndexRequest("index", "type", "id");
```

But, ad we can do it for prepareIndex(), it could be nice to have a constructor without the id:
```java
// PrepareIndex
client.prepareIndex("index", "type").setSource("{}")
.execute().actionGet();

// Bulk
client.prepareBulk()
.add(new IndexRequest("index", "type").source("{}"))
.execute().actionGet();
```

Prior to this pull request, if we don't want to set the ID and let Elasticsearch generate it, we have to use this form:

```java
new IndexRequest().index("index").type("type");
new IndexRequest("index").type("type");
```

BTW, I fixed the javadoc documentation for `IndexRequest(String index)` as ID is not mandatory.