pyobvector 0.2.22__py3-none-any.whl → 0.2.24__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.
Files changed (41) hide show
  1. pyobvector/__init__.py +6 -5
  2. pyobvector/client/__init__.py +5 -4
  3. pyobvector/client/collection_schema.py +5 -1
  4. pyobvector/client/enum.py +1 -1
  5. pyobvector/client/exceptions.py +9 -7
  6. pyobvector/client/fts_index_param.py +8 -4
  7. pyobvector/client/hybrid_search.py +10 -4
  8. pyobvector/client/index_param.py +56 -41
  9. pyobvector/client/milvus_like_client.py +71 -54
  10. pyobvector/client/ob_client.py +20 -16
  11. pyobvector/client/ob_vec_client.py +47 -40
  12. pyobvector/client/ob_vec_json_table_client.py +366 -274
  13. pyobvector/client/partitions.py +81 -39
  14. pyobvector/client/schema_type.py +3 -1
  15. pyobvector/json_table/__init__.py +4 -3
  16. pyobvector/json_table/json_value_returning_func.py +12 -10
  17. pyobvector/json_table/oceanbase_dialect.py +15 -8
  18. pyobvector/json_table/virtual_data_type.py +47 -28
  19. pyobvector/schema/__init__.py +7 -1
  20. pyobvector/schema/array.py +6 -2
  21. pyobvector/schema/dialect.py +4 -0
  22. pyobvector/schema/full_text_index.py +8 -3
  23. pyobvector/schema/geo_srid_point.py +5 -2
  24. pyobvector/schema/gis_func.py +23 -11
  25. pyobvector/schema/match_against_func.py +10 -5
  26. pyobvector/schema/ob_table.py +2 -0
  27. pyobvector/schema/reflection.py +25 -8
  28. pyobvector/schema/replace_stmt.py +4 -0
  29. pyobvector/schema/sparse_vector.py +7 -4
  30. pyobvector/schema/vec_dist_func.py +22 -9
  31. pyobvector/schema/vector.py +3 -1
  32. pyobvector/schema/vector_index.py +7 -3
  33. pyobvector/util/__init__.py +1 -0
  34. pyobvector/util/ob_version.py +2 -0
  35. pyobvector/util/sparse_vector.py +9 -6
  36. pyobvector/util/vector.py +2 -0
  37. {pyobvector-0.2.22.dist-info → pyobvector-0.2.24.dist-info}/METADATA +13 -14
  38. pyobvector-0.2.24.dist-info/RECORD +40 -0
  39. {pyobvector-0.2.22.dist-info → pyobvector-0.2.24.dist-info}/licenses/LICENSE +1 -1
  40. pyobvector-0.2.22.dist-info/RECORD +0 -40
  41. {pyobvector-0.2.22.dist-info → pyobvector-0.2.24.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobvector
3
- Version: 0.2.22
3
+ Version: 0.2.24
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.22
37
+ pip install pyobvector==0.2.24
38
38
  ```
39
39
 
40
40
  ## Build Doc
@@ -154,8 +154,8 @@ client.create_table(test_collection_name, columns=cols, partitions=range_part)
154
154
 
155
155
  # create vector index
156
156
  client.create_index(
157
- test_collection_name,
158
- is_vec_index=True,
157
+ test_collection_name,
158
+ is_vec_index=True,
159
159
  index_name='vidx',
160
160
  column_names=['embedding'],
161
161
  vidx_params='distance=l2, type=hnsw, lib=vsag',
@@ -179,8 +179,8 @@ client.insert(test_collection_name, data=data1)
179
179
  ```python
180
180
  # perform ann search with basic column selection
181
181
  res = self.client.ann_search(
182
- test_collection_name,
183
- vec_data=[0,0,0],
182
+ test_collection_name,
183
+ vec_data=[0,0,0],
184
184
  vec_column_name='embedding',
185
185
  distance_func=l2_distance,
186
186
  topk=5,
@@ -194,8 +194,8 @@ from sqlalchemy import Table, text, func
194
194
 
195
195
  table = Table(test_collection_name, client.metadata_obj, autoload_with=client.engine)
196
196
  res = self.client.ann_search(
197
- test_collection_name,
198
- vec_data=[0,0,0],
197
+ test_collection_name,
198
+ vec_data=[0,0,0],
199
199
  vec_column_name='embedding',
200
200
  distance_func=l2_distance,
201
201
  topk=5,
@@ -211,8 +211,8 @@ res = self.client.ann_search(
211
211
 
212
212
  # perform ann search with distance threshold (filter results by distance)
213
213
  res = self.client.ann_search(
214
- test_collection_name,
215
- vec_data=[0,0,0],
214
+ test_collection_name,
215
+ vec_data=[0,0,0],
216
216
  vec_column_name='embedding',
217
217
  distance_func=l2_distance,
218
218
  with_dist=True,
@@ -230,17 +230,17 @@ res = self.client.ann_search(
230
230
  The `ann_search` method supports flexible output column selection through the `output_columns` parameter:
231
231
 
232
232
  - **`output_columns`** (recommended): Accepts SQLAlchemy Column objects, expressions, or a mix of both
233
-
233
+
234
234
  - Column objects: `table.c.id`, `table.c.name`
235
235
  - Expressions: `(table.c.age + 10).label('age_plus_10')`
236
236
  - JSON queries: `text("JSON_EXTRACT(meta, '$.key') as extracted_key")`
237
237
  - String functions: `func.concat(table.c.name, ' (', table.c.age, ')').label('name_age')`
238
238
  - **`output_column_names`** (legacy): Accepts list of column name strings
239
-
239
+
240
240
  - Example: `['id', 'name', 'meta']`
241
241
  - **Parameter Priority**: `output_columns` takes precedence over `output_column_names` when both are provided
242
242
  - **`distance_threshold`** (optional): Filter results by distance threshold
243
-
243
+
244
244
  - Type: `Optional[float]`
245
245
  - Only returns results where `distance <= threshold`
246
246
  - Example: `distance_threshold=0.5` returns only results with distance <= 0.5
@@ -449,4 +449,3 @@ You can also get the actual SQL that will be executed:
449
449
  sql = client.get_sql(index=test_table_name, body=body)
450
450
  print(sql) # prints the SQL query
451
451
  ```
452
-
@@ -0,0 +1,40 @@
1
+ pyobvector/__init__.py,sha256=Ur4UWHyd99542N5t7mla_BTn-lORaMUEGF3T1qoONyU,3884
2
+ pyobvector/client/__init__.py,sha256=S-RoCP3Jou0Z_YhUMKtwYM-p_ibSwQ7hcouXZSb_5ZM,2816
3
+ pyobvector/client/collection_schema.py,sha256=vFrANKrZPQ7bzRMQPwb9H2laN3T7LSNE2Q8Eubindps,5532
4
+ pyobvector/client/enum.py,sha256=TOgekIp4HYKAn7BUh_omkiQcnm7ZxEV1sSf8bMBib-Q,136
5
+ pyobvector/client/exceptions.py,sha256=dwRujUZNA61UosWpCVaMF8O9iy6hf_SYed9R_cTD78k,3765
6
+ pyobvector/client/fts_index_param.py,sha256=dWlj-DhBP8WyvPTyXQzPgJCNFFUuydp09Wuw52mV3RQ,2451
7
+ pyobvector/client/hybrid_search.py,sha256=32ZA8lwVLCNGVHe_uEDQBaEQzrudw7zVl0KVXRqX8sc,2780
8
+ pyobvector/client/index_param.py,sha256=dnXqI95MnwFrnAUSuwspb2GZ6y3VN6X4AYQdLAH6RDE,7125
9
+ pyobvector/client/milvus_like_client.py,sha256=lXmQhMXXtb_9txU7r49Ujc-uR52EEMUHKKXoGtOtMRw,28078
10
+ pyobvector/client/ob_client.py,sha256=KhcyOI_uR1Ejj-zhf6LWizglkaYMD-q_mOXOqIj0wVo,17048
11
+ pyobvector/client/ob_vec_client.py,sha256=FgIdDV2RfJXUAKpFqaHRuK8r8LWRUv_ScKXJoI0tk4I,20860
12
+ pyobvector/client/ob_vec_json_table_client.py,sha256=09Hyq865ja8sZ8Og-It4pXsU6gTrbbikKOhfKwTgU4A,41093
13
+ pyobvector/client/partitions.py,sha256=iwYrewDH0-1QaHyqYUqFtn8gZnECvaRcP7vptDrtvAY,15940
14
+ pyobvector/client/schema_type.py,sha256=I43WOXo5wDesXqq-GXokW10f-0n7WVxKY2qxXTmCMYA,1671
15
+ pyobvector/json_table/__init__.py,sha256=lskxGTDGsJ0gtJhGcCC0uo-_dfI3rYVRr0TavJudpck,560
16
+ pyobvector/json_table/json_value_returning_func.py,sha256=Yb7HfhuE4w0CbnDQBoTqllCbsUj0os5DZzKGLWUt8tg,1813
17
+ pyobvector/json_table/oceanbase_dialect.py,sha256=g3Ggh1fAmNYFYvK1VRHHlmPiYazuC_3LG4Gi0oQ0H0E,4552
18
+ pyobvector/json_table/virtual_data_type.py,sha256=DiN3uNhZte2B2C50r8HWg1Cxt3R_LxDAUB9lNBW0wsQ,3634
19
+ pyobvector/schema/__init__.py,sha256=Z0ICy6wGEhKEkbt_EThyQMExGZfpG5BddDZFeua2Vqg,2427
20
+ pyobvector/schema/array.py,sha256=oGt_NZt5EfpNL4hmRx4_6mH2myzvIPepjbAVU8URryo,4207
21
+ pyobvector/schema/dialect.py,sha256=qiPcmOCk0SXAt0kvwUQfx41Hwihhg78nbtMigHNY2Rs,2003
22
+ pyobvector/schema/full_text_index.py,sha256=vZfP43uUPclJ7BfHtzuYCykt2MlG8CbSD8jS1ooP_hQ,2065
23
+ pyobvector/schema/geo_srid_point.py,sha256=z7pPNX96cIAp66yo8rWRGwLtpOJ-Xbw0W7RmHeUjwNg,1208
24
+ pyobvector/schema/gis_func.py,sha256=eHqMe_cQ_YuKA3g_0HuGOEt41l31RHaCFYmX8ToFT9c,3095
25
+ pyobvector/schema/match_against_func.py,sha256=sdsUqZCRScPhUK3OTekGwSTElbQZrUzIw4qA6sRqqd8,1344
26
+ pyobvector/schema/ob_table.py,sha256=cXNwxJyfkZ6FAMkDUYoyJ4iTaKAi7ruh-lc-uJB5AFM,394
27
+ pyobvector/schema/reflection.py,sha256=bYz2PngVvt2kw8hac1ARFKlFbAvL1uxvGuQW9EgwKqw,6112
28
+ pyobvector/schema/replace_stmt.py,sha256=o6t_HnqgIkd1cLFD10ugMe4FimIDlVdIsh-GYHkSwck,564
29
+ pyobvector/schema/sparse_vector.py,sha256=grEMN0q1RQy5NDD5xliI6MP49AnXPQJG2ZHxnT0CtvU,1058
30
+ pyobvector/schema/vec_dist_func.py,sha256=nEZXrl6VYTXfbSwoNKrTPsGK7tppZoBVdRKzbV6BXBc,3001
31
+ pyobvector/schema/vector.py,sha256=z7Y1z0iSuI1lhCdwfJ1wT7OGlzS_L-3s16tC_Q4Y7jQ,1123
32
+ pyobvector/schema/vector_index.py,sha256=Rpr380ISJsn7UJEkoJps-3W7fai_Iea3dXRKo6MiZyA,2243
33
+ pyobvector/util/__init__.py,sha256=9vwVlbJVZt2PcQARInlnVCxfoFCvUnKit6RdNjUKJ44,389
34
+ pyobvector/util/ob_version.py,sha256=UXWo2ZH9ONHkWSC3dlFzvvtYno9Nc7sK2cUXCAgiaO4,1520
35
+ pyobvector/util/sparse_vector.py,sha256=5ibwd9Uy2zNVDrHxnq2tBSqxIV2uMe5zIauQhp-w0s0,1255
36
+ pyobvector/util/vector.py,sha256=648vxhQHk7hP6C-k105V3a6yH-tHUnC7S7ooR38ubb0,2394
37
+ pyobvector-0.2.24.dist-info/METADATA,sha256=xpwDOwznOTNphBORtU9gg2pKUouKVFWgm8PGqkBop0E,14105
38
+ pyobvector-0.2.24.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
39
+ pyobvector-0.2.24.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
40
+ pyobvector-0.2.24.dist-info/RECORD,,
@@ -199,4 +199,4 @@
199
199
  distributed under the License is distributed on an "AS IS" BASIS,
200
200
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
201
  See the License for the specific language governing permissions and
202
- limitations under the License.
202
+ limitations under the License.
@@ -1,40 +0,0 @@
1
- pyobvector/__init__.py,sha256=5RtWI_ol3qxj_m7UXTQzByTmGZdIiQ0yyCyHZUhRDas,3888
2
- pyobvector/client/__init__.py,sha256=fDK2FVdSm3-XCwTqsam7zisic5UMhANUq97r29i27nc,2819
3
- pyobvector/client/collection_schema.py,sha256=lQTlanxhfZ0W74HUEB7XwvnkwJASxNSsxurXCvMv8nw,5532
4
- pyobvector/client/enum.py,sha256=3lPjSltITSE694-qOAP4yoX6fzCjKD4WAewmIxFs49o,139
5
- pyobvector/client/exceptions.py,sha256=UxU05Md2ZGFspZ8pd02B8EAhp8PBbOUJFopa28IwAHI,3777
6
- pyobvector/client/fts_index_param.py,sha256=owpjerUV4MIxB69dzwMsh7XIosgLB0OXgaLghV7wUYQ,2475
7
- pyobvector/client/hybrid_search.py,sha256=HOva3UMuNsPUJPoL3jyH9YXoeCp1FgFPqumJ6XOE44U,2695
8
- pyobvector/client/index_param.py,sha256=Tbu_-qg4SIXIzn1qpTg8Zl1L_RCXCUAEsZPKsA0LsNY,7062
9
- pyobvector/client/milvus_like_client.py,sha256=waOqsgGtc5FSEM-BECBGCa6m81d_Pxf1r40LFU-LrmE,27875
10
- pyobvector/client/ob_client.py,sha256=BsWCEGR30Klf2OUe88qLhBm7jRPBkgfjylQoy7B8EkM,16975
11
- pyobvector/client/ob_vec_client.py,sha256=k7yRsc2u51kpLQGAxa4dFaKCZRowcqUdZYITVQwiu6Q,20365
12
- pyobvector/client/ob_vec_json_table_client.py,sha256=NFj7-1AQpTMk5XllecAgTKSGAq8qMIa36FM2cuhd_fQ,39605
13
- pyobvector/client/partitions.py,sha256=CfkSe0ftb0jbdgdvNF9_SvXxcDhpOoS3pe7ezMeNI0c,15615
14
- pyobvector/client/schema_type.py,sha256=gH2YiBsgkryo-R0GB_NYuRXMvzvrSjOamZTy6pwn2n0,1673
15
- pyobvector/json_table/__init__.py,sha256=X5MmK3f10oyJleUUFZJFeunMEfzmf6P1f_7094b-FZc,554
16
- pyobvector/json_table/json_value_returning_func.py,sha256=fW5Rk5vrVfyTPJPciPyb64A0CqSJBwBS-PYbcS9LhOY,1815
17
- pyobvector/json_table/oceanbase_dialect.py,sha256=lxpbWBQdK18LWXLmGyk_-ODv6VfnwGLHbcpsQMElOUo,4480
18
- pyobvector/json_table/virtual_data_type.py,sha256=ALffzZgByEwMsC-JdL_iEW3kwJcfqNGaNSIY645oUfo,3456
19
- pyobvector/schema/__init__.py,sha256=OMn7Cd2E8o_tm2ArbAXS_zRbiDW2sj7YKPLnbpmaueg,2405
20
- pyobvector/schema/array.py,sha256=YiGIyALN1_XxWuz9YyuiqhpyRN1DIu9n286vq6O09_U,4181
21
- pyobvector/schema/dialect.py,sha256=6D9A7Niqig2mwK7C8sP7mCP7kYr5be2jV0xqL87mlz4,1999
22
- pyobvector/schema/full_text_index.py,sha256=ohQX8uTPdRswEJONuN5A-bNv203d0N0b2BsJ7etx71g,2071
23
- pyobvector/schema/geo_srid_point.py,sha256=BZuiySoemvtLBPYoZ_BRQT4Gd7fcU1C2xdQfkxpb0OQ,1203
24
- pyobvector/schema/gis_func.py,sha256=sDhD701I45sRCXNY_E20ujjxe0ldAXofd6kTAhMW12g,3093
25
- pyobvector/schema/match_against_func.py,sha256=ExTQJvAXHaZwBo1Sjy6IlnF1nF6D9xGUsF4f7zaP8Q0,1336
26
- pyobvector/schema/ob_table.py,sha256=wlb6Oo9LG-sr8XnG_wbX1Qi5CgnS0XUzNL5qTdsncoY,392
27
- pyobvector/schema/reflection.py,sha256=guS74lW1wzBOCv5FWeXS1a_KnS-5Md9C_dYaNqiK2yA,5903
28
- pyobvector/schema/replace_stmt.py,sha256=FtGLXHz6DwzD0FOZPn1EZgXdbHZu-K9HIHS02rZqYrE,560
29
- pyobvector/schema/sparse_vector.py,sha256=ojqUrvKUnxQE8FErB2B58KO540otOJBqiPTMlwcUW2M,1061
30
- pyobvector/schema/vec_dist_func.py,sha256=4GAWSrhFNDYooBpbBg604wDrByPrewp46Y4VeoDxV7Y,2986
31
- pyobvector/schema/vector.py,sha256=dFKfPcTOto0jNxVjhvDmJM7Q4wwp6Z-HcZ3K6oZxUMc,1120
32
- pyobvector/schema/vector_index.py,sha256=D1ZnhJEObWUCd9ESO57KN1ctl10tkEIH_gV0kwGrvu8,2250
33
- pyobvector/util/__init__.py,sha256=-opvZ4Ya0ByTAhls06547-zW3vkdYRkUH6W5OCKUHD4,388
34
- pyobvector/util/ob_version.py,sha256=69me12REWn_T6oi7XjVAF_Dfq_iiaEVZjiHdjog57zs,1518
35
- pyobvector/util/sparse_vector.py,sha256=1IG0CRYfC2z39nGwuG43TImQkWiuPAXOlOnYqJ1hA-o,1275
36
- pyobvector/util/vector.py,sha256=58glSQqjOSTrGyNhUEIrs9r4F9oaYO_SdPNhMfbSnWs,2392
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,,