Interface DocumentMetadata

Arbitrary key-value metadata attached to a loaded document. Well-known fields are typed explicitly; any additional fields are allowed.

interface DocumentMetadata {
    title?: string;
    author?: string;
    pageCount?: number;
    wordCount?: number;
    language?: string;
    createdAt?: string;
    modifiedAt?: string;
    source?: string;
    [key: string]: unknown;
}

Indexable

[key: string]: unknown

Any additional metadata fields from the source document.

Properties

title?: string

Document title extracted from front-matter or PDF info dict.

author?: string

Primary author of the document.

pageCount?: number

Number of pages (PDF/DOCX).

wordCount?: number

Approximate word count of the full document text.

language?: string

ISO 639-1 language code detected in the document.

Example

'en' | 'de' | 'fr'
createdAt?: string

ISO 8601 creation timestamp.

modifiedAt?: string

ISO 8601 last-modified timestamp.

source?: string

Original file path or URL the document was loaded from.