ElasticsearchElixirBulkProcessor.Items.Create (Elasticsearch Elixir Bulk Processor v0.1.8)
Link to this section Summary
Functions
Examples
iex> %ElasticsearchElixirBulkProcessor.Items.Create{index: "test", source: %{"test" => "test"}} ...> |> ElasticsearchElixirBulkProcessor.Items.Create.to_payload() "{\"create\":{\"_index\":\"test\"}}\n{\"test\":\"test\"}"
Link to this section Functions
to_payload(item)
Examples
iex> %ElasticsearchElixirBulkProcessor.Items.Create{index: "test", source: %{"test" => "test"}} ...> |> ElasticsearchElixirBulkProcessor.Items.Create.to_payload() "{\"create\":{\"_index\":\"test\"}}\n{\"test\":\"test\"}"
iex> %ElasticsearchElixirBulkProcessor.Items.Create{index: "test", id: "1", source: %{"test" => "test"}} ...> |> ElasticsearchElixirBulkProcessor.Items.Create.to_payload() "{\"create\":{\"_index\":\"test\",\"_id\":\"1\"}}\n{\"test\":\"test\"}"
iex> %ElasticsearchElixirBulkProcessor.Items.Create{index: "test", id: "1", source: %{"test" => "test ...>with a new line"}} ...> |> ElasticsearchElixirBulkProcessor.Items.Create.to_payload() "{\"create\":{\"_index\":\"test\",\"_id\":\"1\"}}\n{\"test\":\"test\nwith a new line\"}"