feat: complete catalog-driven preprocessing
Publish documentation / publish (push) Successful in 2m12s
Publish documentation / publish (push) Successful in 2m12s
This commit is contained in:
@@ -82,6 +82,8 @@ def _vector_key(hit) -> str:
|
||||
return f"column:{hit.ref}"
|
||||
if hit.kind == "schema_table":
|
||||
return f"table:{hit.ref}"
|
||||
if hit.kind == "schema_relationship":
|
||||
return f"relationship:{hit.ref}"
|
||||
return f"evidence:{hit.id}"
|
||||
|
||||
|
||||
@@ -92,7 +94,13 @@ def schema_tables(results: list["SearchResult"], top_tables: int) -> list[tuple[
|
||||
ignorati."""
|
||||
best: dict[str, float] = {}
|
||||
for r in results:
|
||||
if r.kind not in ("schema_table", "schema_column"):
|
||||
if r.kind not in ("schema_table", "schema_column", "schema_relationship"):
|
||||
continue
|
||||
if r.kind == "schema_relationship":
|
||||
endpoints = r.key.split(":", 1)[1].split("->", 1)
|
||||
for table in endpoints:
|
||||
if table not in best or r.rrf > best[table]:
|
||||
best[table] = r.rrf
|
||||
continue
|
||||
table = r.key.split(":", 1)[1].split(".", 1)[0]
|
||||
if table not in best or r.rrf > best[table]:
|
||||
|
||||
Reference in New Issue
Block a user