Retrieve documents from this knowledge store.
First, k nodes are retrieved using a vector search for the query string.
Then, additional nodes are discovered up to the given depth from those
starting nodes.
atraversal_search(
self,
query: str,
*,
k: int = 4,
depth: int = 1,
filter: dict[str, Any] | None = None,
**kwargs: Any = {}
) -> AsyncIterable[Document]| Name | Type | Description |
|---|---|---|
query* | str | The query string. |
k | int | Default: 4The number of Documents to return from the initial vector search. Defaults to 4. |
depth | int | Default: 1The maximum depth of edges to traverse. Defaults to 1. |
filter | dict[str, Any] | None | Default: NoneOptional metadata to filter the results. |
**kwargs | Any | Default: {}Additional keyword arguments. |