Add a way to define compound indexes/indexes with partialFilterExpression/etc #1121
Replies: 5 comments 1 reply
-
This is a great feature request! I have thought about this before actually and was waiting for somebody to ask. I can definitly see us doing that and I like your suggestion on how to extend the config. If you are interested in contributing we would gladly accept a PR. We do all our indexes in We can give more direction too, let us know. |
Beta Was this translation helpful? Give feedback.
-
Was there ever any progress on this? @DanRibbens ? Facing a similar issue of moving from one CMS to another and finding a lack of compound index/uniqueness support in Payload CMS. |
Beta Was this translation helpful? Give feedback.
-
I am also waiting for the release of this feature in the CMS |
Beta Was this translation helpful? Give feedback.
-
+1 any plans on implementing this? |
Beta Was this translation helpful? Give feedback.
-
We're currently considering migration of a relatively huge (few millions of documents) database from Strapi to Payload.
The way Payload works with MongoDB seems to be more efficient (especially in case of relations and nested documents).
However there are some issues that may become critical.
One of issues that don't seem to be solvable without modifying Payload's source code is - there is no way to define a index with a
partialFilterExpression
, on which we rely in some cases.It would also be nice to be able to define compound indexes in code.
I suggest to extend collection/field configs to support like one in the following example:
Beta Was this translation helpful? Give feedback.
All reactions