neo4j / neo4j/neo4j-graphrag-python

Use Constraints Instead of Plain Range Index for Node keys/ids

Open
#159 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.