A lightweight Meilisearch client for Elixir.
Note: This is a work in progress and has not been published to hex.pm. You probably shouldn't use it for production at this point.
If available in Hex, the package can be installed
by adding meilisearch
to your list of dependencies in mix.exs
:
def deps do
[
{:meilisearch, "~> 0.1.0"}
]
end
# Create Index
Meilisearch.Index.create("index_name")
# Create Index and set primary key
Meilisearch.Index.create("index_name", primary_key: "key_name")
- Index
- Health
- Stats
- Version
- Documents
- Search
- Updates
- Keys
- Settings
- System Information
Setting endpoint and API key used by the library:
config :meilisearch,
endpoint: "http://127.0.0.1:7700",
api_key: "test_api_key"
You will need Meilisearch running locally for development and testing. You can do this via Docker:
$ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=test_api_key
meilisearch-elixir is released under the MIT license. Please refer to LICENSE for details.