172 Commits

Author SHA1 Message Date
yangdx
6a51f38cae Remove namespace_prefix from PostgreSQL, maintain consistency with other storage implementation 2025-03-31 02:59:44 +08:00
yangdx
637d37eec4 Update drop implementation for all storage type of PostgreSQL 2025-03-31 01:03:41 +08:00
zrguo
aa66ddea41
Merge pull request #1120 from Howe829/fix/chunk_ids
fix: correct chunk_ids as array type and remove incorrect filepath type conversion
2025-03-20 21:48:17 +08:00
jofoks
7e53d94526 Implemented simple PSQL doc-status get_by_ids method 2025-03-19 15:24:25 -07:00
HowardChan
0c39ff00a8 fix: resolve SQL type mismatch and conflict handling in LIGHTRAG_VDB_ENTITY insert query 2025-03-19 13:01:07 +08:00
HowardChan
1530798fb6 fix: ensure chunk_ids are correctly handled as VARCHAR array 2025-03-19 12:59:44 +08:00
Daniel.y
251f624273
Merge pull request #1107 from JoramMillenaar/fix--psql-return-type
Fixed get_by_id type error in PSQL impl
2025-03-18 20:40:28 +08:00
jofoks
54e4a31aa6 Fixed get_by_id type error in PSQL impl 2025-03-17 17:32:54 -07:00
zrguo
dfd19b8d27 fix postgres support 2025-03-17 23:59:47 +08:00
zrguo
e7395a2c8d
Merge branch 'main' into main 2025-03-17 17:23:41 +08:00
zrguo
3df20ae787 fix lint 2025-03-17 15:59:54 +08:00
zrguo
5956f22612
Merge branch 'main' into fix--postgres-impl 2025-03-17 15:42:09 +08:00
zrguo
901760ab98
Merge branch 'main' into postgres-improve-entities-relation-save-process 2025-03-17 15:39:40 +08:00
pengjunfeng11
4e58c7d7da
Update postgres_impl.py
There is aBUG. When lighttrag uses the postgres@15 version, there will be an error.The BUG detail as follow:
PostgreSQL database, error:subquery in FROM must have an alias
HINT:  For example, FROM (SELECT ...) [AS] foo.
It roughly means that there is an error in SQL template, and you need to use the alias alias to declare the content of the subquery.
2025-03-17 10:47:17 +08:00
Daniel.y
0277c94a61
Merge pull request #1091 from JoramMillenaar/quickfix--small-db-fields
Updated PSQL's chunk_id field to be a TEXT field
2025-03-16 22:48:54 +08:00
Daniel.y
9d971e5889
Merge pull request #1062 from ericshao/fix-postgres
Fix PGDocStatusStorage content extraction for DocProcessingStatus
2025-03-16 15:47:32 +08:00
jofoks
912e70feb1 Updated chunk_id field to be a TEXT field 2025-03-14 11:03:28 -07:00
jofoks
edc95126de Fixed some query parsing issues 2025-03-13 11:30:52 -07:00
Mykola Chaban
ceae2eb92d fixed issue with convert the age query to the dictionary;
refactored solution of storing chunk ids;
2025-03-13 13:45:09 +02:00
Eric Shao
01f60d5a4d 修复 PGDocStatusStorage 中的内容提取错误 2025-03-12 07:47:21 +08:00
zrguo
c26cb3a9ea fix merge bugs 2025-03-11 16:05:04 +08:00
Roy
92ae895713 Refactor requirements and code formatting
- Simplified requirements.txt by removing specific version constraints
- Added comment about extra library installation using pipmaster
- Improved code formatting in base.py, operate.py, and postgres_impl.py
- Cleaned up SQL templates and query method signatures with consistent formatting
2025-03-10 15:39:18 +00:00
Roy
04fdc617bb main_merge 2025-03-08 20:34:29 +00:00
Roy
e31c0c8f6c Update vector query methods to support ID filtering in PostgreSQL
- Modified `mix_kg_vector_query` in operate.py to pass optional IDs to vector search
- Updated PostgreSQL SQL template to filter results using document IDs instead of chunk_id
- Improved query flexibility by allowing precise document selection during vector search
2025-03-08 20:25:20 +00:00
Roy
528fb11364 Refactor vector query methods to support optional ID filtering
- Updated BaseVectorStorage query method signature to accept optional IDs
- Modified operate.py to pass query parameter IDs to vector storage queries
- Updated PostgreSQL vector storage SQL templates to filter results by document IDs
- Removed unused parameters and simplified query logic across multiple files
2025-03-08 15:43:17 +00:00
Samuel Chan
b7f67eda21 fix the postgres get all labels and get knowledge graph 2025-03-08 11:45:59 +08:00
Roy
bbe139cfeb Enhance PostgreSQL vector storage with chunk_id support
- Updated SQL templates for entity and relationship upsert to include chunk_id
- Modified PGVectorStorage methods to add chunk_id when inserting or updating records
- Expanded database schema to track chunk-level metadata
2025-03-07 20:18:01 +00:00
Roy
0ec61d6407 Update project dependencies and example test files
- Updated requirements.txt with latest package versions
- Added support for filtering query results by IDs in base and operate modules
- Modified PostgreSQL vector storage to include document and chunk ID fields
2025-03-07 18:45:28 +00:00
zrguo
e822f35c89 Fix edit entity and relation bugs 2025-03-07 14:39:06 +08:00
zrguo
81568f3bad fix linting 2025-03-04 15:53:20 +08:00
zrguo
3a2a636862 Implement the missing methods. 2025-03-04 15:50:53 +08:00
yangdx
e3a40c2fdb Fix linting 2025-03-01 16:23:34 +08:00
yangdx
d18eb52ccc Add type ignore comments for asyncpg imports to suppress mypy errors 2025-03-01 15:38:39 +08:00
Samuel Chan
60ad8ccf12 Add support to namespace_prefix 2025-02-21 22:48:23 +08:00
Yannick Stephan
678e0f9aea
Revert "Cleanup of code" 2025-02-20 15:09:43 +01:00
Yannick Stephan
439685e69c
Revert "removed get_knowledge_graph" 2025-02-20 14:29:36 +01:00
Yannick Stephan
32d0f1acb0 added docs and fields 2025-02-20 13:09:33 +01:00
Yannick Stephan
9f2c659d9c remove unused log 2025-02-20 12:54:14 +01:00
Yannick Stephan
cedb5f3975
Merge pull request #886 from YanSte/clean-2
removed get_knowledge_graph
2025-02-19 22:59:10 +01:00
Yannick Stephan
89c35c82c7 removed get_knowledge_graph 2025-02-19 22:57:46 +01:00
Yannick Stephan
4978379b9c
Merge pull request #885 from YanSte/remove-unsused
Cleanup of code
2025-02-19 22:54:58 +01:00
Yannick Stephan
eb3306f34c cleanup 2025-02-19 22:52:49 +01:00
Yannick Stephan
48a1ad9b3b
Merge pull request #883 from YanSte/fix-return-none
Optimised returns
2025-02-19 22:24:50 +01:00
Yannick Stephan
9277fe8c29 fixed return 2025-02-19 22:22:41 +01:00
Saifeddine ALOUI
45ee4dd08c fixed linting 2025-02-19 20:50:39 +01:00
Saifeddine ALOUI
521dbf2be1
Update postgres_impl.py 2025-02-19 19:50:46 +01:00
Yannick Stephan
ad07f22cc8 back age 2025-02-19 15:09:41 +01:00
Yannick Stephan
48377d91ef back age 2025-02-19 14:26:46 +01:00
Yannick Stephan
fc151e5866 cleaned code 2025-02-19 13:54:27 +01:00
Yannick Stephan
4adb4418fd cleaned code 2025-02-19 13:42:49 +01:00