Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend index definition in Defined Schema #8764

Open
3 tasks done
mtrezza opened this issue Sep 25, 2023 · 5 comments
Open
3 tasks done

Extend index definition in Defined Schema #8764

mtrezza opened this issue Sep 25, 2023 · 5 comments
Labels
bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented Sep 25, 2023

New Feature / Enhancement Checklist

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
    }
  }
}
@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 25, 2023

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added type:feature New feature or improvement of existing feature bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) labels Sep 25, 2023
@mtrezza
Copy link
Member Author

mtrezza commented Sep 25, 2023

cc @Moumouls maybe something you'd be interested in

@Moumouls
Copy link
Member

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
Copy link
Member Author

mtrezza commented 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 mtrezza added bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) and removed bounty:$50 Bounty applies for fixing this issue (Parse Bounty Program) labels Oct 29, 2023
@mtrezza
Copy link
Member Author

mtrezza commented Oct 29, 2023

Increased the bounty, given that this needs more work.

@parse-community parse-community deleted a comment from badboy-tian Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants