https://github.com/marcelog/erlastica
Erlang library to use ElasticSearch
https://github.com/marcelog/erlastica
Last synced: 8 months ago
JSON representation
Erlang library to use ElasticSearch
- Host: GitHub
- URL: https://github.com/marcelog/erlastica
- Owner: marcelog
- Created: 2014-06-12T12:31:18.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-17T19:32:23.000Z (over 11 years ago)
- Last Synced: 2025-01-03T10:28:47.511Z (over 1 year ago)
- Language: Erlang
- Size: 508 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
erlastica
=========
Erlang library to use ElasticSearch. This is a work in progress.
How to use it
=============
* Start the main supervisor [erlastica_sup](https://github.com/marcelog/erlastica/blob/master/src/erlastica_sup.erl) from your own supervisor
tree. Or application:start(erlastica).
* Configure the application, here's a sample:
```
{erlastica, [
{ibrowse_options, []},
{indices, [
{index_1, [ % Index name, will map to a given ES name and host/port.
{index, "index"}, % ElasticSearch index name
{host, elastic_1} % Host mapping
]}
]},
{hosts, [
{elastic_1, [
{host, "127.0.0.1"},
{port, 9200}
]}
]}
]}
```
In this example we are setting up a fantasy name for an index (index_1) that will
map to a specific ElasticSearch index name and host.
The main entry point for the librar is the module [erlastica](https://github.com/marcelog/erlastica/blob/master/src/erlastica.erl).