Perform a similarity search on the query string.
similarity_search(
self,
query: str,
k: int = 4,
param: Optional[dict] = None,
expr: Optional[str] = None,
timeout: Optional[int] = None,
**kwargs: Any = {}
) -> List[Document]| Name | Type | Description |
|---|---|---|
query* | str | The text to search for. |
k | int | Default: 4The number of results to return. Default is 4. |
param | dict | Default: NoneSpecifies the search parameters for the index. |
expr | str | Default: NoneFiltering expression. Defaults to None. |
timeout | int | Default: NoneTime to wait before a timeout error. |
kwargs | Any | Default: {}Keyword arguments for Collection.search(). |