Elastic v2.6.1 Elastic.Bulk

Used to make requests to ElasticSearch’s bulk API.

Both create and update take a list of tuples

The order of elements in each tuple is this:

  • Index
  • Type
  • ID
  • Data

Here’s how to use create:

  Elastic.Bulk.create(
    [
      {Elastic.Index.name("answer"), "answer", "id-goes-here", %{text: "This is an answer"}}
    ]
  )

It’s worth noting here that you can choose to pass nil as the ID in these create requests; ElasticSearch will automatically generate an ID for you.

Summary

Functions

Makes bulk create requests to ElasticSearch

Makes bulk update requests to ElasticSearch

Functions

create(documents)

Makes bulk create requests to ElasticSearch.

For more information see documentation on Elastic.Bulk.

update(documents)

Makes bulk update requests to ElasticSearch.

For more information see documentation on Elastic.Bulk.