The most k similar documents and scores of the specified query.
similarity_search_with_score(
self,
query: str,
k: int = DEFAULT_TOPN,
text_in_page_content: Optional[str] = None,
meta_filter: Optional[dict] = None,
**kwargs: Any = {}
) -> List[Tuple[Document, float]]| Name | Type | Description |
|---|---|---|
query* | str | Text query. |
k | int | Default: DEFAULT_TOPNThe k most similar documents to the text query. |
text_in_page_content | Optional[str] | Default: NoneFilter by the text in page_content of Document. |
meta_filter | Optional[dict] | Default: NoneFilter by metadata. Defaults to None. |
kwargs | Any | Default: {}Any possible extend parameters in the future. |