Closed fabien closed 9 years ago
How about submitting a PR? I use "apiVersion": "1.1"
when working with this module.
@fabien - I was re-reviewing this and I had a few questions:
What you did for the tests here:
{
elasticsearch: {
type: 'Customer' // could set override here
}
Can the same thing be accomplished within a model's JSON file by setting datasource-specific options?
You named it elasticsearch
by default in the testcase. This was because of the rule:
the value of this key must match the value of the corresponding
connector
property indatasources.json
Correct?
I haven't gotten to trial & error yet but would it be reasonable to assume that models could span separate indexes now? For example:
User = db.define('User', {
...
}, {
elasticsearch: {
index: red
}
});
Customer = db.define('Customer', {
...
}, {
elasticsearch: {
index: green
}
});
Perhaps it's because I'm running an older ES version (1.2.1), but it seems that without any proper pre-checks and handling (
indices.delete
andindices.existsType
), you're unable to run automigration in order to create a new index from scratch. @pulkitsinghal is this correct?Here's my current monkey-patched solution: