Return documents that are most similar to the vector embedding.
similarity_search_by_vector(
self,
embedding: List[float],
k: int = 4,
search_options: Optional[Dict[str, Any]] = {},
**kwargs: Any = {}
) -> List[Document]| Name | Type | Description |
|---|---|---|
embedding* | List[float] | Embedding to look up documents similar to. |
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 document text and metadata fields. |