FieldIndexInput
Defined in: packages/core/src/fields/baseTypes.ts:434
A field-level index in object form. The index covers this field first, then
additionalFields in order:
author: relationship({ collection: users, index: { name: "by_author_status", additionalFields: ["status"] } })// .index("by_author_status", ["author", "status"])A field-level index wins over a collection-level indexes entry of the same
name, as every field setting wins over its collection’s.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends VexResourceSlug = VexResourceSlug
The owning collection, which types additionalFields.
TFieldKey
Section titled “TFieldKey”TFieldKey extends string = never
This field’s own key, which additionalFields may not repeat.
Properties
Section titled “Properties”additionalFields?
Section titled “additionalFields?”
optionaladditionalFields?: readonlyExclude<FieldKeyOfResource<TCollectionSlug>,TFieldKey>[]
Defined in: packages/core/src/fields/baseTypes.ts:441
Fields after this one, in index order. Omit for a single-field index.
draftStatus?
Section titled “draftStatus?”
optionaldraftStatus?:true|"both"
Defined in: packages/core/src/fields/baseTypes.ts:448
Also narrow this index on vex_status for draft/publish status composition.
Requires the collection’s versions.drafts: true; defineCollection throws
otherwise. Same true (replaces the index) / "both" (adds a
vex_status-prefixed twin) contract as CollectionConfigInput.indexes[].draftStatus.
name:
string
Defined in: packages/core/src/fields/baseTypes.ts:439
The Convex index name.