Performs a search on the query string and returns results with scores.
similarity_search_with_score(
self,
query: str,
k: int = 4,
param: Optional[dict] = None,
expr: Optional[str] = None,
timeout: Optional[int] = None,
**kwargs: Any = {}
) -> List[Tuple[Document, float]]| Name | Type | Description |
|---|---|---|
query* | str | The text being searched. |
k | int | Default: 4The number of results to return. |
param | dict | Default: NoneSpecifies the search parameters for the index. |
expr | str | Default: NoneFiltering expression. Default is None. |
timeout | int | Default: NoneThe waiting time before a timeout error. |
kwargs | Any | Default: {}Keyword arguments for Collection.search(). |