Skip to content
Johan van der Geest edited this page Feb 2, 2016 · 4 revisions

The Delete service removes a document from an index.

// Delete tweet with specified ID
res, err := client.Delete().
    Index("twitter").
    Type("tweet").
    Id("1").
    Do()
if err != nil {
    // Handle error
    panic(err)
}
if res.Found {
    fmt.Print("Document deleted from from index\n")
}
Clone this wiki locally