4068 Commits

Author SHA1 Message Date
Ken Chen
4a953d6829 As Graph edges should be treated undirectional, fix incorrect upsert_edge method in MongoDBGraph 2025-06-28 21:03:54 +08:00
Ken Chen
5116d61eaa As Graph edges should be treated undirectional, fix incorrect has_edge method in MongoDBGraph 2025-06-28 20:48:30 +08:00
Ken Chen
73cc86662a Add two BFS subgraph search support for MongoDBGraph 2025-06-28 20:00:13 +08:00
Daniel.y
0e683a50e8
Merge pull request #1714 from danielaskdd/fix-mix-query
Fix: Resolving issue with PostgreSQL document chunk KV storage depending on vector storage
2025-06-28 19:55:22 +08:00
yangdx
df5ffb3cad Merge branch 'fix-mix-query' of github.com:danielaskdd/LightRAG into fix-mix-query 2025-06-28 19:27:42 +08:00
yangdx
8522bfc9dc Optimied logger info 2025-06-28 19:27:36 +08:00
yangdx
9d5c49e4cb Optimied logger info 2025-06-28 19:08:26 +08:00
Ken Chen
5739f52d29 Rewrite get_knowledge_graph with label * by degree 2025-06-28 17:10:39 +08:00
Ken Chen
d0f4eee404 Fix accidentally hardcoded edge collection name in searching upstream nodes 2025-06-28 16:25:44 +08:00
yangdx
b7f8c20e61 fix(postgres): use correct table for vector queries
Change SQL templates from LIGHTRAG_DOC_CHUNKS to LIGHTRAG_VDB_CHUNKS
to fix "content_vector does not exist" error in vector operations.
2025-06-28 15:36:54 +08:00
yangdx
2c47367975 Fix linting 2025-06-28 14:37:55 +08:00
yangdx
95c7a7d038 feat(db): Add data migration from LIGHTRAG_DOC_CHUNKS to LIGHTRAG_VDB_CHUNKS 2025-06-28 14:37:47 +08:00
yangdx
3a8a99b73d feat(postgres): Implement text_chunks upsert for PGKVStorage 2025-06-28 14:37:35 +08:00
Ken Chen
6574dfb7ea Fix accidentally hardcode max depth in searching upstream nodes 2025-06-28 11:40:39 +08:00
Ken Chen
b586bdc02f Fix accidentally hardcode label in searching upstream nodes 2025-06-28 10:50:56 +08:00
yangdx
0f51ec48f1 fix: streaming error when only_need_context=True returns empty results
Prevents NoneType async iteration error by handling None responses
in stream_generator and ensuring kg_query returns valid strings.
2025-06-28 09:18:06 +08:00
Ken Chen
7c8f65d020 Add search on neighbor nodes which are source to selected one 2025-06-28 08:50:32 +08:00
yangdx
a506753548 Fix linting 2025-06-27 02:33:20 +08:00
yangdx
60777d535b fix: prevent Path Traversal vulnerability in upload endpoint
- Add sanitize_filename() function to validate and clean uploaded filenames
- Remove path separators, traversal sequences, and control characters
- Verify final paths stay within input directory using Path.resolve()
- Return HTTP 400 errors for unsafe filenames
- Prevents directory traversal attacks like ../../../etc/passwd
2025-06-27 02:33:05 +08:00
yangdx
44daf51501 Fix edge_degree to handle non-existent nodes 2025-06-27 01:37:10 +08:00
Ken Chen
f40bc43d5e Fix nodes & edges are missing when retrieving knowledge subgraph by selecting particular node_id 2025-06-26 23:11:31 +08:00
Daniel.y
c740401b7f
Merge pull request #1654 from a-bruhn/azure-env-vars
Clean up azure env vars
2025-06-26 19:11:20 +08:00
yangdx
6e1ca8f461 Merge branch 'patch-1' 2025-06-26 18:45:23 +08:00
yangdx
fb3006b44d Update requirements.txt 2025-06-26 18:45:01 +08:00
zrguo
5b6ac84cd0 Update README 2025-06-26 18:08:21 +08:00
zrguo
082a338df3 Update README.md 2025-06-26 17:52:52 +08:00
zrguo
afba3df01a Update README 2025-06-26 16:20:39 +08:00
zrguo
fc7a0329df Update README 2025-06-26 16:17:00 +08:00
zrguo
145e3a238b Update README.md 2025-06-26 16:12:20 +08:00
zrguo
1d788c3e97 Update RAGAnything related 2025-06-26 16:08:14 +08:00
yangdx
687ccd4923 fix: optimize MongoDB aggregation pipeline to prevent memory limit errors
- Move $limit operation early in pipeline for "*" queries to reduce memory usage
- Remove memory-intensive $sort operation for large dataset queries
- Add fallback mechanism for memory limit errors with simple query
- Implement additional safety checks to enforce max_nodes limit
- Improve error handling and logging for memory-related issues
2025-06-26 14:37:04 +08:00
yangdx
d8b544ab6f Fix linting 2025-06-26 14:15:11 +08:00
yangdx
c51079335e Optimize node label retrieval with aggregation
- Enable allowDiskUse for large datasets
2025-06-26 14:14:52 +08:00
yangdx
778ad4f23a Merge branch 'kenspirit/main' 2025-06-26 13:52:42 +08:00
yangdx
d60db573dc Add allowDiskUse flag to MongoDB aggregations
- Enable disk use for large aggregations
- Fix cursor handling for list_search_indexes
- Improve query performance for big datasets
- Update vector search index check
- Set proper length for to_list results
2025-06-26 13:51:53 +08:00
yangdx
71565f4794 Add get_all method to MongoKVStorage 2025-06-26 13:51:15 +08:00
yangdx
d512db26e4 Fix MongoDB set handling in delete operations 2025-06-26 13:50:19 +08:00
yangdx
6364d076aa Enable MongoGraphStorage 2025-06-26 13:47:50 +08:00
yangdx
d031cc7cdf Merge branch 'main' into kenspirit/main 2025-06-26 09:20:52 +08:00
yangdx
dc182bfaca Merge branch 'delete_doc' 2025-06-26 01:21:25 +08:00
yangdx
8fb1c09b08 Refac: pipelinge message 2025-06-26 01:00:54 +08:00
Ken Chen
a3865caaea Implement get_nodes_by_chunk_ids and get_edges_by_chunk_ids, 2025-06-25 22:17:17 +08:00
Ken Chen
81cff6e97f
Merge branch 'HKUDS:main' into main 2025-06-25 20:35:55 +08:00
Daniel.y
394b5870c6
Merge pull request #1698 from HKUDS/delete_doc
Feat: Implement document deletion functionality in the WebUI
2025-06-25 19:37:21 +08:00
yangdx
88c528ec94 Update webui assetes 2025-06-25 19:26:24 +08:00
yangdx
bdcd55a871 Feat: Add delete upload file option to document deletion 2025-06-25 19:02:46 +08:00
yangdx
6a1737784d Bump api version to 0176 2025-06-25 17:17:56 +08:00
yangdx
f440461810 Update webui assets 2025-06-25 17:16:59 +08:00
yangdx
be41af3749 Update i18n files 2025-06-25 17:16:21 +08:00
yangdx
0f392dfa78 Fix linting 2025-06-25 17:09:41 +08:00