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
}
}
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
parse-github-assistant commentedon Sep 25, 2023
Thanks for opening this issue!
mtrezza commentedon Sep 25, 2023
cc @Moumouls maybe something you'd be interested in
Moumouls commentedon Sep 25, 2023
Yes @mtrezza, actually it was not implemented in defined schema because it's also not supported by the Parse.Schema. Defined schema rely on Parse.Schema, so i would say that's not really a defined schema issue, but a capability issue of the index endpoint (maybe rest or sdk)
mtrezza commentedon Sep 26, 2023
Got it; Parse Server internally is capable of setting TTL and unique indexes, so I guess the Parse Server API just needs to be extended. I'll leave this issue open to add the feature to Defined Schema once it's added to Parse Schema.
mtrezza commentedon Oct 29, 2023
Increased the bounty, given that this needs more work.