loopback-connector-elastic-search
loopback-connector-elastic-search copied to clipboard
Add the `include` filter
Notes to learn from mongodb's implementation:
- https://github.com/strongloop/loopback-connector-mongodb/blob/367bc033a546130b9f834d17a9d4f769aaefef92/lib/mongodb.js#L730
- https://github.com/strongloop/loopback-connector-mongodb/blob/2a90951c482508bdc06d04e5a5b87e8e54f1ae6f/test/imported.test.js#L9
- loopback-datasource-juggler/test/include.test.js
- https://github.com/strongloop/loopback-datasource-juggler/blob/master/test/include.test.js
In the meantime a workaround is to use the native
filter instead of include
to write the query using ES's DSL instead of loopback. Ofcourse you need to have already setup parent-child mappings in the datasource correctly no matter what.