Skip to content

Extend index definition in Defined Schema #8764

Open
@mtrezza

Description

@mtrezza

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
    }
  }
}

Activity

parse-github-assistant

parse-github-assistant commented on Sep 25, 2023

@parse-github-assistant

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!
added
type:featureNew feature or improvement of existing feature
bounty:$50Bounty applies for fixing this issue (Parse Bounty Program)
on Sep 25, 2023
mtrezza

mtrezza commented on Sep 25, 2023

@mtrezza
MemberAuthor

cc @Moumouls maybe something you'd be interested in

Moumouls

Moumouls commented on Sep 25, 2023

@Moumouls
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

mtrezza commented on Sep 26, 2023

@mtrezza
MemberAuthor

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.

added
bounty:$100Bounty applies for fixing this issue (Parse Bounty Program)
and removed
bounty:$50Bounty applies for fixing this issue (Parse Bounty Program)
on Oct 29, 2023
mtrezza

mtrezza commented on Oct 29, 2023

@mtrezza
MemberAuthor

Increased the bounty, given that this needs more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$100Bounty applies for fixing this issue (Parse Bounty Program)type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mtrezza@Moumouls

        Issue actions

          Extend index definition in Defined Schema · Issue #8764 · parse-community/parse-server