Open pulkitsinghal opened 9 years ago
cc @anana54, @rabee3 and @zelphir - this issue may be of interest to you when its finished
thanks @pulkitsinghal, will be checking it.
I'm thinking that this also ties into the finishing #24 first ... should I make the include filter smart enough to look at the mappings and then form queries differently to support both nested
and parent/child
approach?
Should I do the work in increments so that until posts for children #24 (in parent/child) aren't done ... only nested mappings are supported for includes.
Honestly I am not a fan of nested
and like the parent/child
approach more but someone who scales differently in production might disagree. So I would like to write the best generic implementation possible. Will have to give this some more thought.
@pulkitsinghal Please close this issue if you think the latest release serves our purpose. I know you want a better solution for include rather than using loopback's fallback way. Please refer to the commit above and do the needful.
@aquid - How does the include
implementation handle or behave in extremely large datasets? Can you or Bhushan share some numbers? If not that then maybe at least a high level prediction and reasoning if it will do well or poorly when 1k or 10k or 100k or 1m results are processed as part of a matching include
query?
Notes to learn from mongodb's implementation:
In the meantime a workaround is to use the
native
filter instead ofinclude
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.