drakerian / loopback-connector-elastic-search

Strongloop Loopback connector for Elasticsearch
MIT License
33 stars 86 forks source link

Error: The connector elasticsearch does not support replaceById operation. #14

Closed zegilooo closed 7 years ago

zegilooo commented 7 years ago

I had this

Unhandled error for request PUT /api/people/AV4unNqUHULS53fiLaW_: Error: The connector elasticsearch does not support replaceById operation. This is not a bug in LoopBack. Please contact the authors of the connector, preferably via GitHub issues.
    at Function.DataAccessObject.replaceById (/home/loopback/sample/node_modules/loopback-datasource-juggler/lib/dao.js:3016:11)
    at SharedMethod.invoke (/home/loopback/sample/node_modules/strong-remoting/lib/shared-method.js:270:25)
    at HttpContext.invoke (/home/loopback/sample/node_modules/strong-remoting/lib/http-context.js:297:12)
    at phaseInvoke (/home/loopback/sample/node_modules/strong-remoting/lib/remote-objects.js:677:9)
    at runHandler (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/lib/phase.js:135:5)
    at iterate (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:146:13)
    at Object.async.eachSeries (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:162:9)
    at runHandlers (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/lib/phase.js:144:13)
    at iterate (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:146:13)
    at /home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:157:25
    at /home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:154:25
    at execStack (/home/loopback/sample/node_modules/strong-remoting/lib/remote-objects.js:522:7)
    at RemoteObjects.execHooks (/home/loopback/sample/node_modules/strong-remoting/lib/remote-objects.js:526:10)
    at phaseBeforeInvoke (/home/loopback/sample/node_modules/strong-remoting/lib/remote-objects.js:673:10)
    at runHandler (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/lib/phase.js:135:5)
    at iterate (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:146:13)
    at /home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:157:25
    at reportSharedCtorError (/home/loopback/sample/node_modules/strong-remoting/lib/remote-objects.js:669:5)
    at runHandler (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/lib/phase.js:135:5)
    at iterate (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:146:13)
    at Object.async.eachSeries (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/node_modules/async/lib/async.js:162:9)
    at runHandlers (/home/loopback/sample/node_modules/strong-remoting/node_modules/loopback-phase/lib/phase.js:144:13)

with this

$ slc --version
strongloop v6.0.3 (node v8.4.0)
├── strong-arc@1.8.9 (3dd25ac)
├── strong-build@2.1.2 (a98f310)
├── strong-deploy@3.1.4 (9b29df0)
├── strong-mesh-models@8.1.1 (249315b)
├── strong-pm@5.2.4
├── strong-registry@1.1.6 (f8c2339)
├── strong-start@1.3.4 (28c261d)
├─┬ strong-supervisor@3.3.3
│ └── strong-agent@2.1.2 (4b9dde0)
├── generator-loopback@1.25.0 (6a0e2c0)
├── node-inspector@0.7.5 (16841d6)
└── nodefly-register@0.3.3

and this "loopback-connector-es": "^1.4.1",

pulkitsinghal commented 7 years ago

The connector elasticsearch does not support replaceById operation.

I currently don't have the bandwidth to implement this. Anyone else on the team who has the time and inclination, please chime in.

@zegilooo - would you be interested in developing this feature and submitting a PR with tests, by any chance?

zegilooo commented 7 years ago

@pulkitsinghal - I'm going to try. But I do not have much time at the moment, either. And we can do without it. Thanks to other methods that work very well ... If someone is faster than me, I will not be frustrated ;-)

pulkitsinghal commented 7 years ago

@zegilooo - I just realized that we are conversing about his issue on a possible inactive repo ... please file this issue on the active fork:

https://github.com/strongloop-community/loopback-connector-elastic-search

I also hope that you are using the latest published npm package that is published from that fork!

zegilooo commented 7 years ago

@pulkitsinghal this repo is still targeted by loopback v2 documentation : https://loopback.io/doc/en/lb2/Community-connectors.html

pulkitsinghal commented 7 years ago

It seems they updated it here: v3 docs but not here: v2 docs

Thanks for pointing it out, I have proposed an doc update here: https://github.com/strongloop/loopback.io/pull/446

Again this isn't an active repo, the last commit was on Oct 1, 2014 whereas the last commit for the active repo was on Jun 6, 2017

@drakerian is the awesome contributor who got everyone started down this road. Then someone else forked his project and made more contributions, same with me and eventually the strongloop folks reached out and offered to host a community version with ongoing work at: strongloop-community/loopback-connector-elastic-search

zegilooo commented 7 years ago

@pulkitsinghal Ok so I close this issue and I'll try to submit a patch to the active repo. Thank's for you help !