Typesense vector store configuration.

Hierarchy

  • AsyncCallerParams
    • TypesenseConfig

Properties

schemaName: string

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

typesenseClient: default

Typesense client.

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

Column names.

Type declaration

  • Optional metadataColumnNames?: string[]

    Metadata column names.

    Default

    []
    
  • Optional pageContent?: string

    Page content column name.

    Default

    'text'
    
  • Optional vector?: string

    Vector column name.

    Default

    'vec'
    
maxConcurrency?: number

The maximum number of concurrent calls that can be made. Defaults to Infinity, which means no limit.

maxRetries?: number

The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.

onFailedAttempt?: FailedAttemptHandler

Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.

searchParams?: MultiSearchRequestSchema

Typesense search parameters.

Default

{ 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>

Generated using TypeDoc