Skip to content
Oliver Eilhard edited this page Feb 13, 2018 · 2 revisions

The Flush service allows to flush one or more indices. The flush process of an index basically frees memory from the index by flushing data to the index storage and clearing the internal transaction log.

// Flush to make sure the documents got written.
ctx := context.Background()
_, err = client.Flush().Index("twitter").Do(ctx)
if err != nil {
    panic(err)
}