ember-elasticsearch

The default blueprint for ember-cli addons.

Usage no npm install needed!

<script type="module">
  import emberElasticsearch from 'https://cdn.skypack.dev/ember-elasticsearch';
</script>

README

Build Status npm version Ember Observer Score PRs Welcome FastBoot Ready

ember-elasticsearch

This addon provides a FastBoot compatible wrapper around the elasticsearch package.

Installation

  • ember install ember-elasticsearch
  • configure your elasticsearch host in config/environment.js:
...
elasticsearch: {
    host: 'YOUR_HOST_HERE'
}
...

Usage

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;
  });
}