fix file path bug still compatiable bug in hnsw search

This commit is contained in:
yichuan520030910320 committed 2025-07-03 02:02:42 +00:00
1 parent 44815ee7fd
commit a627abe794
4 files changed
+5 -5

No files matched your search

@@ -151,7 +151,7 @@ class HNSWBackend(LeannBackendFactoryInterface):
@staticmethod
def searcher(index_path: str, **kwargs) -> LeannBackendSearcherInterface:
path = Path(index_path)
meta_path = path.parent / f"{path.stem}.hnsw.meta.json"
meta_path = path.parent / f"{path.name}.meta.json"
if not meta_path.exists():
raise FileNotFoundError(f"Leann metadata file not found at {meta_path}. Cannot infer vector dimension for searcher.")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.