docs: improve Neo4j database configuration documentation (#691)

- Add comprehensive DEFAULT_DATABASE environment variable documentation
- Explain Neo4j 5+ compatibility issue with default database naming
- Include troubleshooting section for "Graph not found: default_db" error
- Update quickstart example with proper environment variable setup

Fixes #671

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com>
This commit is contained in:
Daniel Chalef 2025-07-09 07:20:05 -07:00 committed by GitHub
parent a831bb3a5b
commit 183471c179
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 0 deletions

View file

@ -213,6 +213,28 @@ In addition to the Neo4j and OpenAi-compatible credentials, Graphiti also has a
If you are using one of our supported models, such as Anthropic or Voyage models, the necessary environment variables
must be set.
### Database Configuration
`DEFAULT_DATABASE` specifies the database name to use for graph operations. This is particularly important for Neo4j 5+ users:
- **Neo4j 5+**: The default database name is `neo4j` (not `default_db`)
- **Neo4j 4**: The default database name is `default_db`
- **FalkorDB**: The default graph name is `default_db`
If you encounter the error `Graph not found: default_db` when using Neo4j 5, set:
```bash
export DEFAULT_DATABASE=neo4j
```
Or add to your `.env` file:
```
DEFAULT_DATABASE=neo4j
```
### Performance Configuration
`USE_PARALLEL_RUNTIME` is an optional boolean variable that can be set to true if you wish
to enable Neo4j's parallel runtime feature for several of our search queries.
Note that this feature is not supported for Neo4j Community edition or for smaller AuraDB instances,

View file

@ -41,6 +41,9 @@ export NEO4J_PASSWORD=password
# Optional FalkorDB connection parameters (defaults shown)
export FALKORDB_URI=falkor://localhost:6379
# Database configuration (required for Neo4j 5+)
export DEFAULT_DATABASE=neo4j
```
3. Run the example:
@ -71,6 +74,26 @@ After running this example, you can:
4. Try other predefined search recipes from `graphiti_core.search.search_config_recipes`
5. Explore the more advanced examples in the other directories
## Troubleshooting
### "Graph not found: default_db" Error
If you encounter the error `Neo.ClientError.Database.DatabaseNotFound: Graph not found: default_db`, this typically occurs with Neo4j 5+ where the default database name is `neo4j` instead of `default_db`.
**Solution:**
Set the `DEFAULT_DATABASE` environment variable to `neo4j`:
```bash
export DEFAULT_DATABASE=neo4j
```
Or add it to your `.env` file:
```
DEFAULT_DATABASE=neo4j
```
This tells Graphiti to use the correct database name for your Neo4j version.
## Understanding the Output
### Edge Search Results