loopbackio / loopback-connector-elastic-search

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

Support Parent/Child relationships #24

Open mrfelton opened 9 years ago

mrfelton commented 9 years ago

We can define relationships in Loopback, but ElasticSearch has no knowledge of them. If data was indexed in ES with relationship information it would allow for better use of ElasticSearch's features, like finding parents by their children or finding children by their parents.

With https://github.com/strongloop-community/loopback-connector-elastic-search/issues/22 it's possible to define parent child relationships manually in datasources.json. However, this isn't enough as when you are creating data with parent relationships, the post to elasticsearch needs to be slightly different (you must specify the ID of the associated parent document)