olivere/elastic — pull request #3 by shalinkktl (2014-09-09 09:22:56+00:00)
Title: For raising POST request when id is missing while index creation.

Adding

if b.id == "" {
reqType = "POST"
}else{
reqType = "PUT"
}
req, err := b.client.NewRequest(reqType, urls)

as 97th line of index.go will enable elastic to force ES to create id when id is missing.