yangdx
d2dd137f83
feat: implement get_all_nodes and get_all_edges methods for graph storage backends
...
Add get_all_nodes() and get_all_edges() methods to Neo4JStorage, PGGraphStorage, MongoGraphStorage, and MemgraphStorage classes. These methods return all nodes and edges in the graph with consistent formatting matching NetworkXStorage for compatibility across different storage backends.
2025-08-03 11:02:37 +08:00
yangdx
2c7d2b3f5f
Increase Neo4j connection pool size and timeouts
...
- Bump default connection pool size to 100
- Add new Neo4j timeout env variables to env.example
2025-07-19 13:27:34 +08:00
yangdx
7184c7b3ab
fix: change default edge weight from 0.0 to 1.0 in entity extraction and graph storage
...
- Update extract_entities function in operate.py to use 1.0 as default weight
- Fix Neo4j implementation to use 1.0 instead of 0.0 for missing edge weights
- Fix Memgraph implementation to use 1.0 instead of 0.0 for missing edge weights
- Ensures consistent non-zero default weights across all graph storage backends
2025-07-17 11:30:49 +08:00
yangdx
ef79088f60
Move max_graph_nodes to global config
2025-07-07 21:53:57 +08:00
yangdx
4632adb355
Add NEO4J_WORKSPACE env var override support
...
- Allow workspace override via NEO4J_WORKSPACE
- Update env.example with new config option
2025-07-07 04:16:44 +08:00
yangdx
033098c1bc
Feat: Add WORKSPACE support to all storage types
2025-07-07 00:57:21 +08:00
yangdx
da46b341dc
feat: Optimize document deletion performance
...
- To enhance performance during document deletion, new batch-get methods, `get_nodes_by_chunk_ids` and `get_edges_by_chunk_ids`, have been added to the graph storage layer (`BaseGraphStorage` and its implementations). The [`adelete_by_doc_id`](lightrag/lightrag.py:1681) function now leverages these methods to avoid unnecessary iteration over the entire knowledge graph, significantly improving efficiency.
- Graph storage updated: Networkx, Neo4j, Postgres AGE
2025-06-25 12:37:57 +08:00
yangdx
fd69c895cd
Remove debug looging from Neo4j
2025-06-24 01:03:02 +08:00
yangdx
64d0df0caa
Remove debug logging from Neo4J operations
...
- Delete node upsert debug log
- Remove edge upsert debug messages
2025-06-24 00:45:17 +08:00
yangdx
dff73f078d
Fix linting
2025-04-25 22:01:06 +08:00
yangdx
04ebcbebd0
Translate comments to English
2025-04-25 21:54:04 +08:00
yangdx
d4c4a40c53
Fix M.env AX_GRAPH_NODES not working problem
2025-04-17 01:28:22 +08:00
yangdx
33e8b9f284
Fix edge direction problem for Neo4j storage
2025-04-16 14:24:28 +08:00
yangdx
1de74c9228
Fix linting
2025-04-15 12:34:04 +08:00
yangdx
e9b04e5bd2
Merge branch 'graph-storage-batch-query-frederikhendrix' into graph-storage-batch-query
2025-04-12 22:20:41 +08:00
yangdx
745301ea13
Deleted node2vec implementation
2025-04-11 18:41:45 +08:00
yangdx
83353ab9a6
Remove unused node embedding functionality from graph storage
...
- Deleted embed_nodes() method implementations
2025-04-11 18:34:48 +08:00
frederikhendrix
182aee2e14
get_node added and all to base.py and to neo4j_impl.py file
2025-04-07 19:09:31 +02:00
IcySugar
fe36488bc9
Update neo4j_impl.py
...
Fix: added the "f" for format for logger
2025-04-07 16:56:33 +08:00
yangdx
689cf44a5d
Let get_edge return None when edge not found
2025-04-04 02:48:30 +08:00
yangdx
b003537429
Fix APOC fallback error
2025-04-04 02:05:29 +08:00
yangdx
399b2f14f6
Fix linting
2025-04-04 00:07:21 +08:00
yangdx
6b240fa9b2
Serialize merge precess to prevent race conditions
2025-04-03 21:33:46 +08:00
yangdx
3e3338a144
Fix get_node error for PostgreSQL graph storage
2025-04-03 15:40:31 +08:00
yangdx
8878c0e998
Fix get_all_labels for PostgreSQL
2025-04-03 04:10:20 +08:00
yangdx
c339f8686a
Add is_truncated to graph query for Neo4j
2025-04-02 23:20:07 +08:00
yangdx
82c4baba70
Add is_truncated to graph query for NetworkX graph db
2025-04-02 22:12:20 +08:00
yangdx
a50edffdb0
Optimize Neo4J subgraph query performance
2025-04-02 20:53:15 +08:00
yangdx
fb2fad7766
Update comments of get_knowledge_graph func for Noe4j
2025-04-02 17:02:01 +08:00
yangdx
c2f007199f
Fix linting
2025-04-02 16:36:28 +08:00
yangdx
3ed7f11b4c
Add index on entity_id for Neo4j
2025-04-02 16:36:02 +08:00
yangdx
4994bd1461
Simplified graph retrival by removing inclusive and min_degree parameters
2025-04-02 16:27:58 +08:00
yangdx
fc3208cf5b
Filter nodes by :base for entity label retrieval in Neo4j
2025-04-02 12:53:17 +08:00
yangdx
c72c149e71
Fix linting
2025-04-02 12:16:40 +08:00
yangdx
cd67d7cd79
Removed redundant entity_id extraction in upsert logic for Neo4JStorage
2025-04-02 12:16:13 +08:00
yangdx
5f678adb71
Refactor Neo4J storage initialization and cleanup
...
- Make initialization async
- Rename close() to finalize()
2025-04-02 10:45:21 +08:00
yangdx
95a8ee27ed
Fix linting
2025-03-31 23:22:27 +08:00
yangdx
1df4b777d7
Add drop funtions to storage implementations
2025-03-30 15:17:57 +08:00
yangdx
5b70d34822
Fix get single node subgrap problem
...
- Replaced MATCH with OPTIONAL MATCH
- Add memory-bank directory for Cline to .gitignore
2025-03-13 02:14:02 +08:00
yangdx
8f633c89fd
Remove duplicate retry decorator in Neo4JStorage class.
2025-03-12 09:12:06 +08:00
yangdx
cbacb615f3
Use COALESCE to handle null degree counts in Neo4J queries.
...
- Ensures degree count defaults to 0
- Prevents null-related errors in queries
2025-03-11 18:33:26 +08:00
yangdx
30310c2845
Fix relation info in kownledge graph UI
2025-03-11 15:36:38 +08:00
yangdx
7fddabb441
Fix linting
2025-03-11 10:28:25 +08:00
yangdx
aefd596990
Refactor Neo4JStorage to use entity_id for node identification, use entity_type for node label
2025-03-11 09:59:42 +08:00
yangdx
c854aabde0
Add process ID to log messages for better multi-process debugging clarity
...
- Add PID to KV and Neo4j storage logs
- Add PID to query context logs
- Improve KV data count logging for llm cache
2025-03-09 15:25:10 +08:00
yangdx
c5d0962872
Fix linting
2025-03-09 01:00:42 +08:00
yangdx
18c0770409
fix: duplicate nodes for same entity(label) problem in Neo4j
...
- Add entity_id field as key in Neo4j nodes
- Use entity_id for nodes retrival and upsert
2025-03-09 00:24:55 +08:00
yangdx
fb4a4c736e
Add duplicate edge upsert checking and logging
2025-03-08 11:36:24 +08:00
yangdx
22a93fb717
Limit neighbor nodes fetch to 1000 in Neo4JStorage.
2025-03-08 11:29:08 +08:00
yangdx
887f6ed81a
Fix return empty list when no edges is found
2025-03-08 11:20:22 +08:00