loopbackio / loopback-connector-elastic-search

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

Feature/refresh true hotfix #86

Closed wolfgang-s closed 7 years ago

wolfgang-s commented 7 years ago

Sorry, maybe my last change was too fast.

Of course, certain operations should never have a refresh attribute.

And anyways, refresh: false is default, so no need for setting it.

Added tests just to make sure.

wolfgang-s commented 7 years ago

@aquid Please get this in, it's really important, otherwise the mappings cannot be created!

I have no idea what these checks are about?

aquid commented 7 years ago

@wolfgang-s Will look into it asap and let you know. You don't have to worry about the test as those are done by strongloop people and I don't have access to change those, but as far as our own test are passing we can do the merge.

aquid commented 7 years ago

@wolfgang-s

otherwise the mappings cannot be created!

Dumb question, how come mappings are not created with refresh false?

wolfgang-s commented 7 years ago

@aquid My last change was setting refresh: false as DEFAULT. Problem is, not every ES call supports the refresh attribute, so ANY call to any ES endpoint not supporting the refresh parameter will fail which is using the "addDefaults" function.

So the call to "removeMappings" will fail, and then no mappings are created after that.

Really sorry for that.

aquid commented 7 years ago

@wolfgang-s Released 1.3.5 with your PR updates.