SongGuess
    Preparing search index...
    type AiSearchConfig = {
        ai_gateway_id?: string;
        ai_search_model?: string;
        cache?: boolean;
        cache_threshold?:
            | "super_strict_match"
            | "close_enough"
            | "flexible_friend"
            | "anything_goes";
        chunk?: boolean;
        chunk_overlap?: number;
        chunk_size?: number;
        custom_metadata?: {
            data_type: "text"
            | "number"
            | "boolean"
            | "datetime";
            field_name: string;
        }[];
        embedding_model?: string;
        fusion_method?: "max"
        | "rrf";
        hybrid_search_enabled?: boolean;
        id: string;
        index_method?: { keyword?: boolean; vector?: boolean };
        indexing_options?: { keyword_tokenizer?: "porter" | "trigram" } | null;
        max_num_results?: number;
        metadata?: Record<string, unknown>;
        namespace?: string;
        reranking?: boolean;
        reranking_model?: string;
        retrieval_options?:
            | {
                boost_by?: {
                    direction?: "asc"
                    | "desc"
                    | "exists"
                    | "not_exists";
                    field: string;
                }[];
                keyword_match_mode?: "and"
                | "or";
            }
            | null;
        rewrite_model?: string;
        rewrite_query?: boolean;
        score_threshold?: number;
        source?: string;
        source_params?: unknown;
        sync_interval?: 3600
        | 7200
        | 14400
        | 21600
        | 43200
        | 86400;
        token_id?: string;
        type?: "r2" | "web-crawler" | string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index

    Properties

    ai_gateway_id?: string
    ai_search_model?: string
    cache?: boolean
    cache_threshold?:
        | "super_strict_match"
        | "close_enough"
        | "flexible_friend"
        | "anything_goes"

    Similarity threshold for cache hits. Stricter = fewer cache hits but higher relevance.

    chunk?: boolean
    chunk_overlap?: number
    chunk_size?: number
    custom_metadata?: {
        data_type: "text" | "number" | "boolean" | "datetime";
        field_name: string;
    }[]
    embedding_model?: string
    fusion_method?: "max" | "rrf"

    Fusion method for combining vector and keyword results. "rrf" = reciprocal rank fusion (default), "max" = maximum score.

    hybrid_search_enabled?: boolean

    Use index_method instead.

    id: string

    Instance ID (1-32 chars, pattern: ^[a-z0-9_]+(?:-[a-z0-9_]+)*$)

    index_method?: { keyword?: boolean; vector?: boolean }

    Controls which storage backends are used during indexing. Defaults to vector-only.

    indexing_options?: { keyword_tokenizer?: "porter" | "trigram" } | null
    max_num_results?: number
    metadata?: Record<string, unknown>
    namespace?: string
    reranking?: boolean

    Enable reranking (default false)

    reranking_model?: string
    retrieval_options?:
        | {
            boost_by?: {
                direction?: "asc"
                | "desc"
                | "exists"
                | "not_exists";
                field: string;
            }[];
            keyword_match_mode?: "and"
            | "or";
        }
        | null
    rewrite_model?: string
    rewrite_query?: boolean

    Enable query rewriting (default false)

    score_threshold?: number

    Minimum similarity score (0-1) for a result to be included.

    source?: string

    Source URL (required for web-crawler type).

    source_params?: unknown
    sync_interval?: 3600 | 7200 | 14400 | 21600 | 43200 | 86400

    Sync interval in seconds. 3600=1h, 7200=2h, 14400=4h, 21600=6h, 43200=12h, 86400=24h.

    token_id?: string

    Token ID (UUID format)

    type?: "r2" | "web-crawler" | string

    Instance type. Omit to create with built-in storage.