Method to perform a similarity search in the vector store. It returns
the k most similar documents to the query vector, along with their
similarity scores.
similaritySearchVectorWithScore(
query: number[],
k: number,
filter: Metadata
): Promise<[Document<Record<string, any>>, number][]>| Name | Type | Description |
|---|---|---|
query* | number[] | Query vector. |
k* | number | Number of most similar documents to return. |
filter | Metadata | Optional filter to apply to the search. |