exlasticsearch v1.2.0 ExlasticSearch.Repo View Source
API executor for elasticsearch. The generate pattern is to define a ExlasticSearch.Model
on an ecto model, then call any of these functions to manage the model.
To configure the url the repo points to, do:
config :exlasticsearch, ExlasticSearch.Repo,
url: "https://elasticsearch.url.io:9200"
Link to this section Summary
Functions
Generates an Elasticsearch bulk request. operations
should be of the form
Close an index for model
Creates an index as defined in model
Updates an index’s mappings to the current definition in model
Removes struct
from the index of its model
Removes the index defined in model
Checks if the index for model
exists
Gets an ES document by _id
Adds a struct into it’s associated index. The struct will be passed through the ExlasticSearch.Indexable
protocol prior to insertion
open an index for model
Refreshes model
’s index
Creates a call to search/3
by realizing query
(using Exlasticsearch.Query.realize/1
) and any provided search opts
Searches the index and type associated with model
according to query search
Updates the index for model
Link to this section Types
Link to this section Functions
Generates an Elasticsearch bulk request. operations
should be of the form:
[
{:index, struct},
{:delete, other_struct},
{:update, third_struct}
]
The function will handle formatting the bulk request properly and passing each
struct to the ExlasticSearch.Indexable
protocol
Close an index for model
Creates an index as defined in model
Updates an index’s mappings to the current definition in model
Removes struct
from the index of its model
Removes the index defined in model
Checks if the index for model
exists
Gets an ES document by _id
Adds a struct into it’s associated index. The struct will be passed through the ExlasticSearch.Indexable
protocol prior to insertion
open an index for model
paginate(any(), map() | Keyword.t()) :: Scrivener.Page.t()
Refreshes model
’s index
search(ExlasticSearch.Query.t(), list()) :: response()
Creates a call to search/3
by realizing query
(using Exlasticsearch.Query.realize/1
) and any provided search opts
Searches the index and type associated with model
according to query search
Updates the index for model