Closed JuergenSimon closed 4 years ago
Update: this function turned up when I did the following steps:
"connector": "es"
I used "connector": "esv7"
in the datasource configuration. "apiVersion":"7.0"
. I had to set this to "apiVersion":"_default"
to avoid an error message claiming this apiVersion was not supported. Now the application starts, but a lot of things are not working:
create
method for example persists in the index.ESConnector.prototype.addDefaults
, where I discovered some stub code doing this job commented out! Failed with error: [query_shard_exception] No mapping found for [_id] in order to sort on, with { index_uuid="Fccr_0hjQe-wTa9jk8sicg" & index="appics.customer" } { [query_shard_exception] No mapping found for [_id] in order to sort on, with { index_uuid="Fccr_0hjQe-wTa9jk8sicg" & index="appics.customer" } :: {"path":"/appics.customer/ESCustomer/_search","query":{"size":1,"from":0},"body":"{\"sort\":[\"_id\"],\"query\":{\"query_string\":{\"query\":\"id:42\"}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [_id] in order to sort on\",\"index_uuid\":\"Fccr_0hjQe-wTa9jk8sicg\",\"index\":\"appics.customer\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"appics.customer\",\"node\":\"2etbhi8zQzSyouSFsQGmrw\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"No mapping found for [_id] in order to sort on\",\"index_uuid\":\"Fccr_0hjQe-wTa9jk8sicg\",\"index\":\"appics.customer\"}}]},\"status\":400}"}
@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.
@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?
Hello,
I am using the
loopback-connector-esv7
and followed the instructions here: https://www.npmjs.com/package/loopback-connector-esv7In my code, I'm using the
destroyAll()
method on some entities. Unfortunately I am getting the following error message after switching toloopback-connector-esv7
:How do I fix this?