rubber v0.7.0 Rubber.Search

The search APIs are used to query indices.

Elastic documentation

Link to this section Summary

Functions

Makes a request to the _search or the _msearch endpoint depending on the type of data

Link to this section Functions

Link to this function search(elastic_url, index, types, data)

Makes a request to the _search or the _msearch endpoint depending on the type of data.

When passing a map for data, it’ll make a simple search, but you can pass a list of header and body params to make a multi search.

Examples

iex> Rubber.Search.search("http://localhost:9200", "twitter", "tweet", %{query: %{term: %{user: "kimchy"}}})
{:ok, %HTTPoison.Response{...}}
Link to this function search(elastic_url, index, types, data, query_params, options \\ [])

Same as search/4 but allows to specify query params and options for HTTPoison.request/5.