diff --git a/README.md b/README.md index e6ccf811..8f022fe5 100644 --- a/README.md +++ b/README.md @@ -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, diff --git a/examples/quickstart/README.md b/examples/quickstart/README.md index 988211ca..f6a28934 100644 --- a/examples/quickstart/README.md +++ b/examples/quickstart/README.md @@ -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