Commit Graph

6084 Commits

Author SHA1 Message Date
yangdx
8aeb234aaa Improve EmbeddingFunc unwrapping safety and docs
- Limit nesting depth in EmbeddingFunc
- Log warning when auto-unwrapping
- Fix typo in EmbeddingFunc docstring
- Document .func usage in examples
2025-12-22 14:49:59 +08:00
yangdx
705e8c6c8e Fix nested EmbeddingFunc wrapping and update demo usage
- Auto-unwrap nested EmbeddingFuncs
- Use partial and .func in examples
- Improve EmbeddingFunc documentation
- Fix comment in LightRAG class
2025-12-22 14:34:25 +08:00
yangdx
3ca9f611bf docs: Sync Chinese README with English updates 2025-12-22 13:53:48 +08:00
yangdx
fbd11ffc6a Merge branch 'update-full-text-index-for-workspace' 2025-12-22 00:20:00 +08:00
yangdx
2a02b69e1d Improve CJK detection and safely drop Neo4j indexes
- Expand CJK regex to extensions A-F
- Use DROP INDEX IF EXISTS
- Add cleanup in multi-workspace test
- Safely handle legacy index drops
2025-12-22 00:19:37 +08:00
yangdx
a6c365e81d Sanitize workspace labels for Neo4j index names
- Add helper to normalize index suffixes
- Replace special chars with underscores
- Ensure valid start char for indices
2025-12-21 23:48:54 +08:00
yangdx
c9bbc3c6cc Merge branch 'main' into update-full-text-index-for-workspace 2025-12-21 23:02:18 +08:00
yangdx
7145b934f5 Bump API version to 0261 2025-12-21 19:16:57 +08:00
Daniel.y
3c566912fb Merge pull request #2516 from HKUDS/dependabot/bun/lightrag_webui/build-tools-58aed0c0ce
Bump eslint-plugin-react-refresh from 0.4.24 to 0.4.26 in /lightrag_webui in the build-tools group across 1 directory
2025-12-21 19:13:40 +08:00
Daniel.y
d719ee4902 Merge pull request #2515 from HKUDS/dependabot/bun/lightrag_webui/frontend-minor-patch-241571b80e
Bump the frontend-minor-patch group across 1 directory with 3 updates
2025-12-21 19:13:21 +08:00
dependabot[bot]
f5f34e56ee Bump eslint-plugin-react-refresh
Bumps the build-tools group with 1 update in the /lightrag_webui directory: [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh).


Updates `eslint-plugin-react-refresh` from 0.4.24 to 0.4.26
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.24...v0.4.26)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-refresh
  dependency-version: 0.4.26
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: build-tools
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-21 11:12:37 +00:00
dependabot[bot]
2d04749695 Bump the frontend-minor-patch group across 1 directory with 3 updates
Bumps the frontend-minor-patch group with 3 updates in the /lightrag_webui directory: [i18next](https://github.com/i18next/i18next), [react-i18next](https://github.com/i18next/react-i18next) and [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `i18next` from 25.7.2 to 25.7.3
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v25.7.2...v25.7.3)

Updates `react-i18next` from 16.4.1 to 16.5.0
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/react-i18next/compare/v16.4.1...v16.5.0)

Updates `@types/node` from 24.10.3 to 24.10.4
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: i18next
  dependency-version: 25.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-patch
- dependency-name: react-i18next
  dependency-version: 16.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-patch
- dependency-name: "@types/node"
  dependency-version: 24.10.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-21 11:11:48 +00:00
Daniel.y
5547446408 Merge pull request #2511 from HKUDS/dependabot/bun/lightrag_webui/build-tools-ab633d47b1
Bump the build-tools group in /lightrag_webui with 2 updates
2025-12-21 19:11:35 +08:00
Daniel.y
0645cffc88 Merge pull request #2510 from HKUDS/dependabot/bun/lightrag_webui/ui-components-d28d7df1f4
Bump the ui-components group in /lightrag_webui with 3 updates
2025-12-21 19:11:11 +08:00
Daniel.y
dcce60929e Merge pull request #2509 from HKUDS/dependabot/bun/lightrag_webui/react-6045c185b5
Bump the react group in /lightrag_webui with 2 updates
2025-12-21 19:10:01 +08:00
Daniel.y
ac3063f417 Merge pull request #2503 from HKUDS/dependabot/github_actions/github-actions-35b2a8182b
Bump the github-actions group with 3 updates
2025-12-21 19:09:25 +08:00
Daniel.y
de48940a76 Merge pull request #2513 from HKUDS/feature/vectordb-model-isolation
feat: Implement Vector Database Model Isolation and Auto-Migration
2025-12-21 18:58:34 +08:00
yangdx
afe3f3788a Update PG mismatch tests to expect errors
- Assert DataMigrationError on mismatch
- Mock check_table_exists explicitly
- Return JSON string for vector sampling
- Check dimension info in error message
2025-12-21 18:54:17 +08:00
yangdx
be744a28a7 Update Postgres tests for keyset pagination and API changes
- Use check_table_exists DB method
- Update mocks for keyset pagination
- Enforce error on dimension mismatch
- Remove deprecated module patches
- Verify workspace migration isolation
2025-12-21 18:37:28 +08:00
yangdx
5fef7e4042 Skip legacy vector table init in Postgres and fix migration checks
* Pass model_name in API embedding setup
* Skip legacy vector tables in check_tables
* Verify legacy tables exist before legacy migrating
* Exclude legacy vector tables from index check
* Add model_name to embedding_func of LightRAG Server (Kick start data migration for vector table with model and dimension suffix)
2025-12-21 17:24:05 +08:00
yangdx
8ef86c4898 Refactor PG vector storage and add index creation
* Move helper functions to static methods
* Move check table exists functions to PostgreSQLDB
* Create ID and workspace indexes in DDL
2025-12-21 16:25:58 +08:00
yangdx
2228a75dd0 Fix NumPy ambiguity and array support in Postgres
- Fix NumPy boolean ambiguity error
- Use `is not None` for vector check
- Support NumPy arrays for dimensions
- Handle array-like vector data
2025-12-21 16:02:04 +08:00
yangdx
ff19a67feb Add model_suffix argument to Qdrant tests
- Pass suffix to dimension tests
- Add explicit suffix to safety tests
- Test empty suffix scenario
- Update collection init calls
2025-12-21 02:16:47 +08:00
yangdx
77ed23a7ab Fix markdown table formatting in README files 2025-12-21 01:47:36 +08:00
yangdx
caed4fb9b6 Add model_name attribute to embedding wrappers
- Add `model_name` to embedding decorators
- Update `EmbeddingFunc` class definition
- Set default models for LLM providers
- Refactor wrapper docstrings in utils
- Update README usage examples
2025-12-21 01:32:27 +08:00
yangdx
9c52e32a14 Fix legacy collection name in Qdrant warning log 2025-12-21 01:31:10 +08:00
yangdx
9381dee6e5 Elevate manual deletion log to warning level 2025-12-20 23:54:42 +08:00
yangdx
7618de44df Refine Qdrant legacy collection lookup with model suffix support
- Add model_suffix to legacy lookup
- Update collection search priorities
- Pass suffix to migration setup
- Store model_suffix in instance
- Adjust candidate generation logic
2025-12-20 16:18:41 +08:00
yangdx
c65d606784 Correct comments regarding __post_init__ invocation sources 2025-12-20 16:09:21 +08:00
yangdx
098751773b Refine migration warning messages for PG and Qdrant 2025-12-20 13:24:37 +08:00
yangdx
9726431f50 Improve vector storage logging and migration warnings
- Update missing model suffix warnings
- Clarify migration conflict messages
- Apply changes to PG and Qdrant
2025-12-20 13:17:51 +08:00
yangdx
e596512ba3 Fix __post_init__ usage in Mongo and Qdrant storage implementations
* Remove manual `__post_init__` in `__init__`
* Add `super().__post_init__` in vector DBs
* Ensure base validation runs correctly
* Cleanup Mongo and Qdrant init logic
2025-12-20 12:53:19 +08:00
yangdx
0ac35bfee4 Prevent mutation of shared EmbeddingFunc instances
- Import replace from dataclasses
- Use replace() for embedding func
- Safely wrap priority async func
2025-12-20 12:29:43 +08:00
yangdx
1aa4a3a385 Fix PostgreSQL index lookup failure for long table names
*   Implement safe index name generation
*   Hash table names if index exceeds 63B
*   Fix index detection for long models
*   Define PG identifier limit constant
*   Add tests for index name safety
2025-12-20 05:40:59 +08:00
yangdx
e12dfdb9e0 Bootstrap vector extension before pool creation
- Create standalone bootstrap connection
- Enable vector extension early
- Fix startup failure on fresh DBs
- Ensure vector type exists for pool
2025-12-20 05:14:16 +08:00
yangdx
c81e9c9ef6 Register pgvector codec in pool init for consistent vector handling
- Add init callback to asyncpg pool
- Register vector codec globally
- Remove redundant manual registrations
- Fix non-deterministic codec issues
2025-12-20 04:39:37 +08:00
yangdx
85e8e33573 Fix string vector parsing in PG workspace migration
- Check if content_vector is string
- Parse pgvector string to numpy array
- Fix type mismatch during batch write
2025-12-20 04:31:49 +08:00
yangdx
911585fd22 Refactor Qdrant deletion logic for safety and scalability
- Query entity by payload ID for delete
- Paginate relation deletion loop
- Optimize query payloads and vectors
- Support deleting >1k relations
2025-12-20 04:10:05 +08:00
yangdx
2073f957d7 Add validation for PostgreSQL table name length 2025-12-20 03:54:24 +08:00
yangdx
864131a622 Enforce embedding_func validation in BaseVectorStorage
- Add validation in BaseVectorStorage
- Call super().__post_init__ in subclasses
- Simplify collection suffix logic
2025-12-20 03:49:31 +08:00
yangdx
81a0d632ca feat: add Qdrant legacy data prep tool for migration tests
- Copy workspace data to legacy format
- Remove workspace_id from payloads
- Support dry-run and batch operations
- Verify data before creating targets
- Aid in testing migration logic
2025-12-20 03:04:43 +08:00
yangdx
3456818b0b Wrap inner embedding func to preserve attributes
- Apply wrapper to inner `.func` only
- Preserve `EmbeddingFunc` attributes
- Ensure `model_name` remains accessible
- Fix collection suffix generation
2025-12-20 01:28:26 +08:00
yangdx
dfe628ad0b Use keyset pagination for PostgreSQL migration
- Switch to keyset pagination for migration
- Ensure stable ordering via ID column
- Prevent row skipping or duplication
- Update tests for new query pattern
- Minor doc comment fix in Qdrant
2025-12-20 00:32:40 +08:00
yangdx
93ea50c4aa Restrict Qdrant legacy scroll filter to specific workspace
- Switch filter from `should` to `must`
- Remove `IsNullCondition` for workspace
- Enforce strict workspace ID matching
2025-12-19 23:41:14 +08:00
yangdx
c1ed2e31f8 Handle diverse vector types in Postgres storage
- Support list and tuple return types
- Parse JSON strings for vectors
- Handle numpy arrays via tolist
- Fix vector decoding errors
2025-12-19 23:16:01 +08:00
yangdx
73c3c4135c Drop Python 3.13 from tests and reformat code 2025-12-19 18:15:12 +08:00
yangdx
27863a6019 Suppress empty warning for legacy tables in PostgreSQL if legacy and new table name match 2025-12-19 18:12:06 +08:00
yangdx
4ac5ec4c2f Improve Qdrant workspace detection via payload sampling
- Detect unindexed workspace_id via sample
- Prevent cross-workspace data leakage
- Fix empty workspace warning logic
- Update migration tests for sampling
2025-12-19 18:00:17 +08:00
yangdx
e77a506467 Add workspace filtering to Qdrant legacy migration
* Detect workspace field in legacy schema
* Filter scroll by active workspace
* Recount records for accurate tracking
* Prevent cross-workspace data leakage
* Update payload workspace assignment
2025-12-19 16:45:15 +08:00
yangdx
1c083c6699 Remove redundant pytest.mark.asyncio decorators
- Remove explicit asyncio markers
- Clean up unused imports in tests
2025-12-19 16:00:37 +08:00