Skip to content

Commit

Permalink
Merge pull request #1 from vearch/v3.5.X
Browse files Browse the repository at this point in the history
V3.5.x
  • Loading branch information
zcdb committed Apr 29, 2024
2 parents 9a9503e + 97148c6 commit a262bc8
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 84 deletions.
16 changes: 8 additions & 8 deletions docs/source/use_op/op_cluster.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
Cluster Monitoring
=================
==================================

http://master_server is the master service.

Cluster Status
--------
------------------------

::

curl -XGET http://master_server/cluster/stats


Health Status
--------
------------------------

::

curl -XGET http://master_server/cluster/health


Server Status
--------
------------------------

::

curl -XGET http://master_server/servers

Partition Status
--------
------------------------

::

curl -XGET http://master_server/partitions

Clean lock
--------
------------------------

::

Expand All @@ -43,7 +43,7 @@ Clean lock
The cluster will be locked when creating a table. If the service is abnormal during this process, the lock will not be released and will need to be manually cleared before a new table can be created.

Replica expansion and contraction
--------
------------------------------------------------

::

Expand Down Expand Up @@ -92,4 +92,4 @@ cluster_name can be found in the configuration file config.toml
scp -r root@sourcePsIP:/export/vdb/baud root@targetPsIP:/export/vdb
...

sourcePsIP is the IP of the PS node of the cluster to be migrated, and targetPsIP is the IP of the PS node of the target cluster. Here you only need to ensure that the ps node IPs of the cluster to be migrated and the target cluster are migrated one-to-one, and no special order is required.
sourcePsIP is the IP of the PS node of the cluster to be migrated, and targetPsIP is the IP of the PS node of the target cluster. Here you only need to ensure that the ps node IPs of the cluster to be migrated and the target cluster are migrated one-to-one, and no special order is required.
14 changes: 7 additions & 7 deletions docs/source/use_op/op_db.rst
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
Database Operation
=================
==================================

http://master_server is the master service, $db_name is the name of the created database.

List Database
--------
------------------------

::

curl -XGET http://master_server/dbs


Create Database
--------
------------------------

::

curl -XPOST http://master_server/dbs/$db_name


View Database
--------
------------------------

::

curl -XGET http://master_server/dbs/$db_name


Delete Database
--------
------------------------

::

curl -XDELETE http://master_server/dbs/$db_name

Cannot delete if there is a table space under the datebase.

View Database Space
--------
View Database Spaces
------------------------

::

Expand Down
17 changes: 9 additions & 8 deletions docs/source/use_op/op_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ http://router_server represents the router service, $db_name is the created libr
_id is the unique identifier of the record generated by the server, which can be specified by the user. This unique identifier needs to be used to modify and delete data.

$id is a unique identifier generated by the server using the specified value when inserting data. The $id value cannot use special characters such as URL paths. If the record with the unique identifier already exists in the library, it will be updated and overwritten.
Single Insertion
--------


document/upsert
--------
----------------
If primary_id is set, the specified primary key will be used. If not set, generated by Vearch.

If the _id specified when inserting already exists, the existing data is updated; otherwise, it is inserted.
Expand Down Expand Up @@ -108,7 +107,7 @@ The format of the return value of the upsert interface is as follows
total identifies the number of successful insertions, and document_ids returns the generated _id and insertion result information.

document/query
--------
----------------
The /document/query interface is used to accurately search for data that exactly matches the query conditions. The search does not include vector data.

Two methods are supported: one is to obtain documents directly through primary keys, and the other is to obtain corresponding documents based on filter conditions.
Expand Down Expand Up @@ -268,7 +267,7 @@ Query interface return format
}

document/search
--------
------------------------
Supports similarity retrieval based on vector value, together with the Filter expression of a custom scalar field, and returns the specified Top K most similar Documents.

Parameter Description:
Expand Down Expand Up @@ -327,7 +326,7 @@ The index_params parameter specifies the parameters for model calculation. Diffe

IVFPQ:
::

"index_params": {
"parallel_on_queries": 1,
"recall_num" : 100,
Expand All @@ -338,6 +337,7 @@ IVFPQ:

GPU:
::

"index_params": {
"recall_num" : 100,
"nprobe": 80,
Expand All @@ -346,6 +346,7 @@ GPU:

HNSW:
::

"index_params": {
"efSearch": 64,
"metric_type": "L2"
Expand Down Expand Up @@ -519,7 +520,7 @@ search interface return format
}

document/delete
--------
------------------------
Deletion supports two methods: specifying document_ids and filtering conditions.

Delete specified document_ids
Expand All @@ -535,7 +536,7 @@ Delete specified document_ids
Delete documents that meet the filter conditions. size specifies the number of items to delete for each data fragment.
::

curl -H "content-type: application/json" -XPOST -d'
{
"db_name": "ts_db",
Expand Down
124 changes: 63 additions & 61 deletions docs/source/use_op/op_space.rst
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
Space Operation
=================
==================================

http://master_server is the master service, $db_name is the name of the created database, $space_name is the name of the created space.

Create Space
------------
------------------------

::

curl -XPOST -H "content-type: application/json" -d'
{
"name": "space1",
"partition_num": 1,
"replica_num": 3,
"fields": [
{
"name": "field_string",
"type": "string"
},
{
"name": "field_int",
"type": "integer"
},
{
"name": "field_float",
"type": "float",
"index": {
curl -XPOST -H "content-type: application/json" -d'
{
"name": "space1",
"partition_num": 1,
"replica_num": 3,
"fields": [
{
"name": "field_string",
"type": "string"
},
{
"name": "field_int",
"type": "integer"
},
{
"name": "field_float",
"type": "SCALAR",
"type": "float",
"index": {
"name": "field_float",
"type": "SCALAR",
},
},
},
{
"name": "field_string_array",
"type": "stringArray",
"index": {
{
"name": "field_string_array",
"type": "SCALAR",
"type": "stringArray",
"index": {
"name": "field_string_array",
"type": "SCALAR",
},
},
},
{
"name": "field_int_index",
"type": "integer",
"index": {
{
"name": "field_int_index",
"type": "SCALAR",
},
},
{
"name": "field_vector",
"type": "vector",
"dimension": 128,
"index": {
"name": "gamma",
"type": "IVFPQ",
"params": {
"metric_type": "InnerProduct",
"ncentroids": 2048,
"nlinks": 32,
"efConstruction": 40,
"type": "integer",
"index": {
"name": "field_int_index",
"type": "SCALAR",
},
},
}
]
}
' http://master_server/dbs/$db_name/spaces
{
"name": "field_vector",
"type": "vector",
"dimension": 128,
"index": {
"name": "gamma",
"type": "IVFPQ",
"params": {
"metric_type": "InnerProduct",
"ncentroids": 2048,
"nlinks": 32,
"efConstruction": 40,
},
},
}
]
}
' http://master_server/dbs/$db_name/spaces


Parameter description:
Expand Down Expand Up @@ -128,7 +128,7 @@ IVFPQ:
+--------------------+------------------------------------------------------+------------+-------+----------------------------------------------------------------------------------------------------------------------------------------+

::

"index_type": "IVFPQ",
"index_params": {
"metric_type": "InnerProduct",
Expand Down Expand Up @@ -217,7 +217,7 @@ IVFFLAT:
+--------------------+------------------------------------------------------+------------+-------+----------------------------------------------------------------------------------------------------------------------------------------+

::

"index_type": "IVFFLAT",
"index_params": {
"metric_type": "InnerProduct",
Expand All @@ -239,7 +239,7 @@ BINARYIVF:
+--------------------+------------------------------------------------------+------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+

::

"index_type": "BINARYIVF",
"index_params": {
"ncentroids": 256
Expand All @@ -256,7 +256,7 @@ FLAT:
+-------------+-------------------+------------+------+-------------------+

::

"index_type": "FLAT",
"index_params": {
"metric_type": "InnerProduct"
Expand Down Expand Up @@ -306,12 +306,13 @@ Scalar Index
Gamma engine supports scalar index, provides the filtering function for scalar data, the opening method refers to the 2nd and 3rd in the "fields config", and the retrieval method refers to the "filter json structure elucidation" in the "Search"

View Space
----------
--------------------
::

curl -XGET http://master_server/dbs/$db_name/spaces/$space_name

返回数据详细格式:

+----------+----------------+--------+--------------+------+
| 字段标识 | 字段含义 | 类型 | 是否一定返回 | 备注 |
+==========+================+========+==============+======+
Expand Down Expand Up @@ -348,6 +349,7 @@ return data:

return format:
::

{
"code": 0,
"data": {
Expand Down Expand Up @@ -446,12 +448,12 @@ return format:
}
}

more information:
more information
::

curl -XGET http://master_server/dbs/$db_name/spaces/$space_name?detail=true

return format:
return format
::

{
Expand Down Expand Up @@ -643,7 +645,7 @@ return format:
}

Delete Space
------------
------------------------
::
curl -XDELETE http://master_server/dbs/$db_name/spaces/$space_name

0 comments on commit a262bc8

Please sign in to comment.