loopbackio / loopback-connector-elastic-search

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

Unable to define _id_, _parent_ or other top level mapping attributes #22

Closed mrfelton closed 9 years ago

mrfelton commented 9 years ago

The only thing that gets passed through to ES is properties and it's currently impossible to define _id_, _parent_ or other top level mapping attributes.

pulkitsinghal commented 9 years ago

Just to be sure that I found the right references:

  1. version 0.90
  2. version 1.6

These are what you're referring to correct?

mrfelton commented 9 years ago

Hi @pulkitsinghal Yes, those are the specific ones that I was referring to. However, I think it should really be made possible to set all mapping values through the datasources schema file rather than limiting it to specific ones.

I've been playing around with this, which seems to do the job in my limited testing: https://gist.github.com/mrfelton/c28f6c54735628b20f81

pulkitsinghal commented 9 years ago

If you've got the spare time to contribute, I would gladly accept a PR! Let me know.