-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: HTTP API support #779
Comments
#770 List databases |
Duplicated with #786 |
Drop table/Show variables |
### What problem does this PR solve? Add http service API - [x] Create database - [x] Drop database Issue link: #779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: chrysanthemum-boy <fannc@qq.com>
I want try to implement Create index/Drop index/ Show index |
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ Add http service API - [x] List indexes of a specified table eg: curl --request GET --url localhost:23820/indexes/default/test_index --header 'accept: application/json', and the result : ``` { "error_code": 0, "db_name": "default", "table_name": "test_index", "indexes": [ { "column_id": "0", "column_name": "col1", "index segments": "0/0", "index_name": "idx1", "index_type": "IVFFlat", "other_parameters": "metric = l2, centroids_count = 128", "path": "/tmp/infinity/data/97PHM4Cobx_db_default/xT2aqC2SQ3_table_test_index/eVINACIkLj_index_idx1" }, { "column_id": "0", "column_name": "col1", "index segments": "0/0", "index_name": "idx2", "index_type": "HNSW", "other_parameters": "metric = l2, encode_type = plain, M = 16, ef_construction = 50, ef = 50", "path": "/tmp/infinity/data/97PHM4Cobx_db_default/xT2aqC2SQ3_table_test_index/TTOELZEonq_index_idx2" } ] } ``` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? Add HTTP API service of Create table and Drop table. - [x] Create table - [x] Drop table Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: chrysanthemum-boy <fannc@qq.com>
### What problem does this PR solve? -[x] Show variable. eg. curl --request GET \ --url localhost:23820/variables/time_zone \ --header 'accept: application/json' `{"error_code":0,"variable_name":"time_zone","variable_value":"UTC-8"}` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve? Update HTTP API service, add a function test for show database. - [x] Show table - [x] List table Issue link:#829 #779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) - [x] Test cases --------- Co-authored-by: chrysanthemum-boy <fannc@qq.com>
### What problem does this PR solve? Add extra information in show output data structure Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? HTTP API: create index and drop index - [x] Create index - [x] Drop index Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? Add HTTP API: Delete ``` infiniflow=> select * from t1; c1 ---- 3 5 3 5 3 5 (6 rows) ``` ``` curl --request DELETE --url localhost:23820/databases/default/tables/t1/docs --header 'accept: application/json' --header 'content-type: application/json' --data ' { "filter": "c1 = 3" } ' {"delete_row_count":3,"error_code":0} ``` ``` infiniflow=> select * from t1; c1 ---- 5 5 5 (3 rows) ``` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? ``` infiniflow=> select * from t1; c1 | c2 ----+---- 2 | 2 3 | 3 4 | 4 5 | 5 ``` ``` curl --request PUT --url localhost:23820/databases/default/tables/t1/docs --header 'accept: application/json' --header 'content-type: application/json' --data ' { "update": { "c2": 5 }, "filter": "c1 = 3" } ' ``` ``` infiniflow=> select * from t1; c1 | c2 ----+---- 2 | 2 4 | 4 5 | 5 3 | 5 (4 rows) ``` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? 1. Filter, output, knn is OK. But output vector and match doens't work. 2. Fix hello_infinity.py Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? ``` curl --request GET --url localhost:23820/databases/default/tables/my_table/docs --header 'accept: application/json' --header 'content-type: application/json' --data ' { "output": [ "num", "body", "vec" ], "fusion": { "method": "rrf", "match": { "fields": "body", "query": "bloom", "operator": "topn=3" }, "knn": { "fields": "vec", "query_vector": [3.0, 2.8, 2.7, 3.1], "element_type": "float", "top_k": 3, "metric_type": "inner_product" } } } ' ``` ``` { "error_code":0, "output":[{"body":"Office for Harmful Blooms","num":"2","vec":"4.000000, 4.200000, 4.300000, 4.500000"},{"body":"unnecessary and harmful","num":"1","vec":"1.000000, 1.200000, 0.800000, 0.900000"}] } ``` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
I want to implement segment related interfaces. Currently. segments info and single detailed segment info are both provided by ExecuteShowSegments method, which is inflexible to list more segment details. A seperate Implementation (using ExecuteShowSegments and ExecuteShowSegmentDetail ) is better ,i think . And the same goes for block info display. @JinHai-CN |
### What problem does this PR solve? HTTP API: SHOW SEGMENT Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? HTTP API: SHOW SEGMENT Issue link:infiniflow#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? HTTP API: SHOW SEGMENT Issue link:infiniflow#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? Show specific block of segment Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ - [x] List segments of a table - [x] List blocks of a segment Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: morphes1995 <morphes1995@gmail.com>
### What problem does this PR solve? HTTP API: Import data ``` curl --request PUT --url localhost:23820/databases/default/tables/t1 --header 'accept: application/json' --header 'content-type: application/json' --data ' { "file_path":"/tmp/infinity/test_data/pysdk_test_commas.csv", "file_type":"csv", "header":false, "delimiter":"," } ' {"error_code":0} ``` Issue link:#779 ### Type of change - [x] New Feature (non-breaking change which adds functionality) Signed-off-by: Jin Hai <haijin.chn@gmail.com>
### What problem does this PR solve? add http_api_test Issue link:#779 ### Type of change - [x] Test cases --------- Co-authored-by: chrysanthemum-boy <fannc@qq.com> Co-authored-by: chrysanthemum-boy <69421435+chrysanthemum-boy@users.noreply.github.com>
Describe the feature you'd like
Infinity needs HTTP API to support, detailed API design, please follow HTTP API
The text was updated successfully, but these errors were encountered: