Skip to content

v4.0.0

Choose a tag to compare

@kfitzgerald kfitzgerald released this 30 May 17:50
· 8 commits to master since this release

Updated to use new elasticsearch js client!

Breaking Changes:

  • The ElasticSearch Client module is now a peer dependency. You must add this module yourself based on the version of ElasticSearch you are using.
  • Configuration structure and options have changed due to the new underlying client
  • Service constructor params (config, index) are now required, and do not have implicit app.config defaults.
  • All service methods now return a Promise, so they can be awaited. They no longer take callbacks.
  • All service methods take options where applicable. They are passed through to the underlying api request.
  • Ensure-index related functionality has been removed. You should handle this yourself. (e.g. if(!exists()) { create() }). You should probably be using index templates/aliases by now, so this functionality isn't worth maintaining.

New Functionality

  • The config argument of the ElasticService constructor can be an instance of the ElasticSearch Client. This is useful if you wish to create multiple ElasticService instance for various indices but do not want to duplicate connection clients.
  • All service methods that operate on an index use the ElasticService's configured index name and schema by default. They all can be overridden in their respective options arguments.