Update lancedb to 0.37.1
The newest release with wheels for every supported platform: 0.38.0 publishes none for x86_64 Linux or Windows. The zero-coverage FTS scan path is still broken at 0.37.1, so the guard, prevention and repair carry unchanged. ensure_indexes names the index it declares, keeping replace deterministic on 0.38+, where an unnamed create_index builds a suffixed sibling instead of replacing a different-typed index. An invalid search filter raises ValueError.
This commit is contained in:
parent
02bccb1b90
commit
e49f4264d3
7 changed files with 21 additions and 12 deletions
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- lancedb 0.37.1.
|
||||
- An invalid search `filter` raises `ValueError`.
|
||||
|
||||
### Added
|
||||
|
||||
- `--full-citations` on `haiku-rag ask` and `haiku-rag analyze` renders citation
|
||||
|
|
|
|||
|
|
@ -198,7 +198,10 @@ async def ensure_indexes(table: lancedb.AsyncTable, table_name: str) -> list[str
|
|||
f"Adding {declared} index on {table_name}.{column}, which carries "
|
||||
f"{', '.join(sorted(present))}"
|
||||
)
|
||||
await table.create_index(column, config=config, replace=True)
|
||||
# Replace matches on the index name.
|
||||
await table.create_index(
|
||||
column, config=config, replace=True, name=f"{column}_idx"
|
||||
)
|
||||
applied.append(column)
|
||||
return applied
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ dependencies = [
|
|||
"httpx>=0.28.1",
|
||||
"jinja2>=3.1.0",
|
||||
"fastmcp>=3.3.0",
|
||||
"lancedb==0.34.0",
|
||||
"lancedb==0.37.1",
|
||||
"pathspec>=1.0.4",
|
||||
"pydantic>=2.12.5",
|
||||
"pydantic-ai-slim[openai,logfire,ag-ui]>=2.18.0,<3.0.0",
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ async def test_ensure_indexes_corrects_an_index_of_the_wrong_type(temp_db_path):
|
|||
"""A wrong-typed index does not satisfy the declared one."""
|
||||
async with Store(temp_db_path, create=True) as store:
|
||||
table = store.document_items_table
|
||||
await table.create_index("label", config=BTree(), replace=True)
|
||||
await table.create_index(
|
||||
"label", config=BTree(), replace=True, name="label_idx"
|
||||
)
|
||||
assert await _index_type(table, "label") == "BTree"
|
||||
|
||||
await ensure_indexes(table, "document_items")
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ async def test_replaces_a_wrong_typed_legacy_index(temp_db_path):
|
|||
"""A BTree on `label` does not satisfy the declared Bitmap."""
|
||||
async with Store(temp_db_path, create=True, skip_migration_check=True) as store:
|
||||
await store.document_items_table.create_index(
|
||||
"label", config=BTree(), replace=True
|
||||
"label", config=BTree(), replace=True, name="label_idx"
|
||||
)
|
||||
|
||||
await _apply_index_hot_lookup_keys(store)
|
||||
|
|
|
|||
|
|
@ -157,8 +157,7 @@ async def test_search_with_invalid_filter(temp_db_path):
|
|||
title="Test Document",
|
||||
)
|
||||
|
||||
# Invalid filter should raise RuntimeError
|
||||
with pytest.raises(RuntimeError, match="No field named invalid"):
|
||||
with pytest.raises(ValueError, match="No field named invalid"):
|
||||
await client.search("test", limit=5, filter="invalid = 'value'")
|
||||
|
||||
|
||||
|
|
|
|||
12
uv.lock
12
uv.lock
|
|
@ -1759,7 +1759,7 @@ requires-dist = [
|
|||
{ name = "haiku-rag-slim", extras = ["s3"], marker = "extra == 'ingester'", editable = "haiku_rag_slim" },
|
||||
{ name = "httpx", specifier = ">=0.28.1" },
|
||||
{ name = "jinja2", specifier = ">=3.1.0" },
|
||||
{ name = "lancedb", specifier = "==0.34.0" },
|
||||
{ name = "lancedb", specifier = "==0.37.1" },
|
||||
{ name = "obstore", marker = "extra == 's3'", specifier = ">=0.9,<0.10" },
|
||||
{ name = "opencv-python-headless", marker = "extra == 'docling'", specifier = ">=4.6.0.66,<5.0.0.0" },
|
||||
{ name = "pathspec", specifier = ">=1.0.4" },
|
||||
|
|
@ -2261,7 +2261,7 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "lancedb"
|
||||
version = "0.34.0"
|
||||
version = "0.37.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "deprecation" },
|
||||
|
|
@ -2273,10 +2273,10 @@ dependencies = [
|
|||
{ name = "tqdm" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/df/f7/5262b9aa593f790757163c0165ab0da1dda054758901bea7e4f02c9cb633/lancedb-0.34.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:c462f2e6f933cad659fd0179394eaab578acbc9151fe2ef41bc29b36ecca5058", size = 52654213, upload-time = "2026-07-02T17:13:31.102Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/69/99/05ea0d32229ebea695193ff20c15d6ecae25785ad82a9d4723d98832a284/lancedb-0.34.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:48829e88e708947d0520454ab9e4f8efa35f3e3626469eadd3a6e061b89cb223", size = 55434501, upload-time = "2026-07-02T17:13:34.81Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cd/4e/4325c13d5afa93c466428a5a0f168ad4d96f5eb4a77bbe7c5100d39c9897/lancedb-0.34.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:05ba8a5b58e064edfbe5be71b1abf2e411b4eaf295d1a173dcb1a55c5bfb5285", size = 58659359, upload-time = "2026-07-02T17:13:38.424Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d9/5d/8ca165f1386caf6c4d1c515afd52f345b66432264eecfdfb7fd33eefd9af/lancedb-0.34.0-cp39-abi3-win_amd64.whl", hash = "sha256:51cbc11808f9e3332819b9367c975b3a888541447a8e7bea09c57c852a279153", size = 63530726, upload-time = "2026-07-02T17:13:41.612Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/23/2f/4ddcab82bb618c6c8de00725f3cf59585dcb9040964dde13cb0cae6ed3cd/lancedb-0.37.1-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:c15c46f23cf6959c79fb93cdba2c76536cf784d3134386662da03dc6ccac3c26", size = 58474767, upload-time = "2026-08-10T10:41:45.675Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e5/5e/dac0fd9478a21685444f23e6ec937babf4ff48b1616b68e8137778d6ecb9/lancedb-0.37.1-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:35d872d920cbfdc3771fbcd33f2c63bff6ff7203d6d2ba8fe4330e98eb859d12", size = 61666580, upload-time = "2026-08-10T10:41:49.535Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/fa/ee1cdb1e904872d75fa0ff44ad35cd23494e810299c33e68de0687de7a71/lancedb-0.37.1-cp310-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:86597f4dbc51a33a07341550dc77d21a1ddd1f7539266eda5bb64c4f3bd11cca", size = 64802395, upload-time = "2026-08-10T10:41:52.969Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/42/55/65c69307373b7f05dea38465b7d3836c86390f0ebc79b5c56d2c0919f229/lancedb-0.37.1-cp310-abi3-win_amd64.whl", hash = "sha256:488eca15361dfc34439500c9e2607c4fb2b8bf190fa1003bd54b1d6eb40e0316", size = 70994296, upload-time = "2026-08-10T10:41:56.609Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
Loading…
Reference in a new issue