INNER CODE UNIT · Python
title
yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:1006
title = key[:1].upper() + key[1:] if key else key
_print_search_section(title, hits.payload[key])
return
if hits.kind == "graph":
_print_search_section("Nodes", hits.payload.get("nodes") or [])
_print_search_section("Edges", hits.payload.get("edges") or [])
community = hits.payload.get("community_context")
if isinstance(community, dict) and community:
_print_search_section("Community", community)
return
for i, result in enumerate(hits.payload.get("results") or [], 1):
console.print(f"[bold cyan]Result {i}:[/bold cyan]")
_print_jsonish(result)
@app.command(name="search")