Bloodhound.Client

Summary

Functions

Constructs an ElasticSearch API URL. TODO add params

Deletes a document given a document type and ID

Formats documents in search results to look like the models they represent

Gets a document given it’s type and ID

Indexes a document by inferring that it’s ID is within it’s data map

Adds a document to the index given it’s type, ID, and a map with it’s data

Parses a response from the ElasticSearch API into a happy map %{:)}

Calls ElasticSearch’s Refresh API which: “…allows to explicitly refresh one or more indices, making all operations performed since the last refresh available for search”

Searches an index and optionally index types

Functions

build_url(type, id \\ nil)

Constructs an ElasticSearch API URL. TODO add params

delete(type \\ nil, id \\ nil)

Deletes a document given a document type and ID.

format_document(map)
format_hits(hits)

Formats documents in search results to look like the models they represent.

get(type, id)

Gets a document given it’s type and ID.

index(type, data)

Indexes a document by inferring that it’s ID is within it’s data map.

index(type, id, data)

Adds a document to the index given it’s type, ID, and a map with it’s data.

parse_response(arg)

Parses a response from the ElasticSearch API into a happy map %{:)}.

refresh(types \\ nil)

Calls ElasticSearch’s Refresh API which: “…allows to explicitly refresh one or more indices, making all operations performed since the last refresh available for search”.

search(types \\ nil, data \\ %{})

Searches an index and optionally index types.