pyobvector 0.2.21__py3-none-any.whl → 0.2.22__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.
- pyobvector/client/hybrid_search.py +4 -0
- pyobvector/client/ob_vec_client.py +5 -2
- {pyobvector-0.2.21.dist-info → pyobvector-0.2.22.dist-info}/METADATA +2 -2
- {pyobvector-0.2.21.dist-info → pyobvector-0.2.22.dist-info}/RECORD +6 -6
- {pyobvector-0.2.21.dist-info → pyobvector-0.2.22.dist-info}/WHEEL +0 -0
- {pyobvector-0.2.21.dist-info → pyobvector-0.2.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -61,6 +61,8 @@ class HybridSearch(Client):
|
|
|
61
61
|
with self.engine.connect() as conn:
|
|
62
62
|
with conn.begin():
|
|
63
63
|
res = conn.execute(sql, {"index": index, "body_str": body_str}).fetchone()
|
|
64
|
+
if res[0] is None:
|
|
65
|
+
return []
|
|
64
66
|
return json.loads(res[0])
|
|
65
67
|
|
|
66
68
|
def get_sql(
|
|
@@ -84,4 +86,6 @@ class HybridSearch(Client):
|
|
|
84
86
|
with self.engine.connect() as conn:
|
|
85
87
|
with conn.begin():
|
|
86
88
|
res = conn.execute(sql, {"index": index, "body_str": body_str}).fetchone()
|
|
89
|
+
if res[0] is None:
|
|
90
|
+
return ""
|
|
87
91
|
return res[0]
|
|
@@ -65,6 +65,7 @@ class ObVecClient(ObClient):
|
|
|
65
65
|
vidxs: Optional[IndexParams] = None,
|
|
66
66
|
fts_idxs: Optional[list[FtsIndexParam]] = None,
|
|
67
67
|
partitions: Optional[ObPartition] = None,
|
|
68
|
+
**kwargs,
|
|
68
69
|
):
|
|
69
70
|
"""Create table with optional index_params.
|
|
70
71
|
|
|
@@ -75,8 +76,10 @@ class ObVecClient(ObClient):
|
|
|
75
76
|
vidxs (Optional[IndexParams]): optional vector index schema
|
|
76
77
|
fts_idxs (Optional[List[FtsIndexParam]]): optional full-text search index schema
|
|
77
78
|
partitions (Optional[ObPartition]): optional partition strategy
|
|
79
|
+
**kwargs: additional keyword arguments (e.g., mysql_organization='heap')
|
|
78
80
|
"""
|
|
79
81
|
sparse_vidxs = self._get_sparse_vector_index_params(vidxs)
|
|
82
|
+
kwargs.setdefault("extend_existing", True)
|
|
80
83
|
with self.engine.connect() as conn:
|
|
81
84
|
with conn.begin():
|
|
82
85
|
# create table with common index
|
|
@@ -86,14 +89,14 @@ class ObVecClient(ObClient):
|
|
|
86
89
|
self.metadata_obj,
|
|
87
90
|
*columns,
|
|
88
91
|
*indexes,
|
|
89
|
-
|
|
92
|
+
**kwargs,
|
|
90
93
|
)
|
|
91
94
|
else:
|
|
92
95
|
table = ObTable(
|
|
93
96
|
table_name,
|
|
94
97
|
self.metadata_obj,
|
|
95
98
|
*columns,
|
|
96
|
-
|
|
99
|
+
**kwargs,
|
|
97
100
|
)
|
|
98
101
|
if sparse_vidxs is not None and len(sparse_vidxs) > 0:
|
|
99
102
|
create_table_sql = str(CreateTable(table).compile(self.engine))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyobvector
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.22
|
|
4
4
|
Summary: A python SDK for OceanBase Vector Store, based on SQLAlchemy, compatible with Milvus API.
|
|
5
5
|
Project-URL: Homepage, https://github.com/oceanbase/pyobvector
|
|
6
6
|
Project-URL: Repository, https://github.com/oceanbase/pyobvector.git
|
|
@@ -34,7 +34,7 @@ uv sync
|
|
|
34
34
|
- install with pip:
|
|
35
35
|
|
|
36
36
|
```shell
|
|
37
|
-
pip install pyobvector==0.2.
|
|
37
|
+
pip install pyobvector==0.2.22
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Build Doc
|
|
@@ -4,11 +4,11 @@ pyobvector/client/collection_schema.py,sha256=lQTlanxhfZ0W74HUEB7XwvnkwJASxNSsxu
|
|
|
4
4
|
pyobvector/client/enum.py,sha256=3lPjSltITSE694-qOAP4yoX6fzCjKD4WAewmIxFs49o,139
|
|
5
5
|
pyobvector/client/exceptions.py,sha256=UxU05Md2ZGFspZ8pd02B8EAhp8PBbOUJFopa28IwAHI,3777
|
|
6
6
|
pyobvector/client/fts_index_param.py,sha256=owpjerUV4MIxB69dzwMsh7XIosgLB0OXgaLghV7wUYQ,2475
|
|
7
|
-
pyobvector/client/hybrid_search.py,sha256=
|
|
7
|
+
pyobvector/client/hybrid_search.py,sha256=HOva3UMuNsPUJPoL3jyH9YXoeCp1FgFPqumJ6XOE44U,2695
|
|
8
8
|
pyobvector/client/index_param.py,sha256=Tbu_-qg4SIXIzn1qpTg8Zl1L_RCXCUAEsZPKsA0LsNY,7062
|
|
9
9
|
pyobvector/client/milvus_like_client.py,sha256=waOqsgGtc5FSEM-BECBGCa6m81d_Pxf1r40LFU-LrmE,27875
|
|
10
10
|
pyobvector/client/ob_client.py,sha256=BsWCEGR30Klf2OUe88qLhBm7jRPBkgfjylQoy7B8EkM,16975
|
|
11
|
-
pyobvector/client/ob_vec_client.py,sha256=
|
|
11
|
+
pyobvector/client/ob_vec_client.py,sha256=k7yRsc2u51kpLQGAxa4dFaKCZRowcqUdZYITVQwiu6Q,20365
|
|
12
12
|
pyobvector/client/ob_vec_json_table_client.py,sha256=NFj7-1AQpTMk5XllecAgTKSGAq8qMIa36FM2cuhd_fQ,39605
|
|
13
13
|
pyobvector/client/partitions.py,sha256=CfkSe0ftb0jbdgdvNF9_SvXxcDhpOoS3pe7ezMeNI0c,15615
|
|
14
14
|
pyobvector/client/schema_type.py,sha256=gH2YiBsgkryo-R0GB_NYuRXMvzvrSjOamZTy6pwn2n0,1673
|
|
@@ -34,7 +34,7 @@ pyobvector/util/__init__.py,sha256=-opvZ4Ya0ByTAhls06547-zW3vkdYRkUH6W5OCKUHD4,3
|
|
|
34
34
|
pyobvector/util/ob_version.py,sha256=69me12REWn_T6oi7XjVAF_Dfq_iiaEVZjiHdjog57zs,1518
|
|
35
35
|
pyobvector/util/sparse_vector.py,sha256=1IG0CRYfC2z39nGwuG43TImQkWiuPAXOlOnYqJ1hA-o,1275
|
|
36
36
|
pyobvector/util/vector.py,sha256=58glSQqjOSTrGyNhUEIrs9r4F9oaYO_SdPNhMfbSnWs,2392
|
|
37
|
-
pyobvector-0.2.
|
|
38
|
-
pyobvector-0.2.
|
|
39
|
-
pyobvector-0.2.
|
|
40
|
-
pyobvector-0.2.
|
|
37
|
+
pyobvector-0.2.22.dist-info/METADATA,sha256=j272Pr5O4p-Ce2rxA12LAkj2jziRwV6MbqRxhOtB74U,14120
|
|
38
|
+
pyobvector-0.2.22.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
39
|
+
pyobvector-0.2.22.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
|
|
40
|
+
pyobvector-0.2.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|