feathersjs-ecosystem / feathers-elasticsearch

Feathersjs adapter for Elasticsearch
MIT License
78 stars 24 forks source link

`id` field in config is not used when calling `service.get` without query #115

Open markhaehnel opened 2 years ago

markhaehnel commented 2 years ago

Steps to reproduce

Gist: https://gist.github.com/markhaehnel/14743028736aa72191a658441aaac171

Expected behavior

Using the gist as an example. Calling await app.service('elastic').get("/hello/1") should return the document where the value of the key route is /hello/1.

Actual behavior

Document is not found. (It's querying /hello/1 against the _id key)

We think the issue has its origin in /lib/utils/parse-query.js:188.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): 4.0.1-0

NodeJS version: v16.14.0

Operating System: macOS 12.2.1

Browser Version: -

React Native Version: -

Module Loader: require?