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