loopbackio / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
79 stars 55 forks source link

Missing function destroyAll() ? #124

Closed JuergenSimon closed 4 years ago

JuergenSimon commented 5 years ago

Hello,

I am using the loopback-connector-esv7 and followed the instructions here: https://www.npmjs.com/package/loopback-connector-esv7

In my code, I'm using the destroyAll() method on some entities. Unfortunately I am getting the following error message after switching to loopback-connector-esv7:

(node:7797) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: destroyAll() must be implemented by the connector

How do I fix this?

JuergenSimon commented 5 years ago

Update: this function turned up when I did the following steps:

Now the application starts, but a lot of things are not working:

bharathkontham commented 4 years ago

@JuergenSimon connector-es is deprecated. I've updated loopback-connector-esv6 @2.0.0 plugin to support both Elastic versions 6 and 7. Same code is merged in master branch of this repository, please check updated README and examples/server/datasources.json file for sample.

destroyAll is working as expected in this version.

true-eye commented 3 years ago

@bharathkontham Right now, the doc says This connector will only connect to one index per datasource. My project has two indexes for mappings originally. How should I configure it?