Add docs
This commit is contained in:
parent
59a493847c
commit
13551dacf1
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ class SearchType(Enum):
|
||||||
NEIGHBOR = auto()
|
NEIGHBOR = auto()
|
||||||
|
|
||||||
|
|
||||||
async def complex_search(graph, query_params: Dict[SearchType, Dict[str, Any]]) -> List:
|
async def search(graph, query_params: Dict[SearchType, Dict[str, Any]]) -> List:
|
||||||
search_functions: Dict[SearchType, Callable] = {
|
search_functions: Dict[SearchType, Callable] = {
|
||||||
SearchType.ADJACENT: search_adjacent,
|
SearchType.ADJACENT: search_adjacent,
|
||||||
SearchType.SIMILARITY: search_similarity,
|
SearchType.SIMILARITY: search_similarity,
|
||||||
|
|
@ -61,7 +61,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
await graph_client.load_graph_from_file()
|
await graph_client.load_graph_from_file()
|
||||||
graph = graph_client.graph
|
graph = graph_client.graph
|
||||||
results = await complex_search(graph, query_params)
|
results = await search(graph, query_params)
|
||||||
print(results)
|
print(results)
|
||||||
|
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue