MCPcopy Create free account
hub / github.com/clockworknowledge/menome_processor / index_exists

Function index_exists

app/routers/utils.py:140–150  ·  view source on GitHub ↗

Check if a given index exists in the Neo4j database.

(driver, index_name: str)

Source from the content-addressed store, hash-verified

138
139## checks if an index exists in the neo4j graph
140def index_exists(driver, index_name: str) -> bool:
141 """Check if a given index exists in the Neo4j database."""
142 query = f"""
143 SHOW INDEXES
144 YIELD name
145 WHERE name = '{index_name}'
146 RETURN name
147 """
148 with driver.session() as session:
149 result = session.run(query).single()
150 return bool(result)
151
152## Sets up the graph database index
153def setup_graph_db(driver, index_name, node_label="Child", property_name="embedding"):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected