Class for interacting with SingleStoreDB, a high-performance distributed SQL database. It provides vector storage and vector functions.

Hierarchy (view full)

Constructors

Properties

connectionPool: Pool
contentColumnName: string
distanceMetric: DistanceMetrics
idColumnName: string
metadataColumnName: string
searchConfig: SearchConfig
tableName: string
useFullTextIndex: boolean
useVectorIndex: boolean
vectorColumnName: string
vectorIndexName: string
vectorIndexOptions: Metadata
vectorSize: number

Methods

  • Performs a similarity search on the texts stored in the SingleStoreDB

    Parameters

    • query: string

      A string representing the query text.

    • Optionalk: number

      The number of nearest neighbors to return. By default, it is 4.

    • Optionalfilter: Metadata

      Optional metadata to filter the texts by.

    • Optional_callbacks: any

      Callbacks object, not used in this implementation.

    Returns Promise<DocumentInterface<Metadata>[]>

    Top matching documents

  • Performs a similarity search on the texts stored in the SingleStoreDB using the specified search strategy and distance metric.

    Parameters

    • query: string

      A string representing the query text.

    • vector: number[]

      An array of numbers representing the query vector.

    • k: number

      The number of nearest neighbors to return.

    • Optionalfilter: Metadata

      Optional metadata to filter the texts by.

    Returns Promise<[Document, number][]>

    Top matching documents with score

  • Performs a similarity search on the vectors stored in the SingleStoreDB database.

    Parameters

    • query: number[]

      An array of numbers representing the query vector.

    • k: number

      The number of nearest neighbors to return.

    • Optionalfilter: Metadata

      Optional metadata to filter the vectors by.

    Returns Promise<[Document, number][]>

    Top matching vectors with score

  • Performs a similarity search on the texts stored in the SingleStoreDB

    Parameters

    • query: string

      A string representing the query text.

    • Optionalk: number

      The number of nearest neighbors to return. By default, it is 4.

    • Optionalfilter: Metadata

      Optional metadata to filter the texts by.

    • Optional_callbacks: any

    Returns Promise<[DocumentInterface<Metadata>, number][]>

    Top matching documents with score