Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into md5_1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ami11111 committed Oct 17, 2024
2 parents 53cdf09 + 4b21d50 commit 3fd63b3
Show file tree
Hide file tree
Showing 76 changed files with 1,951 additions and 284 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Supports a wide range of data types including strings, numerics, vectors, and mo
Infinity supports two working modes, embedded mode and client-server mode. Infinity's embedded mode enables you to quickly embed Infinity into your Python applications, without the need to connect to a separate backend server. The following shows how to operate in embedded mode:

```bash
pip install infinity-embedded-sdk==0.4.0.dev5
pip install infinity-embedded-sdk==0.4.0
```
1. Use Infinity to conduct a dense vector search:
```python
Expand Down
2 changes: 1 addition & 1 deletion benchmark/remote_infinity/remote_query_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct InfinityClient {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(22); // 0.4.0.dev5
request.__set_client_version(22); // 0.4.0.dev5 and 0.4.0
client->Connect(response, request);
session_id = response.session_id;
}
Expand Down
2 changes: 1 addition & 1 deletion client/cpp/infinity_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Client Client::Connect(const std::string &ip_address, uint16_t port) {
transport->open();
CommonResponse response;
ConnectRequest request;
request.__set_client_version(22); // 0.4.0.dev5
request.__set_client_version(22); // 0.4.0.dev5 and 0.4.0
client->Connect(response, request);
return {socket, transport, protocol, std::move(client), response.session_id};
}
Expand Down
6 changes: 3 additions & 3 deletions docs/getstarted/build_from_source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.4.0.dev5
pip install infinity-sdk==0.4.0
```

3. Run the functional tests:
Expand All @@ -282,7 +282,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.4.0.dev5
pip install infinity-sdk==0.4.0
```

3. Run the functional tests:
Expand All @@ -305,7 +305,7 @@ cmake --build . -t test_main

2. Install Python sdk of infinity:
```bash
pip install infinity-sdk==0.4.0.dev5
pip install infinity-sdk==0.4.0
```

3. Run the functional tests:
Expand Down
10 changes: 5 additions & 5 deletions docs/getstarted/deploy_infinity_server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This approach allows you to call Infinity as a Python module. To deploy Infinity
### Install Infinity as a module

```
pip install infinity-embedded-sdk==0.4.0.dev5
pip install infinity-embedded-sdk==0.4.0
```

### Create an Infinity object
Expand Down Expand Up @@ -98,7 +98,7 @@ If you are on Windows 10+, you must enable WSL or WSL2 to deploy Infinity using
### Install Infinity client

```
pip install infinity-sdk==0.4.0.dev5
pip install infinity-sdk==0.4.0
```

### Connect to Infinity Server and run a dense vector search
Expand Down Expand Up @@ -148,7 +148,7 @@ This section provides instructions on deploying Infinity using binary package on

Fedora/RHEL/CentOS/OpenSUSE
```bash
sudo rpm -i infinity-0.4.0.dev5-x86_64.rpm
sudo rpm -i infinity-0.4.0-x86_64.rpm
```

```bash
Expand All @@ -159,7 +159,7 @@ sudo systemctl start infinity
<TabItem value="ubuntu">

```bash
sudo dpkg -i infinity-0.4.0.dev5-x86_64.deb
sudo dpkg -i infinity-0.4.0-x86_64.deb
```

```bash
Expand All @@ -172,7 +172,7 @@ sudo systemctl start infinity
### Install Infinity client

```
pip install infinity-sdk==0.4.0.dev5
pip install infinity-sdk==0.4.0
```

### Connect to Infinity Server and run a dense vector search
Expand Down
2 changes: 1 addition & 1 deletion docs/getstarted/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you wish to embed Infinity into your Python application without the need for

1. Install the Infinity-embedded SDK:
```bash
pip install infinity-embedded-sdk==0.4.0.dev5
pip install infinity-embedded-sdk==0.4.0
```
2. Use Infinity to conduct a dense vector search:
```python
Expand Down
15 changes: 15 additions & 0 deletions docs/references/configurations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@ compact_interval = "120s"
# The system performs a flush operation for that in-memory index
# Range : [8192, 8388608]
mem_index_capacity = 1048576
# Storage type. Including local, minio. Default to local
storage_type = "local"

# Object storage configuration
[storage.object_storage]
# URL of the object storage server
url = "127.0.0.1:9000"
# The bucket where store the data
bucket_name = "infinity"
# Access key of object storage server
access_key = "minioadmin"
# Secret key of object storage server
secret_key = "minioadmin"
# Using http or https protocol
enable_https = false

# Buffer manager configuration
[buffer]
Expand Down
112 changes: 110 additions & 2 deletions example/http/create_list_show_index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,56 @@ curl --request POST \
]
} '

# insert data
echo -e '\n\n-- insert 4 rows into tbl1'
curl --request POST \
--url http://localhost:23820/databases/default_db/tables/tbl1/docs \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
[
{
"name": "row1",
"score": 3.0,
"dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.4, 0.3, 0.1],
"fulltext_column" : "random string 1",
"sparse_column": {"10":1.1, "20":2.2, "30": 3.3},
"tensor_column": [[1.0, 0.7, 0.9, 0.8], [1.1, 0.1, 0.3, 0.2]],
"multivector_column" : [[0.1, 0.3, 0.5, 0.7], [0.2, 0.4, 0.6, 0.8]],
"tensorarray_column" : [[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0]]]
},
{
"name": "row2",
"score": 2.0,
"dense_column": [1.0, 2.2, 0.56, 1.9, 1.5, 0.2, 0.03, 0.14],
"fulltext_column" : "random string 2",
"sparse_column": {"10":4.1, "20":1.8, "30": 3.4},
"tensor_column": [[1.0, 0.4, 0.3, 0.0], [1.1, 0.5, 0.0, 0.7]],
"multivector_column" : [[0.2, 0.4, 0.6, 0.8], [0.1, 0.3, 0.5, 0.7]],
"tensorarray_column" : [[[0.7, 0.8], [1.4, 0.3]], [[0.5, 0.1]]]
},
{
"name": "row3",
"score": 4.0,
"dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.7, 0.6, 0.17],
"fulltext_column" : "random string 3",
"sparse_column": {"10":3.1, "20":1.2, "30": 4.3},
"tensor_column": [[1.0, 0.8, 0.5, 0.0], [1.1, 0.7, 0.0, 0.2]],
"multivector_column" : [[0.1, 0.7, 0.4, 0.6], [0.3, 0.5, 0.4, 0.8]],
"tensorarray_column" : [[[1.2, 0.7], [0.4, 0.1]], [[0.5, 0.4]]]
},
{
"name": "row4",
"score": 3.8,
"dense_column": [1.0, 1.2, 0.8, 0.9, 0.5, 0.4, 0.3, 0.1],
"fulltext_column" : "random string 4",
"sparse_column": {"10":1.4, "20":3.2, "30": 1.3},
"tensor_column": [[1.0, 0.3, 0.7, 0.6], [0.7, 1.4, 0.2, 0.5]],
"multivector_column" : [[0.6, 0.1, 0.4, 0.8], [0.7, 0.8, 0.5, 0.1]],
"tensorarray_column" : [[[1.2, 1.7], [0.6, 0.7]], [[1.3, 1.4]]]
}
] '

# create HNSW index on dense vector column: 'dense_column'
echo -e '\n\n-- create table index: hnsw_index'
curl --request POST \
Expand Down Expand Up @@ -165,8 +215,6 @@ curl --request POST \
"create_option": "ignore_if_exists"
} '



# list table indexes
echo -e '\n\n-- list table indexes: hnsw_index, sparse_index, fulltext_index, bmp_index should be included'
curl --request GET \
Expand Down Expand Up @@ -203,6 +251,66 @@ curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index \
--header 'accept: application/json'

# show table tbl1 hnsw_index segment 0
echo -e '\n\n-- show tbl1 hnsw_index segment 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/hnsw_index/segment/0 \
--header 'accept: application/json'

# show table tbl1 hnsw_index segment 0 chunk 0
echo -e '\n\n-- show tbl1 hnsw_index segment 0 chunk 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/hnsw_index/segment/0/chunk/0 \
--header 'accept: application/json'

# show table tbl1 multi_vector_hnsw_index segment 0
echo -e '\n\n-- show tbl1 multi_vector_hnsw_index segment 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/multi_vector_hnsw_index/segment/0 \
--header 'accept: application/json'

# show table tbl1 multi_vector_hnsw_index segment 0 chunk 0
echo -e '\n\n-- show tbl1 multi_vector_hnsw_index segment 0 chunk 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/multi_vector_hnsw_index/segment/0/chunk/0 \
--header 'accept: application/json'

# show table tbl1 fulltext_index segment 0
echo -e '\n\n-- show tbl1 fulltext_index segment 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/fulltext_index/segment/0 \
--header 'accept: application/json'

# show table tbl1 fulltext_index segment 0 chunk 0
echo -e '\n\n-- show tbl1 fulltext_index segment 0 chunk 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/fulltext_index/segment/0/chunk/0 \
--header 'accept: application/json'

# show table tbl1 secondary_index segment 0
echo -e '\n\n-- show tbl1 secondary_index segment 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/secondary_index/segment/0 \
--header 'accept: application/json'

# show table tbl1 secondary_index segment 0 chunk 0
echo -e '\n\n-- show tbl1 secondary_index segment 0 chunk 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/secondary_index/segment/0/chunk/0 \
--header 'accept: application/json'

# show table tbl1 bmp_index segment 0
echo -e '\n\n-- show tbl1 bmp_index segment 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index/segment/0 \
--header 'accept: application/json'

# show table tbl1 bmp_index segment 0 chunk 0
echo -e '\n\n-- show tbl1 bmp_index segment 0 chunk 0'
curl --request GET \
--url http://localhost:23820/databases/default_db/tables/tbl1/indexes/bmp_index/segment/0/chunk/0 \
--header 'accept: application/json'

# drop tbl1 hnsw_index
echo -e '\n\n-- drop tbl1 hnsw_index'
curl --request DELETE \
Expand Down
Loading

0 comments on commit 3fd63b3

Please sign in to comment.