esx v0.5.5 ESx.Model
Summary
Functions
Search document from the data store matching the given query
Functions
Search document from the data store matching the given query.
Options
:index
- document index name in es:type
- document type name in es
Example
# Search 'my document' from elasticsearch
query = MyESx.search %{query: %{match: %{title: "my document"}}}
# Featch docuemnt from elasticsarch
MyESx.results query
# Featch docuemnt from elasticsarch as Record struct which contains [Ecto.Schema.t] records.
MyESx.records query