Typesense vector store configuration.

interface TypesenseConfig {
    schemaName: string;
    typesenseClient: Client;
    columnNames?: {
        metadataColumnNames?: string[];
        pageContent?: string;
        vector?: string;
    };
    searchParams?: MultiSearchRequestSchema;
    import?<T>(data: T[], collectionName: string): Promise<void>;
}

Hierarchy (view full)

Properties

schemaName: string

Typesense schema name in which documents will be stored and searched.

typesenseClient: Client

Typesense client.

columnNames?: {
    metadataColumnNames?: string[];
    pageContent?: string;
    vector?: string;
}

Column names.

Type declaration

  • OptionalmetadataColumnNames?: string[]

    Metadata column names.

    []
    
  • OptionalpageContent?: string

    Page content column name.

    'text'
    
  • Optionalvector?: string

    Vector column name.

    'vec'
    
searchParams?: MultiSearchRequestSchema

Typesense search parameters.

{ q: '*', per_page: 5, query_by: '' }

Methods

  • Replace default import function. Default import function will update documents if there is a document with the same id.

    Type Parameters

    • T extends Record<string, unknown> = Record<string, unknown>

    Parameters

    • data: T[]
    • collectionName: string

    Returns Promise<void>