View Source ElasticsearchEx.Streamer (Elasticsearch_ex v1.6.0)

Provides an utility to generate an Elixir Stream from an Elasticsearch search.

Summary

Functions

Runs an Elasticsearch by returning a Stream which is perfect for browsing large volume of data.

Types

Functions

Link to this function

stream(query)

View Source (since 1.5.0)
@spec stream(query()) :: Enumerable.t()
Link to this function

stream(query, index_or_opts)

View Source (since 1.5.0)
@spec stream(query(), index()) :: Enumerable.t()
@spec stream(query(), opts()) :: Enumerable.t()
Link to this function

stream(query, index, opts)

View Source (since 1.3.0)
@spec stream(query(), nil | index(), opts()) :: Enumerable.t()

Runs an Elasticsearch by returning a Stream which is perfect for browsing large volume of data.

Examples

iex> ElasticsearchEx.Stream.stream(
...>   %{query: %{match_all: %{}}, sort: [%{message: :desc}], size: 500},
...>   :my_index,
...>   keep_alive: "30s"
...> )
#Function<52.124013645/2 in Stream.resource/3>