similaritySearch(
query: string,
k: number,
filter: string | object,
callbacks: Callbacks
): Promise| Name | Type | Description |
|---|---|---|
query* | string | |
k | number | |
filter | string | object | |
callbacks | Callbacks |
Searches for documents similar to a text query, embedding the query and retrieving documents based on vector similarity.
The text query to search for.
Optional number of similar documents to return.
Optional filter based on FilterType to restrict results.
Optional callbacks for tracking progress or events during the search process.