Return documents most similar to the query
similarity_search(
self,
query: str,
k: Optional[int] = None,
name: Optional[str] = None,
filter: Optional[Any] = None,
fts: Optional[bool] = False,
**kwargs: Any = {}
) -> List[Document]Raises: ValueError: If the specified table is not found in the database.
| Name | Type | Description |
|---|---|---|
query* | str | String to query the vectorstore with. |
k | Optional[int] | Default: NoneNumber of documents to return. |
filter | Optional[Dict] | Default: NoneOptional filter arguments sql_filter(Optional[string]): SQL filter to apply to the query. prefilter(Optional[bool]): Whether to apply the filter prior to the vector search. |