index option to true in your field’s config:
Compound Indexes
In addition to indexing single fields, you can also create compound indexes that index multiple fields together. This can be useful for optimizing queries that filter or sort by multiple fields. To create a compound index, use theindexes option in your Collection Config:
indexes accepts:
Unique Fields
Settingunique: true on a field creates a collection-wide database unique index on that field’s path. This means no two documents in the collection can share the same value for that field.
Localized fields and MongoDB indexes
When you setindex: true or unique: true on a localized field, MongoDB creates one index per locale path (e.g., slug.en, slug.da-dk, etc.). With many locales and indexed fields, this can quickly approach MongoDB’s per-collection index limit.
If you know you’ll query specifically by a locale, you can insert a custom MongoDB index for the locale path manually or with a migration script.