@couchbase/lite-js
    Preparing search index...

    Interface IndexConfig<D>

    Configuration for a single index on a Collection; used in CollectionConfig.

    interface IndexConfig<D extends CBLDictLike<D> = CBLDictionary> {
        on: SchemaProperty<D> | SchemaProperty<D>[];
        type?: IndexType;
        unique?: boolean;
    }

    Type Parameters

    • D extends CBLDictLike<D> = CBLDictionary

      An interface describing the schema of documents in this collection, i.e. the keys and their allowed value type(s).

    Index

    Properties

    Properties

    on: SchemaProperty<D> | SchemaProperty<D>[]

    The property or properties to index. These may be key-paths delimited by ".". If multiple properties are indexed, the first will be its primary key, the others secondary keys; a query may use any prefix of the keys.

    type?: IndexType

    The type of index, either 'value' (the default) or 'array'.

    unique?: boolean

    If true, every document must have a unique value for this property. Any violation will cause a ConstraintError to be thrown when saving the document.