Documentation
    Preparing search index...

    Manages a persistent issues.json file tracking processing failures per document key (file path or source reference).

    Hierarchy

    Index
    cache:
        | Partial<
            Record<
                string,
                {
                    details?: unknown;
                    message: string;
                    operation?: string;
                    property?: string;
                    rule?: string;
                    rules?: string[];
                    timestamp: string
                    | number;
                    type:
                        | "type_collision"
                        | "interpolation_error"
                        | "extraction_error"
                        | "embedding_error"
                        | "upsert_error"
                        | "match_failed"
                        | "rule_missing"
                        | "no_content"
                        | "source_unavailable"
                        | "unsupported_content_type";
                    types?: string[];
                }[],
            >,
        >
        | null = null

    In-memory cache of the parsed file contents, or null if not yet loaded.

    filePath: string

    Path to the JSON file on disk.

    logger: Logger

    Logger instance for warnings and diagnostics.

    • Get the current issues of one document key, if any.

      Parameters

      • key: string

      Returns
          | {
              details?: unknown;
              message: string;
              operation?: string;
              property?: string;
              rule?: string;
              rules?: string[];
              timestamp: string
              | number;
              type:
                  | "type_collision"
                  | "interpolation_error"
                  | "extraction_error"
                  | "embedding_error"
                  | "upsert_error"
                  | "match_failed"
                  | "rule_missing"
                  | "no_content"
                  | "source_unavailable"
                  | "unsupported_content_type";
              types?: string[];
          }[]
          | undefined

      • {
            details?: unknown;
            message: string;
            operation?: string;
            property?: string;
            rule?: string;
            rules?: string[];
            timestamp: string | number;
            type:
                | "type_collision"
                | "interpolation_error"
                | "extraction_error"
                | "embedding_error"
                | "upsert_error"
                | "match_failed"
                | "rule_missing"
                | "no_content"
                | "source_unavailable"
                | "unsupported_content_type";
            types?: string[];
        }[]
        • Optionaldetails?: unknown

          Optional structured details (e.g. the AJV errors of match_failed); JSON.

        • message: string

          Error message describing the failure.

        • Optionaloperation?: string

          Operation that failed (e.g. Failed to process file).

        • Optionalproperty?: string

          Property name where the issue occurred.

        • Optionalrule?: string

          Rule name for single-rule issues; for a source document, its designated rule (so an issues reindex can retry a document that has no points).

        • Optionalrules?: string[]

          Name(s) of the rule(s) involved in the issue.

        • timestamp: string | number

          Unix timestamp (seconds) or ISO string of the last occurrence.

        • type:
              | "type_collision"
              | "interpolation_error"
              | "extraction_error"
              | "embedding_error"
              | "upsert_error"
              | "match_failed"
              | "rule_missing"
              | "no_content"
              | "source_unavailable"
              | "unsupported_content_type"

          Canonical issue code.

        • Optionaltypes?: string[]

          Declared types for type collision issues.

      • undefined
    • Record an issue for a document key (file path or source reference).

      Parameters

      • key: string

        Document key (file path or source reference).

      • type:
            | "type_collision"
            | "interpolation_error"
            | "extraction_error"
            | "embedding_error"
            | "upsert_error"
            | "match_failed"
            | "rule_missing"
            | "no_content"
            | "source_unavailable"
            | "unsupported_content_type"

        Canonical issue code.

      • message: string

        Error message.

      • Optionaloptions: Pick<
            {
                details?: unknown;
                message: string;
                operation?: string;
                property?: string;
                rule?: string;
                rules?: string[];
                timestamp: string
                | number;
                type:
                    | "type_collision"
                    | "interpolation_error"
                    | "extraction_error"
                    | "embedding_error"
                    | "upsert_error"
                    | "match_failed"
                    | "rule_missing"
                    | "no_content"
                    | "source_unavailable"
                    | "unsupported_content_type";
                types?: string[];
            },
            "types"
            | "details"
            | "rules"
            | "operation"
            | "property"
            | "rule",
        >

        Optional operation, property, rule(s), types and structured details (stored as JSON, e.g. AJV errors).

      Returns void