Typesense vector store.

Hierarchy

Constructors

Properties

FilterType: Partial<MultiSearchRequestSchema>

Methods

  • Add documents to the vector store. Will be updated if in the metadata there is a document with the same id if is using the default import function. Metadata will be added in the columns of the schema based on metadataColumnNames.

    Parameters

    • documents: Document<Record<string, any>>[]

      Documents to add.

    Returns Promise<void>

  • Parameters

    • Optional _params: Record<string, any>

    Returns Promise<void>

  • Parameters

    • query: string
    • Optional k: number
    • Optional filter: Partial<MultiSearchRequestSchema>
    • Optional _callbacks: Callbacks

    Returns Promise<DocumentInterface<Record<string, any>>[]>

  • Parameters

    • query: string
    • Optional k: number
    • Optional filter: Partial<MultiSearchRequestSchema>
    • Optional _callbacks: Callbacks

    Returns Promise<[DocumentInterface<Record<string, any>>, number][]>

  • Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.

    Parameters

    Returns Promise<DocumentInterface<Record<string, any>>[]>

    • List of documents selected by maximal marginal relevance.

Generated using TypeDoc