leansearch 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- leansearch/__init__.py +19 -0
- leansearch/_collection.py +797 -0
- leansearch/_db.py +306 -0
- leansearch/_fusion.py +51 -0
- leansearch/_table.py +47 -0
- leansearch/_vectors.py +154 -0
- leansearch-0.1.0.dist-info/METADATA +21 -0
- leansearch-0.1.0.dist-info/RECORD +10 -0
- leansearch-0.1.0.dist-info/WHEEL +4 -0
- leansearch-0.1.0.dist-info/licenses/LICENSE +21 -0
leansearch/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""leansearch: embedded full-text and vector search in one library.
|
|
2
|
+
|
|
3
|
+
from leansearch import LeanSearch
|
|
4
|
+
|
|
5
|
+
with LeanSearch("data") as db:
|
|
6
|
+
docs = db["articles"]
|
|
7
|
+
docs.add("The quick brown fox", id="a1", vector=embedding, metadata={"lang": "en"})
|
|
8
|
+
docs.search("quick fox") # full-text (BM25)
|
|
9
|
+
docs.search(vector=query_embedding) # vector
|
|
10
|
+
docs.search("quick fox", vector=query_embedding) # both, fused
|
|
11
|
+
|
|
12
|
+
Built on leanvec-scale (vectors) and leantext (text); their stores open unchanged.
|
|
13
|
+
"""
|
|
14
|
+
from ._collection import Collection, Snapshot
|
|
15
|
+
from ._db import LeanSearch
|
|
16
|
+
from ._table import Table
|
|
17
|
+
|
|
18
|
+
__version__ = "0.1.0"
|
|
19
|
+
__all__ = ["LeanSearch", "Collection", "Snapshot", "Table", "__version__"]
|