Retrieve documents from traversing this graph store.
First, k nodes are retrieved using a search for each 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]Returns: Collection of retrieved documents.
| Name | Type | Description |
|---|---|---|
query* | str | The query string. |
k | int | Default: 4The number of Documents to return from the initial search. Defaults to 4. Applies to each of the query strings. |
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. |