Method that performs a similarity search on the vectors stored in the collection. It returns a list of documents and their corresponding similarity scores.
similaritySearchVectorWithScore(
queryVector: number[],
k: number,
indexType: "ivf" | "hnsw" | "diskann"
): Promise<[Document<Record<string, any>>, number][]>| Name | Type | Description |
|---|---|---|
queryVector* | number[] | Query vector for the similarity search. |
k* | number | |
indexType | "ivf" | "hnsw" | "diskann" |