This addon provides a FastBoot compatible wrapper around the elasticsearch package.
ember install ember-elasticsearch
- configure your elasticsearch host in
config/environment.js
:
...
elasticsearch: {
host: 'YOUR_HOST_HERE'
}
...
You can now inject the elasticsearch
service in your routes and use the search client like so:
elasticsearch: injectService(),
model() {
return get(this, 'elasticsearch.client').search({
q: 'foo'
}).then((data) => {
return data.hits.hits;
});
}