Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (29 loc) · 1.21 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.21 KB

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