Return type
List[float], List[Tuple[Document, any, any]]
similarity_search_with_score_by_vector(embedding: List[float], k: int = 4, param: Optional[dict] = None, expr: Optional[str] = None, timeout: Optional[int] = None, **kwargs: Any) → List[Tuple[Document, float]][source]¶
Performs a search on the query string and returns results with scores.
Parameters
embedding (List[float]) – The embedding vector being searched.
k (int, optional) – The number of results to return.
4. (Default is) – 
param (dict) – Specifies the search parameters for the index.
None. (Default is) – 
expr (str, optional) – Filtering expression. Default is None.
timeout (int, optional) – The waiting time before a timeout error.
None. – 
kwargs – Keyword arguments for Collection.search().
Returns
Resulting documents and scores.
Return type
List[Tuple[Document, float]]