Member Junction
    Preparing search index...

    Interface MJContentSourceEntity_IContentSourceVectorMetadataConfig

    Controls which keys land in a content vector's metadata. Vector metadata is expensive in a vector database (storage + query performance). This mirrors the entity-vectorization pipeline's metadata-control structure (field strategy, per-field overrides, storage-type coercion, truncation, opt-out toggles), adapted to content-item vectors.

    Field values are read from the parent ContentItem. The identity keys (Entity + RecordID, plus ContentItemID / Sequence for chunk vectors) are managed as system keys — see FieldStrategy.

    interface MJContentSourceEntity_IContentSourceVectorMetadataConfig {
        DefaultTruncationLimit?: number;
        Fields?: Record<
            string,
            MJContentSourceEntity_IContentSourceVectorMetadataFieldConfig,
        >;
        FieldStrategy?: "all"
        | "include"
        | "exclude"
        | "explicit";
        IncludeEntityIcon?: boolean;
        IncludeTags?: boolean;
        IncludeText?: boolean;
        IncludeUpdatedAt?: boolean;
    }
    Index

    Properties

    DefaultTruncationLimit?: number

    Global default truncation limit (characters) for large string fields. Default 1000.

    Fields?: Record<
        string,
        MJContentSourceEntity_IContentSourceVectorMetadataFieldConfig,
    >

    Per-field overrides keyed by ContentItem field name (see MJContentSourceEntity_IContentSourceVectorMetadataFieldConfig).

    FieldStrategy?: "all" | "include" | "exclude" | "explicit"

    Which ContentItem fields go into metadata. Mirrors the entity pipeline's field strategy. When UNSET, the standard curated content set is used (the historical default): the identity keys + ContentSourceID / ContentSourceTypeID + Title / Description / URL + Tags. When set:

    • 'all': every eligible ContentItem field (non-PK, non-uniqueidentifier, non-binary, non-system) plus the toggle-driven keys below.
    • 'include': ONLY the ContentItem fields marked Included: true in Fields (explicit inclusion wins over the eligibility heuristics — a uniqueidentifier / PK / _mj* field can be included by name; only genuinely unstorable binary types are refused).
    • 'exclude': all eligible fields EXCEPT those marked Included: false in Fields.
    • 'explicit': EXACTLY the fields in Fields — no system keys except Entity (always kept so content search results stay correctly labeled), and the toggles flip to opt-in (default false). Keeps metadata minimal. NOTE: under 'explicit' a search hit's record id is recoverable only when VectorIDStrategy='recordId' (the default), where the vector's own id is the chunk id; with 'hash' the id would need to be kept explicitly.
    IncludeEntityIcon?: boolean

    Include the content entity's icon. Default true under a set strategy; opt-in under 'explicit'.

    IncludeTags?: boolean

    Include the item's Tags array. Default true (and under the curated default); opt-in under 'explicit'.

    IncludeText?: boolean

    When true, include the embedded text in metadata under the 'Text' key (which surfaces as the search snippet). Default false — external hydrators read the authoritative text from the ContentItem / ContentItemChunk row, so the copy is usually unnecessary storage. Honored under every strategy (including the curated default).

    IncludeUpdatedAt?: boolean

    Include __mj_UpdatedAt for recency sorting. Default true under a set strategy; opt-in under 'explicit'.