@resistdesign/voltra
    Preparing search index...

    Type Alias TypeInfoORMIndexingConfig

    Configuration for TypeInfoORM indexing integrations.

    type TypeInfoORMIndexingConfig = {
        fullText?: {
            backend: IndexBackend;
            defaultIndexFieldByType?: Record<string, string | string[]>;
        };
        limits?: ResolvedSearchLimits;
        observability?: {
            onListRoutingDecision?: (
                event: {
                    criteriaCount: number;
                    path: "fullText" | "structured" | "fullScanCompare";
                    reason:
                        | "fullTextPlan"
                        | "structuredEligible"
                        | "criteriaWithoutIndexedPath"
                        | "indexedPathFailedOrUnsupported";
                    typeName: string;
                },
            ) => void;
            onStructuredIndexWrite?: (
                event: {
                    action: "upsert" | "remove";
                    docId: string;
                    indexedFieldCount: number;
                    typeName: string;
                },
            ) => void;
        };
        relations?: {
            backend: RelationalBackend;
            decodeEntityId?: (typeName: string, entityId: string) => string;
            encodeEntityId?: (typeName: string, primaryFieldValue: string) => string;
            relationNameFor: (
                fromTypeName: string,
                fromTypeFieldName: string,
            ) => string;
        };
        structured?: {
            fieldMapByType?: Record<string, Record<string, string>>;
            indexedFieldsByType?: Record<string, string[]>;
            reader: StructuredSearchDependencies;
            tokenizer?: Partial<StructuredStringTokenizerConfig>;
            writer?: StructuredWriter;
        };
    }
    Index

    Properties

    fullText?: {
        backend: IndexBackend;
        defaultIndexFieldByType?: Record<string, string | string[]>;
    }

    Full text indexing configuration.

    Type Declaration

    • backend: IndexBackend

      Backend used for full text indexing.

    • OptionaldefaultIndexFieldByType?: Record<string, string | string[]>

      Default index field name(s) by type.

    Optional search limits for indexing queries.

    observability?: {
        onListRoutingDecision?: (
            event: {
                criteriaCount: number;
                path: "fullText" | "structured" | "fullScanCompare";
                reason:
                    | "fullTextPlan"
                    | "structuredEligible"
                    | "criteriaWithoutIndexedPath"
                    | "indexedPathFailedOrUnsupported";
                typeName: string;
            },
        ) => void;
        onStructuredIndexWrite?: (
            event: {
                action: "upsert" | "remove";
                docId: string;
                indexedFieldCount: number;
                typeName: string;
            },
        ) => void;
    }

    Optional observability hooks for indexing/routing diagnostics.

    Type Declaration

    • OptionalonListRoutingDecision?: (
          event: {
              criteriaCount: number;
              path: "fullText" | "structured" | "fullScanCompare";
              reason:
                  | "fullTextPlan"
                  | "structuredEligible"
                  | "criteriaWithoutIndexedPath"
                  | "indexedPathFailedOrUnsupported";
              typeName: string;
          },
      ) => void

      Called when list routing chooses a query execution path.

    • OptionalonStructuredIndexWrite?: (
          event: {
              action: "upsert" | "remove";
              docId: string;
              indexedFieldCount: number;
              typeName: string;
          },
      ) => void

      Called when structured indexing writes/removes document entries.

    relations?: {
        backend: RelationalBackend;
        decodeEntityId?: (typeName: string, entityId: string) => string;
        encodeEntityId?: (typeName: string, primaryFieldValue: string) => string;
        relationNameFor: (
            fromTypeName: string,
            fromTypeFieldName: string,
        ) => string;
    }

    Relationship indexing configuration.

    Type Declaration

    • backend: RelationalBackend

      Backend used for relationship indexing.

    • OptionaldecodeEntityId?: (typeName: string, entityId: string) => string

      Optional decoder for entity ids.

    • OptionalencodeEntityId?: (typeName: string, primaryFieldValue: string) => string

      Optional encoder for entity ids.

    • relationNameFor: (fromTypeName: string, fromTypeFieldName: string) => string

      Resolver for relation name from type/field.

    structured?: {
        fieldMapByType?: Record<string, Record<string, string>>;
        indexedFieldsByType?: Record<string, string[]>;
        reader: StructuredSearchDependencies;
        tokenizer?: Partial<StructuredStringTokenizerConfig>;
        writer?: StructuredWriter;
    }

    Structured indexing configuration.

    Type Declaration

    • OptionalfieldMapByType?: Record<string, Record<string, string>>

      Field name mapping per type.

    • OptionalindexedFieldsByType?: Record<string, string[]>

      Explicitly indexed field names by type. Fields not listed are excluded from structured indexing and structured query routing.

    • reader: StructuredSearchDependencies

      Reader used for structured queries.

    • Optionaltokenizer?: Partial<StructuredStringTokenizerConfig>

      Optional tokenizer overrides for structured string contains/LIKE behavior.

    • Optionalwriter?: StructuredWriter

      Optional writer for structured indexing.