-
Notifications
You must be signed in to change notification settings - Fork 41
Neo4j graph backend #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Neo4j graph backend #177
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
9e16d08
feat: Neo4j graph backend plugin
m1rl0k 795406b
Add Neo4j support for graph queries and edge deletion
m1rl0k 64be33e
Add enhanced graph backend integration for RAG
m1rl0k 3b02d57
Add callee_path attribute to GraphEdge
m1rl0k 4cc49a7
Update ingest_adapter.py
m1rl0k c73d163
Add cross-file symbol resolution to graph ingestion
m1rl0k 69ac721
Add language-aware builtin and stdlib resolution to edge extraction
m1rl0k c0f3446
Fix multi-hop via attribution and skip pseudo-paths
m1rl0k 24acb02
Refactor symbol resolution and enhance Qdrant collection setup
m1rl0k 64ba83e
Add env vars for lexical and pattern vector configs
m1rl0k 20e0eb2
Add env vars for lexical and pattern vector configs
m1rl0k 08f6785
Increase collection name hash length to 16 chars
m1rl0k eba8d69
Add detailed logging to delta bundle processing
m1rl0k 0e5b84a
Revert "Increase collection name hash length to 16 chars"
m1rl0k 189827c
Add NEO4J_GRAPH env variable to docker-compose
m1rl0k 7bc7720
Add Neo4j plugin support and environment variables
m1rl0k 624f53a
Add neo4j dependency for symbol_graph queries
m1rl0k f73b29b
Add Neo4j graph backend plugin and CLI integration
m1rl0k 55b33ad
Refactor graph edge utilities and backend initialization
m1rl0k a9026a2
Enhance graph backends with language-aware import resolution and caching
m1rl0k 3bdc78f
Add cache management utilities and TTL to symbol graph
m1rl0k d8cfd0a
Refactor Neo4j enablement checks and improve logging
m1rl0k 10a2180
Add circuit breaker and driver cleanup to Neo4j backend
m1rl0k 21516c1
Update symbol exports and workspace imports
m1rl0k ad83776
Add cache clearing functions and refactor symbol extraction
m1rl0k f363f93
Sanitize graph traversal depth in Cypher queries
m1rl0k 4888e7d
Add batch shortest path and optimize graph reranking
m1rl0k ae116c9
Add detailed licensing info for Neo4j plugin
m1rl0k 14d11ff
Add automatic Neo4j backfill from Qdrant
m1rl0k c8185cc
Fix Cypher path length parameterization in Neo4j queries
m1rl0k 3b618ed
Include symbol node in cycle query WITH clause
m1rl0k d3131cc
Include repo info in graph output formatting
m1rl0k d650e16
Enhance import extraction to include symbols and modules
m1rl0k 3a4d95a
Enhance import extraction to include leaf symbols
m1rl0k 85f3995
Add support for new languages in tree_sitter
m1rl0k ad17865
Improve Kotlin and PHP import extraction logic
m1rl0k 78bb7d2
Refactor reranker warmup to use centralized factory
m1rl0k 9ee2db0
Add tree-sitter availability checks to language coverage tests
m1rl0k 790423f
Merge branch 'neo4j-graph-backend' of https://github.com/m1rl0k/Conte…
m1rl0k ed931c3
Update ci.yml
m1rl0k 4e08060
Update test_language_coverage.py
m1rl0k 897ce16
Make language coverage tests robust to missing tree-sitter features
m1rl0k 8610e0d
Add plugins directory to indexer Docker image
m1rl0k f1c6389
Add thread safety and timeouts to Neo4j graph operations
m1rl0k e2a201d
Fix path and repo field handling in Neo4j and Qdrant backends
m1rl0k 60b413b
Improve collection missing cache with TTL and regex escaping
m1rl0k cf8eecf
Refactor collection missing checks with TTL expiry
m1rl0k 49b6825
Document neo4j_graph_query for advanced code graph queries
m1rl0k d3aa4e8
Add parallel file indexing to index_repo function
m1rl0k 1b785d4
Add async support to Neo4jGraphBackend
m1rl0k 6fe3073
Refactor Neo4j queries to use async execution
m1rl0k dea3937
Make Neo4j circuit breaker thread-safe and fix delete count
m1rl0k 93f19e8
Add per-intent ML confidence thresholds
m1rl0k 4ccc4cf
Update intent_classifier.py
m1rl0k 686ec0b
Add unit tests for embedding, ranking, Qdrant, Neo4j, rerank, and sem…
m1rl0k fe47eac
Optimize smart reindexing and intent threshold logic
m1rl0k ad48759
Explicitly commit transaction in async Neo4j session
m1rl0k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Neo4j Graph Database - Optional SaaS-Ready Graph Backend | ||
| # Usage: docker compose -f docker-compose.yml -f docker-compose.neo4j.yml up -d | ||
| # | ||
| # This adds Neo4j as an alternative graph backend for symbol relationships. | ||
| # Provides advanced graph traversals, path finding, and relationship analytics. | ||
| # | ||
| # Enable via: NEO4J_GRAPH=1 in your .env file | ||
| # | ||
| # Browser: http://localhost:7474 (login: neo4j / contextengine) | ||
| # Bolt: bolt://localhost:7687 | ||
|
|
||
| services: | ||
| # Neo4j Graph Database | ||
| neo4j: | ||
| image: neo4j:5.15-community | ||
| container_name: neo4j-graph | ||
| ports: | ||
| - "7474:7474" # HTTP browser interface | ||
| - "7687:7687" # Bolt protocol | ||
| volumes: | ||
| - neo4j_data:/data | ||
| - neo4j_logs:/logs | ||
| environment: | ||
| - NEO4J_AUTH=neo4j/${NEO4J_PASSWORD:-contextengine} | ||
| - NEO4J_PLUGINS=["apoc"] | ||
| - NEO4J_dbms_security_procedures_unrestricted=apoc.* | ||
| - NEO4J_dbms_memory_pagecache_size=512M | ||
| - NEO4J_dbms_memory_heap_max__size=512M | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 30s | ||
| networks: | ||
| - dev-remote-network | ||
|
|
||
| # Enable Neo4j graph backend for indexer services | ||
| indexer: | ||
| environment: | ||
| - NEO4J_GRAPH=1 | ||
| - NEO4J_URI=bolt://neo4j:7687 | ||
| - NEO4J_USER=neo4j | ||
| - NEO4J_PASSWORD=${NEO4J_PASSWORD:-contextengine} | ||
| - NEO4J_DATABASE=neo4j | ||
| depends_on: | ||
| neo4j: | ||
| condition: service_healthy | ||
|
|
||
| watcher: | ||
| environment: | ||
| - NEO4J_GRAPH=1 | ||
| - NEO4J_URI=bolt://neo4j:7687 | ||
| - NEO4J_USER=neo4j | ||
| - NEO4J_PASSWORD=${NEO4J_PASSWORD:-contextengine} | ||
| - NEO4J_DATABASE=neo4j | ||
| depends_on: | ||
| neo4j: | ||
| condition: service_healthy | ||
|
|
||
| # Enable Neo4j for MCP indexer services (symbol_graph queries) | ||
| mcp_indexer: | ||
| environment: | ||
| - NEO4J_GRAPH=1 | ||
| - NEO4J_URI=bolt://neo4j:7687 | ||
| - NEO4J_USER=neo4j | ||
| - NEO4J_PASSWORD=${NEO4J_PASSWORD:-contextengine} | ||
| - NEO4J_DATABASE=neo4j | ||
| depends_on: | ||
| neo4j: | ||
| condition: service_healthy | ||
|
|
||
| mcp_indexer_http: | ||
| environment: | ||
| - NEO4J_GRAPH=1 | ||
| - NEO4J_URI=bolt://neo4j:7687 | ||
| - NEO4J_USER=neo4j | ||
| - NEO4J_PASSWORD=${NEO4J_PASSWORD:-contextengine} | ||
| - NEO4J_DATABASE=neo4j | ||
| depends_on: | ||
| neo4j: | ||
| condition: service_healthy | ||
|
|
||
| volumes: | ||
| neo4j_data: | ||
| driver: local | ||
| neo4j_logs: | ||
| driver: local | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.