Return documents most similar to embedding vector with their scores.
similarity_search(
self,
query: str,
k: int = 4,
search_options: Optional[Dict[str, Any]] = {},
**kwargs: Any = {}
) -> List[Document]| Name | Type | Description |
|---|---|---|
query* | str | Query to look up for similar documents |
k | int | Default: 4Number of Documents to return. Defaults to 4. |
search_options | Optional[Dict[str, Any]] | Default: {}Optional search options that are passed to Couchbase search. Defaults to empty dictionary |
fields* | Optional[List[str]] | Optional list of fields to include in the metadata of results. Note that these need to be stored in the index. If nothing is specified, defaults to all the fields stored in the index. |