Open
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
In Defined Schema, only simple compound indexes can be defined, the following index options cannot be defined:
Feature / Enhancement Description
Add support for the above mentioned index options. These options do not have to be added explicitly, instead a general field ofr index options should be added to the index definition.
Example Use Case
To avoid a breaking change, index options could be added by using an array instead of an object:
indexes: {
index_without_option: {
location: "2dsphere"
},
index_with_option: [{
location: "2dsphere"
}, {
sparse: true
}]
}
Alternatively for type consistency with breaking change:
indexes: {
index_without_option: {
fields: {
location: "2dsphere"
}
},
index_with_option: {
fields: {
location: "2dsphere"
},
options: {
sparse: true
}
}
}