neo4j / neo4j/neo4j-graphrag-python
Use Constraints Instead of Plain Range Index for Node keys/ids
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 246
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 11
Description
Regarding stuff like this in kg writer: https://github.com/neo4j/neo4j-graphrag-python/blob/main/src/neo4j_graphrag/experimental/components/kg_writer.py#L103
For unique node ids/keys used in loading, you want to use a Constraint: Either Key or Uniqueness constraint. Key is like uniqueness but also doesn't allow Nulls and is Enterprise only.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/neo4j_graphrag/experimental/components/kg_writer.py around line 103 and trace how node keys or ids are loaded. Read the linked Neo4j documentation on node key and uniqueness constraints, then update the loading setup to use the appropriate constraint; done means unique node identifiers are enforced by a constraint rather than a plain range index.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- neo4j, python
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100