In addition, when configuring proxy, there is an extra field called `serviceType`. This field defines the type of service Milvus provides in the K8s cluster.
@@ -137,7 +138,6 @@ To configure resources for a specific component, add the component name in the f
Proxy
Query coord
Query node
-
Index coord
Index node
Data coord
Data node
@@ -208,6 +208,7 @@ To configure resources for a specific component, add the component name in the f
Quota and Limits |
|
@@ -165,9 +170,10 @@ Under this section, you can configure MinIO or S3 address, relevant access keys,
Root prefix of the key to where Milvus stores data in MinIO or S3.
- Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.
+ To share an MinIO instance among multiple Milvus instances, consider changing this to a different value for each Milvus instance before you start them. For details, see Operation FAQs.
Set an easy-to-identify root key prefix for Milvus if etcd service already exists.
+ Changing this for an already running Milvus instance may result in failures to read legacy data.
|
files |
diff --git a/preview/site/en/reference/sys_config/configure_nats.md b/preview/site/en/reference/sys_config/configure_nats.md
new file mode 100644
index 000000000..915339077
--- /dev/null
+++ b/preview/site/en/reference/sys_config/configure_nats.md
@@ -0,0 +1,266 @@
+---
+id: configure_nats.md
+related_key: configure
+group: system_configuration.md
+summary: Learn how to configure NATs for Milvus standalone.
+title: NATS-related Configurations
+---
+
+# NATS-related Configurations
+
+This topic introduces the NATs-related configurations of Milvus.
+
+NATS is a message-oriented middleware that allows data exchange between applications and services, segmented in the form of messages. Milvus uses NATS as a underlying engine for reliable storage and pub/sub of message streams. You can use it as an alternative to RocksMQ.
+
+Under this section, you can configure message size, retention time and size, etc.
+
+## `natsmq.server.port`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Listening port of the NATS server.
+ |
+ 4222 |
+
+
+
+
+## `natsmq.server.storeDir`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ JetStream storage path.
+ |
+ /var/lib/milvus/nats |
+
+
+
+
+## `natsmq.server.maxFileStore`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum size of the file storage.
+ |
+ 17179869184 (16 GB) |
+
+
+
+
+## `natsmq.server.maxPayload`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum size of the payload per message in bytes.
+ |
+ 8388608 (8 MB) |
+
+
+
+
+## `natsmq.server.maxPending`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum buffer size per client connection in bytes.
+ |
+ 67108864 (64 MB) |
+
+
+
+
+## `natsmq.server.initializeTimeout`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Timeout duration for NATs to initialize in milliseconds.
+ |
+ 4000 (4 seconds) |
+
+
+
+
+## `natsmq.monitor.debug`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Whether to enable debug logs
+ |
+ false |
+
+
+
+
+## `natsmq.monitor.logTime`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Whether to include timestamps in debug logs.
+ |
+ true |
+
+
+
+
+## `natsmq.monitor.logFile`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Storage path of the log files generated.
+ If left unspecified, no log files are to be generated.
+ |
+ N/A |
+
+
+
+
+## `natsmq.monitor.logSizeLimit`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum size per log file in bytes.
+ If it is set to 0 , no limit applies.
+ |
+ 0 |
+
+
+
+
+## `natsmq.rentention.maxAge`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum age per message in the P-channel in minutes.
+ |
+ 4320 (3 days) |
+
+
+
+
+## `natsmq.rentention.maxBytes`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum age per message in the P-channel in minutes.
+ If it is left unspecified, no limit applies.
+ |
+ N/A |
+
+
+
+
+## `natsmq.rentention.maxMsgs`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum number of messages per P-channel.
+ If it is left unspecified, no limit applies.
+ |
+ N/A |
+
+
+
diff --git a/preview/site/en/reference/sys_config/configure_proxy.md b/preview/site/en/reference/sys_config/configure_proxy.md
index 2e3bafbd3..a5278b7b3 100644
--- a/preview/site/en/reference/sys_config/configure_proxy.md
+++ b/preview/site/en/reference/sys_config/configure_proxy.md
@@ -3,6 +3,7 @@ id: configure_proxy.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure proxy of Milvus.
+title: Proxy-related Configurations
---
# Proxy-related Configurations
@@ -238,3 +239,230 @@ Under this section, you can configure proxy port, system limits, etc.
+
+## `proxy.maxVectorFieldNum`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The maximum number of vector fields that can be specified in a collection. Value range: [1, 10]. |
+ 4 |
+
+
+
+
+## `proxy.accessLog.enable`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ Whether to enable the access log feature. |
+ False |
+
+
+
+
+## `proxy.accessLog.filename`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The name of the access log file. If you leave this parameter empty, access logs will be printed to stdout. |
+ Empty string |
+
+
+
+
+## `proxy.accessLog.localPath`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The local folder path where the access log file is stored. This parameter can be specified when proxy.accessLog.filename is not empty. |
+ /tmp/milvus_access |
+
+
+
+
+## `proxy.accessLog.maxSize`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ The maximum size allowed for a single access log file. If the log file size reaches this limit, a rotation process will be triggered. This process seals the current access log file, creates a new log file, and clears the contents of the original log file.
+ Unit: MB
+ |
+ 64 |
+
+
+
+
+## `proxy.accessLog.rotatedTime`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ The maximum time interval allowed for rotating a single access log file. Upon reaching the specified time interval, a rotation process is triggered, resulting in the creation of a new access log file and sealing of the previous one.
+ Unit: seconds
+ |
+ 0 |
+
+
+
+
+## `proxy.accessLog.maxBackups`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The maximum number of sealed access log files that can be retained. If the number of sealed access log files exceeds this limit, the oldest one will be deleted. |
+ 8 |
+
+
+
+
+## `proxy.accessLog.minioEnable`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ Whether to upload local access log files to MinIO. This parameter can be specified when proxy.accessLog.filename is not empty. |
+ False |
+
+
+
+
+## `proxy.accessLog.remotePath`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The path of the object storage for uploading access log files. |
+ access_log/ |
+
+
+
+
+## `proxy.accessLog.remoteMaxTime`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ The time interval allowed for uploading access log files. If the upload time of a log file exceeds this interval, the file will be deleted. Setting the value to 0 disables this feature. |
+ 0 |
+
+
+
+
+## `proxy.accessLog.base.format`
+
+
+
+## `proxy.accessLog.
.format`
+
+
+
+## `proxy.accessLog..methods`
+
+
diff --git a/preview/site/en/reference/sys_config/configure_pulsar.md b/preview/site/en/reference/sys_config/configure_pulsar.md
index af0a5f1dd..594e25cf6 100644
--- a/preview/site/en/reference/sys_config/configure_pulsar.md
+++ b/preview/site/en/reference/sys_config/configure_pulsar.md
@@ -3,6 +3,7 @@ id: configure_pulsar.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure Pulsar for Milvus cluster.
+title: Pulsar-related Configurations
---
# Pulsar-related Configurations
@@ -13,6 +14,12 @@ Pulsar is the underlying engine supporting Milvus cluster's reliable storage and
Under this section, you can configure Pulsar address, the message size, etc.
+
+
To share a Pulsar instance with multi-tenancy enabled among multiple Milvus instances, you need to change pulsar.tenant
or pulsar.namespace
to a unique value for each of the Milvus instances.
+
To share a Pulsar instance with multi-tenancy disabled among multiple Milvus instances, you need to change msgChannel.chanNamePrefix.cluster
to a unique value for each of the Milvus instances.
+For details, refer to
Operation FAQs.
+
+
## `pulsar.address`
@@ -60,6 +67,26 @@ Under this section, you can configure Pulsar address, the message size, etc.
+## `pulsar.webport`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Web port of of Pulsar service.
+ If you connect direcly without proxy, should use 8080
+ |
+ 80 |
+
+
+
+
## `pulsar.maxMessageSize`
@@ -82,3 +109,42 @@ Under this section, you can configure Pulsar address, the message size, etc.
+## `pulsar.tenant`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Pulsar can be provisioned for specific tenants with appropriate capacity allocated to the tenant.
+ To share a Pulsar instance among multiple Milvus instances, you can change this to an Pulsar tenant rather than the default one for each Milvus instance before you start them. However, if you do not want Pulsar multi-tenancy, you are advised to change msgChannel.chanNamePrefix.cluster to the different value. For details, see Operation FAQs.
+ |
+ public |
+
+
+
+
+## `pulsar.namespace`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ A Pulsar namespace is the administrative unit nomenclature within a tenant.
+ To share a Pulsar instance among multiple Milvus instances, you can change this to an Pulsar tenant rather than the default one for each Milvus instance before you start them. However, if you do not want Pulsar multi-tenancy, you are advised to change msgChannel.chanNamePrefix.cluster to the different value. For details, see Operation FAQs.
+ |
+ default |
+
+
+
diff --git a/preview/site/en/reference/sys_config/configure_querycoord.md b/preview/site/en/reference/sys_config/configure_querycoord.md
index cd49e9972..d24965fc9 100644
--- a/preview/site/en/reference/sys_config/configure_querycoord.md
+++ b/preview/site/en/reference/sys_config/configure_querycoord.md
@@ -3,6 +3,7 @@ id: configure_querycoord.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure query coordinator of Milvus.
+title: Query Coordinator-related Configurations
---
# Query Coordinator-related Configurations
@@ -266,4 +267,4 @@ Under this section, you can configure query coord address, auto handoff, auto lo
104857600 |
-
+
\ No newline at end of file
diff --git a/preview/site/en/reference/sys_config/configure_querynode.md b/preview/site/en/reference/sys_config/configure_querynode.md
index 36c906cac..ca5f3b47a 100644
--- a/preview/site/en/reference/sys_config/configure_querynode.md
+++ b/preview/site/en/reference/sys_config/configure_querynode.md
@@ -3,6 +3,7 @@ id: configure_querynode.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure query node of Milvus.
+title: Query Node-related Configurations
---
# Query Node-related Configurations
@@ -135,6 +136,25 @@ Under this section, you can configure query node port, graceful time, etc.
+## `queryNode.replicas`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ The number of in-memory replicas of data segments that are created on query nodes when a collection is loaded. In a Standalone deployment, the maximum value is 1. For more information, refer to In-Memory Replica.
+ |
+ 1 |
+
+
+
+
## `queryNode.stats.publishInterval`
@@ -190,7 +210,32 @@ Under this section, you can configure query node port, graceful time, etc.
Row count by which Segcore divides a segment into chunks.
|
- 32768 |
+ 1024 |
+
+
+
+
+## `queryNode.segcore.InterimIndex`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Whether to create a temporary index for growing segments and sealed segments not yet indexed, improving search performance.
+ -
+ Milvus will eventually seals and indexes all segments, but enabling this optimizes search performance for immediate queries following data insertion.
+
+ -
+ This defaults to `true`, indicating that Milvus creates temporary index for growing segments and the sealed segments that are not indexed upon searches.
+
+ |
+ true |
-
\ No newline at end of file
+
diff --git a/preview/site/en/reference/sys_config/configure_quota_limits.md b/preview/site/en/reference/sys_config/configure_quota_limits.md
index 0658c7f6a..cb8f1430e 100644
--- a/preview/site/en/reference/sys_config/configure_quota_limits.md
+++ b/preview/site/en/reference/sys_config/configure_quota_limits.md
@@ -3,6 +3,7 @@ id: configure_quota_limits.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure quotas and limitations.
+title: Quota- and Limit-related configurations
---
# Quota- and Limit-related configurations
@@ -13,6 +14,23 @@ Some of these configuration items are used to set thresholds for Milvus to proac
Some of them are used to set backpressure signals that force Milvus to lower the rate of DDL/DML/DQL requests.
+## `quotaAndLimits.limits.maxCollectionNumPerDB`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+ Maximum number of collections per database. |
+ 64 |
+
+
+
+
## `quotaAndLimits.ddl.enabled`
@@ -224,6 +242,27 @@ Some of them are used to set backpressure signals that force Milvus to lower the
+## `quotaAndLimits.dml.insertRate.collection.max`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Highest data insertion rate per collection per second.
+ Setting this item to 5 indicates that Milvus only allows data insertion to any collection at the rate of 5 MB/s.
+ To use this setting, set quotaAndLimits.dml.enabled to true at the same time.
+ |
+ ∞ |
+
+
+
+
## `quotaAndLimits.dml.deleteRate.max`
@@ -236,8 +275,29 @@ Some of them are used to set backpressure signals that force Milvus to lower the
- Highest data insertion rate per second.
- Setting this item to 0.1 indicates that Milvus only allows data insertion at the rate of 0.1 MB/s.
+ Highest data deletion rate per second.
+ Setting this item to 0.1 indicates that Milvus only allows data deletion at the rate of 0.1 MB/s.
+ To use this setting, set quotaAndLimits.dml.enabled to true at the same time.
+ |
+ ∞ |
+
+
+
+
+## `quotaAndLimits.dml.deleteRate.collection.max`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Highest data deletion rate per second.
+ Setting this item to 0.1 indicates that Milvus only allows data deletion from any collection at the rate of 0.1 MB/s.
To use this setting, set quotaAndLimits.dml.enabled to true at the same time.
|
∞ |
@@ -283,6 +343,27 @@ Some of them are used to set backpressure signals that force Milvus to lower the
+## `quotaAndLimits.dql.searchRate.collection.max`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum number of vectors to search per collection per second.
+ Setting this item to 100 indicates that Milvus only allows searching 100 vectors per second per collection no matter whether these 100 vectors are all in one search or scattered across multiple searches.
+ To use this setting, set quotaAndLimits.dql.enabled to true at the same time.
+ |
+ ∞ |
+
+
+
+
## `quotaAndLimits.dql.queryRate.max`
@@ -304,6 +385,27 @@ Some of them are used to set backpressure signals that force Milvus to lower the
+## `quotaAndLimits.dql.queryRate.collection.max`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Maximum number of queries per collection per second.
+ Setting this item to 100 indicates that Milvus only allows 100 queries per collection per second.
+ To use this setting, set quotaAndLimits.dql.enabled to true at the same time.
+ |
+ ∞ |
+
+
+
+
## `quotaAndLimits.limitWriting.ttProtection.enabled`
@@ -334,7 +436,7 @@ Some of them are used to set backpressure signals that force Milvus to lower the
Maximum time tick delay. A time tick delay is the difference between RootCoord TSO and the minimum time tick of all flow graphs on DataNodes and QueryNodes.
- Setting this item to 300 indicates that Milvus reduces the DML request rate as the delay increases and drops all DML requests once the delay reaches the set maximum in milliseconds.
+ Setting this item to 300 indicates that Milvus reduces the DML request rate as the delay increases and drops all DML requests once the delay reaches the set maximum in seconds.
To use this setting, set quotaAndLimits.limitWriting.ttProtection.enabled to true at the same time.
|
300 |
@@ -481,6 +583,27 @@ Some of them are used to set backpressure signals that force Milvus to lower the
+## `quotaAndLimits.limitWriting.diskProtection.diskQuotaPerCollection`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Disk quota allocated to binlog per collection.
+ Setting this item to 8192 indicates that Milvus drops all DML requests in a collection as the size of binlog of the collection reaches the set value.
+ To use this setting, set quotaAndLimits.limitWriting.diskProtection.enabled to true at the same time.
+ |
+ ∞ |
+
+
+
+
## `quotaAndLimits.limitWriting.forceDeny`
@@ -610,4 +733,4 @@ Some of them are used to set backpressure signals that force Milvus to lower the
False |
-
\ No newline at end of file
+
diff --git a/preview/site/en/reference/sys_config/configure_rocksmq.md b/preview/site/en/reference/sys_config/configure_rocksmq.md
index bd201fdf0..e80ef6f46 100644
--- a/preview/site/en/reference/sys_config/configure_rocksmq.md
+++ b/preview/site/en/reference/sys_config/configure_rocksmq.md
@@ -3,6 +3,7 @@ id: configure_rocksmq.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure RocksMQ for Milvus standalone.
+title: RocksMQ-related Configurations
---
# RocksMQ-related Configurations
@@ -98,3 +99,42 @@ Under this section, you can configure message size, retention time and size, etc
+
+## `rocksmq.compactionInterval`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Time interval to trigger rocksdb compaction to remove deleted data.
+ Unit: Second
+ |
+ 86400 |
+
+
+
+
+## `rocksmq.lrucacheratio`
+
+
+
+
+ Description |
+ Default Value |
+
+
+
+
+
+ Rocksdb cache memory ratio.
+ |
+ 0.06 |
+
+
+
diff --git a/preview/site/en/reference/sys_config/configure_rootcoord.md b/preview/site/en/reference/sys_config/configure_rootcoord.md
index 287818545..beee0c14d 100644
--- a/preview/site/en/reference/sys_config/configure_rootcoord.md
+++ b/preview/site/en/reference/sys_config/configure_rootcoord.md
@@ -3,6 +3,7 @@ id: configure_rootcoord.md
related_key: configure
group: system_configuration.md
summary: Learn how to configure root coordinator of Milvus.
+title: Root Coordinator-related Configurations
---
# Root Coordinator-related Configurations
@@ -276,4 +277,4 @@ Under this section, you can configure root coord address, index building thresho
86400 |
-
+
\ No newline at end of file
diff --git a/preview/site/en/reference/sys_config/system_configuration.md b/preview/site/en/reference/sys_config/system_configuration.md
index 35f5c0eba..8597db584 100644
--- a/preview/site/en/reference/sys_config/system_configuration.md
+++ b/preview/site/en/reference/sys_config/system_configuration.md
@@ -3,6 +3,7 @@ id: system_configuration.md
related_key: configure
group: system_configuration.md
summary: Learn about the system configuration of Milvus.
+title: Milvus System Configurations Checklist
---
# Milvus System Configurations Checklist
@@ -51,6 +52,19 @@ Under this section, you can configure message size, retention time and size, etc
See [RocksMQ-related Configurations](configure_rocksmq.md) for detailed description for each parameter under this section.
+### `nats`
+
+NATS is a message-oriented middleware that allows data exchange between applications and services, segmented in the form of messages. Milvus uses NATS as a underlying engine for reliable storage and pub/sub of message streams. You can use it as an alternative to RocksMQ.
+
+Under this section, you can configure NATS server, monitoring properties, and rention time and size, etc.
+
+See [NATS-related Configurations](configure_nats.md) for detailed description for each parameter under this section.
+
+### `kafka`
+
+Apache Kafka is an open-source distributed event streaming platform for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. It serves as an alternative to RocksMQ and Pulsar for reliable storage and publication/subscription of message streams.
+
+See [Kafka-related Configurations](configure_kafka.md) for detailed description for each parameter under this section.
### `rootCoord`
@@ -84,14 +98,6 @@ Under this section, you can configure query node port, graceful time, etc.
See [Query Node-related Configurations](configure_querynode.md) for detailed description for each parameter under this section.
-### `indexCoord`
-
-Index coordinator (index coord) manages topology of the index nodes, and maintains index metadata.
-
-Under this section, you can configure index coord address, etc.
-
-See [Index Coordinator-related Configurations](configure_indexcoord.md) for detailed description for each parameter under this section.
-
### `indexNode`
Index node builds indexes for vectors.
@@ -146,8 +152,6 @@ See [Common Configurations](configure_common.md) for detailed description for ea
### `knowhere`
-[Knowhere](https://github.com/milvus-io/milvus/blob/master/docs/design_docs/knowhere_design.md) is the search engine of Milvus.
-
Under this section, you can configure the default SIMD instruction set type of the system.
See [Knowhere-related Configurations](configure_knowhere.md) for detailed description for each parameter under this section.
@@ -237,5 +241,4 @@ The following parameters control the log output and object storage access.
- Learn how to [configure Milvus](configure-docker.md) before installation.
- Learn more about the installation of Milvus:
- - [Install Milvus Standalone](install_standalone-docker.md)
- - [Install Milvus Cluster](install_cluster-docker.md)
\ No newline at end of file
+ - [Install Milvus Standalone](install_standalone-docker.md)
\ No newline at end of file
diff --git a/preview/site/en/reference/timestamp.md b/preview/site/en/reference/timestamp.md
index 78ae33ca8..89ae0e9b6 100644
--- a/preview/site/en/reference/timestamp.md
+++ b/preview/site/en/reference/timestamp.md
@@ -30,7 +30,7 @@ Several timestamp-related parameters are involved when you conduct a vector simi
If the `Guarantee_timestamp` is not configured, Milvus automatically takes the point in time when the search request is made. Therefore, the search is conducted on a data view with all data updates by DML operations before the search.
-To save you the trouble of understanding the [TSO](https://github.com/milvus-io/milvus/blob/master/docs/design_docs/milvus_hybrid_ts_en.md?from=from_parent_mindnote) inside Milvus, as a user, you do not have to directly configure the `Guarantee_timestamp` parameter. You only need to choose the [consistency level](https://milvus.io/docs/v2.1.x/consistency.md), and Milvus automatically handles the `Guarantee_timestamp` parameter for you. Each consistency level corresponds to a certain `Guarantee_timestamp` value.
+To save you the trouble of understanding the [TSO](https://github.com/milvus-io/milvus/blob/master/docs/design_docs/20211214-milvus_hybrid_ts.md) inside Milvus, as a user, you do not have to directly configure the `Guarantee_timestamp` parameter. You only need to choose the [consistency level](https://milvus.io/docs/v2.1.x/consistency.md), and Milvus automatically handles the `Guarantee_timestamp` parameter for you. Each consistency level corresponds to a certain `Guarantee_timestamp` value.
![Guarantee_Timestamp](../../../assets/Guarantee_Timestamp.png "An illustration of guarantee timestamp.").
@@ -78,21 +78,7 @@ As shown in the figure 1, the value of `Guarantee_timestamp` is set as `2021-08-
As shown in the figure 2 , the value of `Guarantee_timestamp` is set as `2021-08-26T18:15:01`, and `Graceful_time` as `2s`. The current value of `Service_timestamp` is only `2021-08-26T18:14:54`. This means that the expected DML operations are not completed yet and even given the 2 second of graceful time, data invisibility is still intolerable. Therefore, the query node needs to put off the search or query request until certain DML requests are completed (i.e. when `Service_timestamp` + `Graceful_time` >= `Guarantee_timestamp`).
-### `Travel_timestamp`
-
-`Travel_timestamp` is a type of configurable timestamp used to indicate that the search or query needs to be conducted on a data view before a certain point in time. `Travel_timestamp` can be seen as a data snapshot. And [search with Time Travel](timetravel.md) means conducting a search or query on the data snapshot indicated by the value of `Travel_timestamp`. All DML operations after `Travel_timestamp` are not involved in the search or query.
-
-When there is an incoming search or query request, suppose `Service_timestamp` > `Guarantee_timestamp`.
-
-![Travel_Timestamp](../../../assets/Travel_Timestamp.png "An illustration of time travel timestamp.").
-
-The value of `Guarantee_timestamp` has nothing to do with the Time Travel feature.
-
-As shown in the figure above, the value of `Guarantee_timestamp` is set as `2021-08-26T18:14:55`. And the `Service_timestamp` is grown to `2021-08-26T18:15:01` meaning that more DML operations are executed and completed after this time point. However, no matter the value of `Travel_timestamp` is `2021-08-26T18:14:56` or `2021-08-26T18:14:54`, only data before `Travel_timestamp` are searched or queried.
-
## What's next
- Learn how [guarantee timestamp enables tunable consistency in Milvus](consistency.md)
-- Learn how to [search with Time Travel](timetravel.md)
-
diff --git a/preview/site/en/reference/timetravel_ref.md b/preview/site/en/reference/timetravel_ref.md
deleted file mode 100644
index 05a6dcbdc..000000000
--- a/preview/site/en/reference/timetravel_ref.md
+++ /dev/null
@@ -1,74 +0,0 @@
----
-id: timetravel_ref.md
-related_key: Time Travel
-summary: Learn the design and implementation details of Time Travel in Milvus.
----
-
-# Time Travel
-
-This topic introduces the Time Travel feature in detail. See [Search with Time Travel](timetravel.md) for more information about how to use this feature.
-
-## Overview
-
-Time Travel is a feature that allows you to access historical data at any point within a specified time period, making it possible to query, restore, and back up data in the past. With Time Travel, you can:
-
-- Search or query data that has been deleted.
-
-- Restore data that has been deleted or updated.
-
-- Back up data before a specific point of time.
-
-Unlike traditional databases that use snapshots or retain data to support the Time Travel feature, the Milvus vector database maintains a timeline for all data insert or delete operations and adopts a timestamp mechanism. This means you can specify the timestamp in a search or query to retrieve data at a specific point of time in the past to significantly reduce maintenance costs.
-
-## Timestamp in Milvus
-
-In the Milvus vector database, each entity has its own timestamp attribute. All data manipulation language (DML) operations including data insertion and deletion, mark entities with a timestamp. For instance, if you inserted several entities all at one go, this batch of data will be marked with timestamps and share the same timestamp value.
-
-### DML operations
-
-When the proxy receives a data insert or delete request, it also gets a timestamp from the [root coord](https://milvus.io/docs/v2.1.x/four_layers.md#Root-coordinator-root-coord). Then, the proxy adds the timestamp as an additional field to the inserted or deleted data. Timestamp is a data field just like primary key (`pk`). The timestamp field is stored together with other data fields of a collection.
-
-When you load a collection to memory, all data in the collection, including their corresponding timestamps, are loaded into memory.
-
-### Search or query with Time Travel
-
-`travel_timestamp` is a timestamp specified by you to indicate that you need to conduct a query or search on the data view before this point in time. In parallel to a traditional database, you can consider `travel_timestamp` as a data snapshot, and the query or search needs to be conducted on the data in this snapshot.
-
-During a search, if the search request received by the proxy contains the parameter, `travel_timestamp`, the value of this parameter will be passed to [segcore](https://github.com/milvus-io/milvus/tree/master/docs/design_docs/segcore), the execution engine which supports concurrent insertion, deletion, query, index loading, monitoring and statistics of a segment data in memory. The segcore filters the search results by timestamp. In other words, you can deem the Time Travel feature as data filtering with the condition limited by the value of `travel_timestamp`. This means that data whose timestamp value is greater than `travel_timestamp` are filtered out and will not be involved in the search or query process. The expression for filtering is `data.timestamp <= travel_timestamp`.
-
-## Bitset for timestamp
-
-To go into details, searches and queries with filtering in [knowhere](https://github.com/milvus-io/milvus/blob/master/docs/design_docs/knowhere_design.md) are facilitated by bitset. And the underlying mechanism behind Time Travel is enabled by bitset.
-
-When a search is conducted, the segcore obtains a bitset indicating if the timestamp meets the condition. Then Milvus judges the range of data to query or search based on this bitset.
-
-### Sealed segment
-
-When loading a sealed segment, Milvus loads all the timestamps to memory and the segcore builds an index, `TimestampIndex` , on the timestamp field. The index contains information about the smallest and the largest timestamp value of this sealed segment, the offset and the row number of timestamps in this sealed segment.
-
-When you search with Time Travel, Milvus first filters the sealed segment according to the smallest and largest timestamp in the `TimestampIndex`:
-
-- If the value you set for `travel_timestamp` is greater than the largest timestamp of the segment, this means all the data in this segment meets the requirement. Therefore, the bitset of the data in this segment is marked as 1.
-- If the value you set for `travel_timestamp` is smaller than the smallest timestamp of the segment, this means the data in this segment does not meet the requirement. Therefore, the bitset of the data in this segment is marked as 0.
-- If the value you set for `travel_timestamp` is between the largest and the smallest timestamp of the segment, Milvus compares the timestamps in the segment one by one, and generates a bitset accordingly. In the bitset, if the data meet the requirement, they are marked with 1, and 0 if they do not.
-
-![Time_travel](../../../assets/time_travel.png "Time Travel illustration.")
-
-### Growing segment
-
-For growing segments, you do not need to load the collection to memory. All inserted data exists in memory, with the timestamp field attached. Data in growing segments are sorted according to the order of timestamp. When new data are inserted, they are added to the segment in the order of their timestamp. Segment data are organized in segcore memory in the same way.
-
-When you search with Time Travel, Milvus uses binary search to find the first offset, or the row number data, with their timestamp value greater than the value you set for the `travel_timestamp` parameter. Then subsequent operations including filtering and vector similarity search are conducted within this range of offsets.
-
-## What's next
-After learning how Time Travel works in Milvus, you might also want to:
-
-- Learn how to [search with Time Travel](timetravel.md)
-- Learn the [architecture](architecture_overview.md) of Milvus.
-- Understand [how data are processed](data_processing.md) in Milvus.
-
-
-
-
-
-
diff --git a/preview/site/en/reference/users_and_roles.md b/preview/site/en/reference/users_and_roles.md
index 2cf6589ce..ceb5b2823 100644
--- a/preview/site/en/reference/users_and_roles.md
+++ b/preview/site/en/reference/users_and_roles.md
@@ -2,6 +2,7 @@
id: users_and_roles.md
related_key: users, roles
summary: Learn about the definition of users, roles, objects, and privileges in role-based access control (RBAC).
+title: Users and Roles
---
# Users and Roles
@@ -22,45 +23,67 @@ The following figure illustrates the relationship between objects, privileges, r
The relationship between object, privilege, role and user.
-Milvus creates a `root` user by default. The `root` user is granted the `admin` privileges, which means that this `root` user can have access to all resources and perform all actions.
+Milvus creates a `root` user by default with a default password `Milvus`. The `root` user is granted the `admin` privileges, which means that this `root` user can have access to all resources and perform all actions.
If a user is bind with a `public` role, this user is entitled to the privileges of `DescribeCollection`, `ShowCollections`, and `IndexDetail`.
The following table lists the values you can choose when [enabling RBAC](rbac.md).
-| Object name | Privilege name | Relevant API description on the client side |
-|-------------|--------------------|---------------------------------------------------|
-| Collection | CreateIndex | CreateIndex |
-| Collection | DropIndex | DropIndex |
-| Collection | IndexDetail | DescribeIndex/GetIndexState/GetIndexBuildProgress |
-| Collection | Load | LoadCollection |
-| Collection | Release | ReleaseCollection |
-| Collection | Insert | Insert |
-| Collection | Delete | Delete |
-| Collection | Search | Search |
-| Collection | Flush | Flush |
-| Collection | Query | Query |
-| Collection | GetStatistics | GetCollectionStatistics |
-| Collection | Compaction | Compact |
-| Collection | Alias | CreateAlias/DropAlias/AlterAlias |
-| Collection | Import | BulkInsert/Import |
-| Collection | LoadBalance | LoadBalance |
-| Global | *(All) | All API operation permissions in this table |
-| Global | CreateCollection | CreateCollection |
-| Global | DropCollection | DropCollection |
-| Global | DescribeCollection | DescribeCollection |
-| Global | ShowCollections | ShowCollections |
-| Global | CreateOwnership | CreateUser CreateRole |
-| Global | DropOwnership | DeleteCredential DropRole |
-| Global | SelectOwnership | SelectRole/SelectGrant |
-| Global | ManageOwnership | OperateUserRole OperatePrivilege |
-| User | UpdateUser | UpdateCredential |
-| User | SelectUser | SelectUser |
-
+| Object name | Privilege name | Relevant API description on the client side |
+| ----------- | --------------------- | ------------------------------------------------- |
+| Collection | CreateIndex | CreateIndex |
+| Collection | DropIndex | DropIndex |
+| Collection | IndexDetail | DescribeIndex/GetIndexState/GetIndexBuildProgress |
+| Collection | Load | LoadCollection/GetLoadingProgress/GetLoadState |
+| Collection | GetLoadingProgress | GetLoadingProgress |
+| Collection | GetLoadState | GetLoadState |
+| Collection | Release | ReleaseCollection |
+| Collection | Insert | Insert |
+| Collection | Delete | Delete |
+| Collection | Upsert | Upsert |
+| Collection | Search | Search |
+| Collection | Flush | Flush/GetFlushState |
+| Collection | GetFlushState | GetFlushState |
+| Collection | Query | Query |
+| Collection | GetStatistics | GetCollectionStatistics |
+| Collection | Compaction | Compact |
+| Collection | Import | BulkInsert/Import |
+| Collection | LoadBalance | LoadBalance |
+| Collection | CreatePartition | CreatePartition |
+| Collection | DropPartition | DropPartition |
+| Collection | ShowPartitions | ShowPartitions |
+| Collection | HasPartition | HasPartition |
+| Global | All | All API operation permissions in this table |
+| Global | CreateCollection | CreateCollection |
+| Global | DropCollection | DropCollection |
+| Global | DescribeCollection | DescribeCollection |
+| Global | ShowCollections | ShowCollections |
+| Global | RenameCollection | RenameCollection |
+| Global | FlushAll | FlushAll |
+| Global | CreateOwnership | CreateUser CreateRole |
+| Global | DropOwnership | DeleteCredential DropRole |
+| Global | SelectOwnership | SelectRole/SelectGrant |
+| Global | ManageOwnership | OperateUserRole OperatePrivilege |
+| Global | CreateResourceGroup | CreateResourceGroup |
+| Global | DropResourceGroup | DropResourceGroup |
+| Global | DescribeResourceGroup | DescribeResourceGroup |
+| Global | ListResourceGroups | ListResourceGroups |
+| Global | TransferNode | TransferNode |
+| Global | TransferReplica | TransferReplica |
+| Global | CreateDatabase | CreateDatabase |
+| Global | DropDatabase | DropDatabase |
+| Global | ListDatabases | ListDatabases |
+| Global | CreateAlias | CreateAlias |
+| Global | DropAlias | DropAlias |
+| Global | DescribeAlias | DescribeAlias |
+| Global | ListAliases | ListAliases |
+| User | UpdateUser | UpdateCredential |
+| User | SelectUser | SelectUser |
Object and privilege names are case-sensitive.
-To grant all privileges to a global object, use "*" for privilege name.
+To grant all privileges to a kind of object, like Collection, Global, User, use "*" for privilege name.
+The "*" privilege name for the Global object doesn't include the All privilege, because the All privilege includes all permissions, including any collection and user object.
## What's next
diff --git a/preview/site/en/release_notes.md b/preview/site/en/release_notes.md
index 76740cc2d..bdb6f5c45 100644
--- a/preview/site/en/release_notes.md
+++ b/preview/site/en/release_notes.md
@@ -1,288 +1,453 @@
---
id: release_notes.md
summary: Milvus Release Notes
+title: Release Notes
---
# Release Notes
-Find out what’s new in Milvus! This page summarizes information about new features, improvements, known issues, and bug fixes in each release. You can find the release notes for each released version after v2.2.0 in this section. We suggest that you regularly visit this page to learn about updates.
+Find out what’s new in Milvus! This page summarizes new features, improvements, known issues, and bug fixes in each release. You can find the release notes for each released version after v2.4.0 in this section. We suggest that you regularly visit this page to learn about updates.
+
+## v2.4.5
+
+Release date: June 18, 2024
+
+| Milvus version | Python SDK version | Java SDK version | Node.js SDK version |
+|----------------|--------------------| --------------------| --------------------|
+| 2.4.5 | 2.4.4 | 2.4.1 | 2.4.3 |
+
+The release of Milvus 2.4.5 introduces several improvements and bug fixes to enhance performance, stability, and functionality. Milvus 2.4.5 simplifies sparse, float16, and bfloat16 vector search with auto-indexing, speeds up searches, deletions, and compactions with Bloom filter optimizations, and tackles data management through faster loading times and import L0 segment support. It also introduces the sparse HNSW index for efficient high-dimensional sparse data search, enhances the RESTful API with sparse float vector support, and fixes critical bugs for better stability.
+
+### New Features
+
+- Added rbac support to describe/alter database api ([#33804](https://github.com/milvus-io/milvus/pull/33804))
+- Supported building the HNSW index for sparse vectors ([#33653](https://github.com/milvus-io/milvus/pull/33653), [#33662](https://github.com/milvus-io/milvus/pull/33662))
+- Supported building the Disk index for binary vector ([#33575](https://github.com/milvus-io/milvus/pull/33575))
+- Supported sparse vector type on RESTful v2 ([#33555](https://github.com/milvus-io/milvus/pull/33555))
+- Add /management/stop RESTful api to stop a component ([#33799](https://github.com/milvus-io/milvus/pull/33799))
+
+### Improvements
+
+- Set maxPartitionNum default value to 1024 ([#33950](https://github.com/milvus-io/milvus/pull/33950))
+- Enabled to Force reset connection for unavailable error ([#33910](https://github.com/milvus-io/milvus/pull/33910))
+- Enabled flush rate limiter of collection level ([#33864](https://github.com/milvus-io/milvus/pull/33864))
+- Executed bloom filter apply in parallel to speed up segment predict ([#33793](https://github.com/milvus-io/milvus/pull/33793))
+- Used fastjson lib for unmarshal delete log to speed up json.Unmarshal([#33802](https://github.com/milvus-io/milvus/pull/33802))
+- Used BatchPkExist to reduce bloom filter func call cost ([#33752](https://github.com/milvus-io/milvus/pull/33752))
+- Speeded up the loading of small collections ([#33746](https://github.com/milvus-io/milvus/pull/33746))
+- Supported import delete data to L0 segment ([#33712](https://github.com/milvus-io/milvus/pull/33712))
+- Skipped mark compaction tasks to be timeouted to aviod executing the same task over and over again ([#33833](https://github.com/milvus-io/milvus/pull/33833))
+- Handled float16 and bfloat16 vectors as same as BinaryVector in numpy bulk insert ([#33788](https://github.com/milvus-io/milvus/pull/33788))
+- Added the includeCurrentMsg flag for the seek method ([#33743](https://github.com/milvus-io/milvus/pull/33743))
+- Added mergeInterval, targetBufSize, maxTolerantLagof msgdispatcher to configs ([#33680](https://github.com/milvus-io/milvus/pull/33680))
+- Improved GetVectorByID of sparse vector ([#33652](https://github.com/milvus-io/milvus/pull/33652))
+- Removed StringPrimarykey to reduce unnecessary copy and function call cost ([#33649](https://github.com/milvus-io/milvus/pull/33649))
+- Added autoindex mapping for binary/sparse data type ([#33625](https://github.com/milvus-io/milvus/pull/33625))
+- Optimized some cache to reduce memory usage ([#33560](https://github.com/milvus-io/milvus/pull/33560))
+- Abstracted execute interface for import/preimport task ([#33607](https://github.com/milvus-io/milvus/pull/33607))
+- Used map pk to timestamp in buffer insert to reduce bf causes ([#33582](https://github.com/milvus-io/milvus/pull/33582))
+- Avoided redundant meta operations of import ([#33519](https://github.com/milvus-io/milvus/pull/33519))
+- Improve logs by logging better disk quota info, adding UseDefaultConsistency flag, removing unnecessary logs ([#33597](https://github.com/milvus-io/milvus/pull/33597), [#33644](https://github.com/milvus-io/milvus/pull/33644), [#33670](https://github.com/milvus-io/milvus/pull/33670))
+
+### Bug fixes
+
+- Fixed a bug that queryHook unable to recognize vector type ([#33911](https://github.com/milvus-io/milvus/pull/33911))
+- Prevented use captured iteration variable partitionID ([#33970](https://github.com/milvus-io/milvus/pull/33970))
+- Fixed a bug that may cause Milvus to be unable to create AutoIndex on binary and sparse vectors ([#33867](https://github.com/milvus-io/milvus/pull/33867))
+- Fixed a bug that may cause indexnode to retry creating index on invalid index params of all vectors([#33878](https://github.com/milvus-io/milvus/pull/33878))
+- Fixed the bug that when loads and releases happen concurrently may crash the Server([#33699](https://github.com/milvus-io/milvus/pull/33699))
+- Improved cache consistency for configuration values ([#33797](https://github.com/milvus-io/milvus/pull/33797))
+- Prevented possible data loss during deletion ([#33821](https://github.com/milvus-io/milvus/pull/33821))
+- Ensured the DroppedAt field (likely deletion timestamp) is set after dropping collections([#33767](https://github.com/milvus-io/milvus/pull/33767))
+- Fixed an issue that might have caused Milvus to handle binary vector data sizes incorrectly([#33751](https://github.com/milvus-io/milvus/pull/33751))
+- Prevented sensitive Kafka credentials from being logged in plain text.([#33694](https://github.com/milvus-io/milvus/pull/33694), [#33747](https://github.com/milvus-io/milvus/pull/33747))
+- Ensured Milvus can correctly import data with multiple vector fields.([#33724](https://github.com/milvus-io/milvus/pull/33724))
+- Enhanced import reliability by checking if an import job exists before starting. ([#33673](https://github.com/milvus-io/milvus/pull/33673))
+- Improved handling of the sparse HNSW index (internal functionality) ([#33714](https://github.com/milvus-io/milvus/pull/33714))
+- Cleaned vector memory to avoid memory leak([#33708](https://github.com/milvus-io/milvus/pull/33708))
+- Ensured smoother asynchronous warmup by fixing a state lock issue.([#33687](https://github.com/milvus-io/milvus/pull/33687))
+- Addressed a bug that might have caused missing results in query iterators. ([#33506](https://github.com/milvus-io/milvus/pull/33506))
+- Fixed a bug that might cause import segment size is uneven ([#33634](https://github.com/milvus-io/milvus/pull/33634))
+- Fixed incorrect data size handling for bf16, fp16, and binary vector types ([#33488](https://github.com/milvus-io/milvus/pull/33488))
+- Improved stability by addressing potential issues with the L0 compactor([#33564](https://github.com/milvus-io/milvus/pull/33564))
+- Ensured dynamic configuration updates are reflected correctly in the cache. ([#33590](https://github.com/milvus-io/milvus/pull/33590))
+- Improved the accuracy of the RootCoordQuotaStates metric ([#33601](https://github.com/milvus-io/milvus/pull/33601))
+- Ensured accurate reporting of the number of loaded entities in metric([#33522](https://github.com/milvus-io/milvus/pull/33522))
+- Provided more complete information in exception logs. ([#33396](https://github.com/milvus-io/milvus/pull/33396))
+- Optimized query pipeline by removing unnecessary group checker ([#33485](https://github.com/milvus-io/milvus/pull/33485))
+- Used the local storage path for a more accurate disk capacity check on the index node. ([#33505](https://github.com/milvus-io/milvus/pull/33505))
+- Corrected hasMoreResult may return false when hit number larger than limit ([#33642](https://github.com/milvus-io/milvus/pull/33642))
+- Delayed load bf in delegator to prevent bfs been loaded over and over again when worker has no more memory ([#33650](https://github.com/milvus-io/milvus/pull/33650))- Fixed a bug that queryHook unable to recognize vector type ([#33911](https://github.com/milvus-io/milvus/pull/33911))
+- Prevented use captured iteration variable partitionID ([#33970](https://github.com/milvus-io/milvus/pull/33970))
+- Fixed a bug that may cause Milvus to be unable to create AutoIndex on binary and sparse vectors ([#33867](https://github.com/milvus-io/milvus/pull/33867))
+- Fixed a bug that may cause indexnode to retry creating index on invalid index params of all vectors([#33878](https://github.com/milvus-io/milvus/pull/33878))
+- Fixed the bug that when loads and releases happen concurrently may crash the Server([#33699](https://github.com/milvus-io/milvus/pull/33699))
+- Improved cache consistency for configuration values ([#33797](https://github.com/milvus-io/milvus/pull/33797))
+- Prevented possible data loss during deletion ([#33821](https://github.com/milvus-io/milvus/pull/33821))
+- Ensured the DroppedAt field (likely deletion timestamp) is set after dropping collections([#33767](https://github.com/milvus-io/milvus/pull/33767))
+- Fixed an issue that might have caused Milvus to handle binary vector data sizes incorrectly([#33751](https://github.com/milvus-io/milvus/pull/33751))
+- Prevented sensitive Kafka credentials from being logged in plain text.([#33694](https://github.com/milvus-io/milvus/pull/33694), [#33747](https://github.com/milvus-io/milvus/pull/33747))
+- Ensured Milvus can correctly import data with multiple vector fields.([#33724](https://github.com/milvus-io/milvus/pull/33724))
+- Enhanced import reliability by checking if an import job exists before starting. ([#33673](https://github.com/milvus-io/milvus/pull/33673))
+- Improved handling of the sparse HNSW index (internal functionality) ([#33714](https://github.com/milvus-io/milvus/pull/33714))
+- Cleaned vector memory to avoid memory leak([#33708](https://github.com/milvus-io/milvus/pull/33708))
+- Ensured smoother asynchronous warmup by fixing a state lock issue.([#33687](https://github.com/milvus-io/milvus/pull/33687))
+- Addressed a bug that might have caused missing results in query iterators. ([#33506](https://github.com/milvus-io/milvus/pull/33506))
+- Fixed a bug that might cause import segment size is uneven ([#33634](https://github.com/milvus-io/milvus/pull/33634))
+- Fixed incorrect data size handling for bf16, fp16, and binary vector types ([#33488](https://github.com/milvus-io/milvus/pull/33488))
+- Improved stability by addressing potential issues with the L0 compactor([#33564](https://github.com/milvus-io/milvus/pull/33564))
+- Ensured dynamic configuration updates are reflected correctly in the cache. ([#33590](https://github.com/milvus-io/milvus/pull/33590))
+- Improved the accuracy of the RootCoordQuotaStates metric ([#33601](https://github.com/milvus-io/milvus/pull/33601))
+- Ensured accurate reporting of the number of loaded entities in metric([#33522](https://github.com/milvus-io/milvus/pull/33522))
+- Provided more complete information in exception logs. ([#33396](https://github.com/milvus-io/milvus/pull/33396))
+- Optimized query pipeline by removing unnecessary group checker ([#33485](https://github.com/milvus-io/milvus/pull/33485))
+- Used the local storage path for a more accurate disk capacity check on the index node. ([#33505](https://github.com/milvus-io/milvus/pull/33505))
+- Corrected hasMoreResult may return false when hit number larger than limit ([#33642](https://github.com/milvus-io/milvus/pull/33642))
+- Delayed load bf in delegator to prevent bfs been loaded over and over again when worker has no more memory ([#33650](https://github.com/milvus-io/milvus/pull/33650))
+
+## v2.4.4
+
+Release date: May 31, 2024
+
+| Milvus version | Python SDK version | Java SDK version | Node.js SDK version |
+|----------------|--------------------| --------------------| --------------------|
+| 2.4.4 | 2.4.3 | 2.4.1 | 2.4.2 |
+
+Milvus v2.4.4 includes several critical bug fixes and improvements aimed at enhancing performance and stability. Notably, we've **resolved a critical issue where bulk insert statistics logs were incorrectly garbage collected**, potentially affecting data integrity. **We strongly recommend all v2.4 users upgrade to this version to benefit from these fixes.**
+
+**If you are using bulk insert, upgrade to v2.4.4 at the earliest opportunity for data integrity.**
+
+### Critical bug fixes
+
+- Filled stats log ID and validated its correctness ([#33478](https://github.com/milvus-io/milvus/pull/33478))
+
+### Improvements
+
+- Upgraded bitset for ARM SVE ([#33440](https://github.com/milvus-io/milvus/pull/33440))
+- Enabled Milvus compilation with GCC-13 ([#33441](https://github.com/milvus-io/milvus/pull/33441))
+
+### Bug fixes
+
+- Displayed empty collections when all privilege is granted ([#33454](https://github.com/milvus-io/milvus/pull/33454))
+- Ensured CMake downloads and installs for the current platform, not just x86_64 ([#33439](https://github.com/milvus-io/milvus/pull/33439))
+
+## v2.4.3
+
+Release date: May 29, 2024
+
+| Milvus version | Python SDK version | Java SDK version | Node.js SDK version |
+|----------------|--------------------| --------------------| --------------------|
+| 2.4.3 | 2.4.3 | 2.4.1 | 2.4.2 |
+
+Milvus version 2.4.3 introduced a host of features, improvements, and bug fixes to elevate performance and reliability. Notable enhancements included support for sparse float vector bulk insert and optimized bloom filter acceleration. Improvements covered various areas, from dynamic configuration updates to memory usage optimization. Bug fixes addressed critical issues like panic scenarios and ensured smoother system operations. This release underscored Milvus's ongoing commitment to enhancing functionality, optimizing performance, and delivering a robust user experience.
-## 2.2.3
-Release date: 10 Feburary, 2023
-
-| Milvus version | Python SDK version | Java SDK version | Go SDK version | Node.js SDK version |
-| -------------- | ------------------ | ---------------- | -------------- | ------------------- |
-| 2.2.3 | 2.2.2 | Coming soon | Coming soon | Coming soon |
-
-Milvus 2.2.3 introduces the rolling upgrade capability to Milvus clusters and brings high availability settings to RootCoords. The former greatly reduces the impacts brought by the upgrade and restart of the Milvus cluster in production to the minimum, while the latter enables coordinators to work in active-standby mode and ensures a short failure recovery time of no more than 30 seconds.
+### Features
-In this release, Milvus also ships with a lot of improvements and enhancements in performance, including a fast bulk-insert experience with reduced memory usage and less loading time.
+- Supported sparse float vector bulk insert for binlog/json/parquet ([#32649](https://github.com/milvus-io/milvus/pull/32649))
+
+### Improvements
+
+- Implemented Datacoord/node watch channel based on RPC ([#32036](https://github.com/milvus-io/milvus/pull/32036))
+- Optimized bloom filter to accelerate delete filtering ([#32642](https://github.com/milvus-io/milvus/pull/32642), [#33329](https://github.com/milvus-io/milvus/pull/33329), [#33284](https://github.com/milvus-io/milvus/pull/33284))
+- Loaded raw data via mmap if scalar index did not have raw data ([#33317](https://github.com/milvus-io/milvus/pull/33317))
+- Synced milvus config to milvus.yaml ([#33322](https://github.com/milvus-io/milvus/pull/33322), [#32920](https://github.com/milvus-io/milvus/pull/32920), [#32857](https://github.com/milvus-io/milvus/pull/32857), [#32946](https://github.com/milvus-io/milvus/pull/32946))
+- Updated knowhere version ([#33310](https://github.com/milvus-io/milvus/pull/33310), [#32931](https://github.com/milvus-io/milvus/pull/32931), [#33043](https://github.com/milvus-io/milvus/pull/33043))
+- Enabled dynamic updating of balancer policy in QueryCoord ([#33272](https://github.com/milvus-io/milvus/pull/33272))
+- Used a pre-built logger in the write buffer to minimize logger allocation ([#33304](https://github.com/milvus-io/milvus/pull/33304))
+- Improved parameter checking ([#32777](https://github.com/milvus-io/milvus/pull/32777), [#33271](https://github.com/milvus-io/milvus/pull/33271), [#33218](https://github.com/milvus-io/milvus/pull/33218))
+- Added a parameter to ignore incorrect message IDs in the checkpoint ([#33249](https://github.com/milvus-io/milvus/pull/33249))
+- Added config to control initialization failure handling for plugins ([#32680](https://github.com/milvus-io/milvus/pull/32680))
+- Added score compute consistency config for knowhere ([#32997](https://github.com/milvus-io/milvus/pull/32997))
+- Introduced a configuration option to control the initialization of public role permissions ([#33174](https://github.com/milvus-io/milvus/pull/33174))
+- Optimized memory usage when reading fields ([#33196](https://github.com/milvus-io/milvus/pull/33196))
+- Refined implementation of Channel Manager v2 ([#33172](https://github.com/milvus-io/milvus/pull/33172), [#33121](https://github.com/milvus-io/milvus/pull/33121), [#33014](https://github.com/milvus-io/milvus/pull/33014))
+- Added feature to track the size of data in memory for binlog ([#33025](https://github.com/milvus-io/milvus/pull/33025))
+- Added metrics for segment index files size ([#32979](https://github.com/milvus-io/milvus/pull/32979), [#33305](https://github.com/milvus-io/milvus/pull/33305))
+- Replaced Delete with DeletePartialMatch to remove metrics ([#33029](https://github.com/milvus-io/milvus/pull/33029))
+- Got related data size according to segment type ([#33017](https://github.com/milvus-io/milvus/pull/33017))
+- Cleaned channel node info in meta store ([#32988](https://github.com/milvus-io/milvus/pull/32988))
+- Removed rootcoord from datanode broker ([#32818](https://github.com/milvus-io/milvus/pull/32818))
+- Enabled batch uploading ([#32788](https://github.com/milvus-io/milvus/pull/32788))
+- Changed default partition number to 16 when using partition key ([#32950](https://github.com/milvus-io/milvus/pull/32950))
+- Improved reduce performance on very large top-k queries ([#32871](https://github.com/milvus-io/milvus/pull/32871))
+- Utilized TestLocations ability to accelerate write & compaction ([#32948](https://github.com/milvus-io/milvus/pull/32948))
+- Optimized plan parser pool to avoid unnecessary recycling ([#32869](https://github.com/milvus-io/milvus/pull/32869))
+- Improved load speed ([#32898](https://github.com/milvus-io/milvus/pull/32898))
+- Used collection default consistency level for restv2 ([#32956](https://github.com/milvus-io/milvus/pull/32956))
+- Added cost response for the rest API ([#32620](https://github.com/milvus-io/milvus/pull/32620))
+- Enabled channel exclusive balance policy ([#32911](https://github.com/milvus-io/milvus/pull/32911))
+- Exposed describedatabase API in proxy ([#32732](https://github.com/milvus-io/milvus/pull/32732))
+- Utilized coll2replica mapping when getting RG by collection ([#32892](https://github.com/milvus-io/milvus/pull/32892))
+- Added more tracing for search & query ([#32734](https://github.com/milvus-io/milvus/pull/32734))
+- Supported dynamic config for opentelemetry trace ([#32169](https://github.com/milvus-io/milvus/pull/32169))
+- Avoided iteration over channel results when updating leaderview ([#32887](https://github.com/milvus-io/milvus/pull/32887))
+- Optimized vector offsets handling for parquet ([#32822](https://github.com/milvus-io/milvus/pull/32822))
+- Improved datacoord segment filtering with collection ([#32831](https://github.com/milvus-io/milvus/pull/32831))
+- Adjusted log level and frequency ([#33042](https://github.com/milvus-io/milvus/pull/33042), [#32838](https://github.com/milvus-io/milvus/pull/32838), [#33337](https://github.com/milvus-io/milvus/pull/33337))
+- Enabled stopping balance after balance had been suspended ([#32812](https://github.com/milvus-io/milvus/pull/32812))
+- Updated shard leader cache when leader location changed ([#32470](https://github.com/milvus-io/milvus/pull/32470))
+- Removed deprecated API and field ([#32808](https://github.com/milvus-io/milvus/pull/32808), [#32704](https://github.com/milvus-io/milvus/pull/32704))
+- Added metautil.channel to convert string compare to int ([#32749](https://github.com/milvus-io/milvus/pull/32749))
+- Added type info for payload writer error message and log when querynode found new collection ([#32522](https://github.com/milvus-io/milvus/pull/32522))
+- Checked partition number when creating collection with partition key ([#32670](https://github.com/milvus-io/milvus/pull/32670))
+- Removed legacy l0 segment if watch failed ([#32725](https://github.com/milvus-io/milvus/pull/32725))
+- Improved printing type of request ([#33319](https://github.com/milvus-io/milvus/pull/33319))
+- Checked array field data was nil before getting the type ([#33311](https://github.com/milvus-io/milvus/pull/33311))
+- Returned error when startup Delete/AddNode node operation failed ([#33258](https://github.com/milvus-io/milvus/pull/33258))
+- Allowed datanode's server ID to be updated ([#31597](https://github.com/milvus-io/milvus/pull/31597))
+- Unified querynode metrics cleanup in collection release ([#32805](https://github.com/milvus-io/milvus/pull/32805))
+- Fixed scalar auto index config incorrect version ([#32795](https://github.com/milvus-io/milvus/pull/32795))
+- Refined index param check for create/alter index ([#32712](https://github.com/milvus-io/milvus/pull/32712))
+- Removed redundant replica recovery ([#32985](https://github.com/milvus-io/milvus/pull/32985))
+- Enabled channel meta table to write more than 200k segments ([#33300](https://github.com/milvus-io/milvus/pull/33300))
+
+### Bug fixes
+
+- Fixed panic when the database didn't exist in the rate limit interceptor ([#33308](https://github.com/milvus-io/milvus/pull/33308))
+- Fixed quotacenter metrics collection failure due to incorrect parameters ([#33399](https://github.com/milvus-io/milvus/pull/33399))
+- Fixed panic if processactivestandby returned an error ([#33372](https://github.com/milvus-io/milvus/pull/33372))
+- Fixed search result truncation in restful v2 when nq > 1 ([#33363](https://github.com/milvus-io/milvus/pull/33363))
+- Added database name field for role operations in restful v2 ([#33291](https://github.com/milvus-io/milvus/pull/33291))
+- Fixed global rate limit not working ([#33336](https://github.com/milvus-io/milvus/pull/33336))
+- Fixed panic caused by failure of building index ([#33314](https://github.com/milvus-io/milvus/pull/33314))
+- Added validation for sparse vector in segcore to ensure legality ([#33312](https://github.com/milvus-io/milvus/pull/33312))
+- Removed task from syncmgr after task completion ([#33303](https://github.com/milvus-io/milvus/pull/33303))
+- Fixed partition key filtering failure during data import ([#33277](https://github.com/milvus-io/milvus/pull/33277))
+- Fixed inability to generate traceID when using noop exporter ([#33208](https://github.com/milvus-io/milvus/pull/33208))
+- Improved query results retrieval ([#33179](https://github.com/milvus-io/milvus/pull/33179))
+- Marked channel checkpoint dropped to prevent checkpoint lag metrics leakage ([#33201](https://github.com/milvus-io/milvus/pull/33201))
+- Fixed query node getting stuck during stopping progress ([#33154](https://github.com/milvus-io/milvus/pull/33154))
+- Fixed missing segments in flush response ([#33061](https://github.com/milvus-io/milvus/pull/33061))
+- Made submit operation idempotent ([#33053](https://github.com/milvus-io/milvus/pull/33053))
+- Allocated new slice for each batch in streaming reader ([#33360](https://github.com/milvus-io/milvus/pull/33360))
+- Cleaned offline node from resource group after QueryCoord restart ([#33233](https://github.com/milvus-io/milvus/pull/33233))
+- Removed l0 compactor in completedCompactor ([#33216](https://github.com/milvus-io/milvus/pull/33216))
+- Reset quota value when initializing the limiter ([#33152](https://github.com/milvus-io/milvus/pull/33152))
+- Fixed issue where etcd limit was exceeded ([#33041](https://github.com/milvus-io/milvus/pull/33041))
+- Resolved etcd transaction limit exceedance due to too many fields ([#33040](https://github.com/milvus-io/milvus/pull/33040))
+- Removed RLock re-entry in GetNumRowsOfPartition ([#33045](https://github.com/milvus-io/milvus/pull/33045))
+- Started LeaderCacheObserver before SyncAll ([#33035](https://github.com/milvus-io/milvus/pull/33035))
+- Enabled balancing of released standby channel ([#32986](https://github.com/milvus-io/milvus/pull/32986))
+- Initialized access logger before server initialization ([#32976](https://github.com/milvus-io/milvus/pull/32976))
+- Made compactor capable of clearing empty segments ([#32821](https://github.com/milvus-io/milvus/pull/32821))
+- Filled deltalog entry number and time range in l0 compactions ([#33004](https://github.com/milvus-io/milvus/pull/33004))
+- Fixed proxy crash due to shard leader cache data race ([#32971](https://github.com/milvus-io/milvus/pull/32971))
+- Corrected time unit for load index metric ([#32935](https://github.com/milvus-io/milvus/pull/32935))
+- Fixed issue where segment on stopping query node couldn't be released successfully ([#32929](https://github.com/milvus-io/milvus/pull/32929))
+- Fixed index resource estimation ([#32842](https://github.com/milvus-io/milvus/pull/32842))
+- Set channel checkpoint to delta position ([#32878](https://github.com/milvus-io/milvus/pull/32878))
+- Made syncmgr lock key before returning future ([#32865](https://github.com/milvus-io/milvus/pull/32865))
+- Ensured inverted index had only one segment ([#32858](https://github.com/milvus-io/milvus/pull/32858))
+- Fixed compaction trigger choosing two identical segments ([#32800](https://github.com/milvus-io/milvus/pull/32800))
+- Fixed issue where partition name could not be specified in binlog import ([#32730](https://github.com/milvus-io/milvus/pull/32730), [#33027](https://github.com/milvus-io/milvus/pull/33027))
+- Made dynamic column optional in parquet import ([#32738](https://github.com/milvus-io/milvus/pull/32738))
+- Skipped checking auto ID when inserting data ([#32775](https://github.com/milvus-io/milvus/pull/32775))
+- Validated number of rows for insert field data with schema ([#32770](https://github.com/milvus-io/milvus/pull/32770))
+- Added Wrapper and Keepalive for CTraceContext IDs ([#32746](https://github.com/milvus-io/milvus/pull/32746))
+- Fixed issue where database name was not found in the datacoord meta object ([#33412](https://github.com/milvus-io/milvus/pull/33412))
+- Synchronized dropped segment for dropped partition ([#33332](https://github.com/milvus-io/milvus/pull/33332))
+- Fixed quotaCenter metrics collection failure due to incorrect parameters ([#33399](https://github.com/milvus-io/milvus/pull/33399))
+
+## v2.4.1
+
+Release date: May 6, 2024
+
+| Milvus version | Python SDK version | Java SDK version | Node.js SDK version |
+|----------------|--------------------| --------------------| --------------------|
+| 2.4.1 | 2.4.1 | 2.4.0 | 2.4.2 |
+
+Milvus version 2.4.1 brings numerous improvements and bug fixes that aim to enhance the software's performance, observability, and stability. These improvements include a declarative resource group API, enhanced bulk insert functionality that supports Float16/BFloat16 vector data types, a refined garbage collection (GC) mechanism that reduces list operations for object storage, and other changes related to performance optimizations. Additionally, bug fixes address issues such as compilation errors, failed fuzzy matches on newline characters, incorrect parameter datatypes for RESTful interfaces, and BulkInsert raising errors on numpy files when dynamic fields are enabled.
### Breaking changes
-In 2.2.3, the maximum number of fields in a collection is reduced from 256 to 64. ([#22030](https://github.com/milvus-io/milvus/pull/22030))
+- Discontinued support for delete with an empty filter expression. ([#32472](https://github.com/milvus-io/milvus/pull/32472))
### Features
-- Rolling upgrade
-
- The rolling upgrade feature allows Milvus to respond to incoming requests during the upgrade, which is not possible in previous releases. In such releases, upgrading a Milvus instance requires it to be stopped first and then restarted after the upgrade is complete, leaving all incoming requests unanswered.
-
- Related issues:
-
- - Graceful stop of index nodes implemented ([#21556](https://github.com/milvus-io/milvus/pull/21556))
- - Graceful stop of query nodes implemented ([#21528](https://github.com/milvus-io/milvus/pull/21528))
- - Auto-sync of segments on closing implemented ([#21576](https://github.com/milvus-io/milvus/pull/21576))
- - Graceful stop APIs and error messages improved ([#21580](https://github.com/milvus-io/milvus/pull/21580))
- - Issues identified and fixed in the code of QueryNode and QueryCoord ([#21565](https://github.com/milvus-io/milvus/pull/21565))
-
-- Coordinator HA
-
- Coordinator HA allows Milvus coordinators to work in active-standby mode to avoid single-point of failures.
-
- Related issues:
-
- - HA-related issues identified and fixed in QueryCoordV2 ([#21501](https://github.com/milvus-io/milvus/pull/21501))
- - Auto-registration on the startup of Milvus was implemented to prevent both coordinators from working as the active coordinators. ([#21641](https://github.com/milvus-io/milvus/pull/21641))
- - HA-related issues identified and fixed in RootCoords ([#21700](https://github.com/milvus-io/milvus/pull/21700))
- - Issues identified and fixed in active-standby switchover ([#21747](https://github.com/milvus-io/milvus/pull/21747))
-
-### Enhancements
-
-- Bulk-insert performance enhanced
-
- - Bulk-insert enhancement implemented ([#20986](https://github.com/milvus-io/milvus/pull/20986) [#21532](https://github.com/milvus-io/milvus/pull/21532))
- - JSON parser optimized for data import ([#21332](https://github.com/milvus-io/milvus/pull/21332))
- - Stream-reading NumPy data implemented ([#21540](https://github.com/milvus-io/milvus/pull/21540))
- - Bulk-insert progress report implemented ([#21612](https://github.com/milvus-io/milvus/pull/21612))
- - Issues identified and fixed so that Milvus checks indexes before flushes segments before bulk-insert is complete ([#21604](https://github.com/milvus-io/milvus/pull/21604))
- - Issues related to bulk-insert progress identified and fixed ([#21668](https://github.com/milvus-io/milvus/pull/21668))
- - Issues related to bulk-insert report identified and fixed ([#21758](https://github.com/milvus-io/milvus/pull/21758))
- - Issues identified and fixed so that Milvus does not seal failed segments while performing bulk-insert operations. ([#21779](https://github.com/milvus-io/milvus/pull/21779))
- - Issues identified and fixed so that bulk-insert operations do not cause a slow flush ([#21918](https://github.com/milvus-io/milvus/pull/21918))
- - Issues identified and fixed so that bulk-insert operations do not crash the DataNodes ([#22040](https://github.com/milvus-io/milvus/pull/22040))
- - Refresh option added to LoadCollection and LoadPartition APIs ([#21811](https://github.com/milvus-io/milvus/pull/21811))
- - Segment ID update on data import implemented ([#21583](https://github.com/milvus-io/milvus/pull/21583))
-
-- Memory usage reduced
-
- - Issues identified and fixed so that loading failures do not return insufficient memory ([#21592](https://github.com/milvus-io/milvus/pull/21592))
- - Arrow usage removed from FieldData ([#21523](https://github.com/milvus-io/milvus/pull/21523))
- - Memory usage reduced in indexing scalar fields ([#21970](https://github.com/milvus-io/milvus/pull/21970)) ([#21978](https://github.com/milvus-io/milvus/pull/21978))
-
-- Monitoring metrics optimized
-
- - Issues related to unregistered metrics identified and fixed ([#22098](https://github.com/milvus-io/milvus/pull/22098))
- - A new segment metric that counts the number of binlog files added ([#22085](https://github.com/milvus-io/milvus/pull/22085))
- - Many new metrics added ([#21975](https://github.com/milvus-io/milvus/pull/21975))
- - Minor fix on segment metric ([#21977](https://github.com/milvus-io/milvus/pull/21977))
-
-- Meta storage performance improved
-
- - Improved ListSegments performance for Datacoord catalog. ([#21600](https://github.com/milvus-io/milvus/pull/21600))
- - Improved LoadWithPrefix performance for SuffixSnapshot. ([#21601](https://github.com/milvus-io/milvus/pull/21601))
- - Removed redundant LoadPrefix requests for Catalog ListCollections. ([#21551](https://github.com/milvus-io/milvus/pull/21551)) ([#21594](https://github.com/milvus-io/milvus/pull/21594))
- - Added A WalkWithPrefix API for MetaKv interface. ([#21585](https://github.com/milvus-io/milvus/pull/21585))
- - Added GC for snapshot KV based on time-travel. ([#21417](https://github.com/milvus-io/milvus/pull/21417)) ([#21763](https://github.com/milvus-io/milvus/pull/21763))
-
-- Performance improved
-
- - Upgraded Knowhere to 1.3.7. ([#21735](https://github.com/milvus-io/milvus/pull/21735))
- - Upgraded Knowhere to 1.3.8. ([#22024](https://github.com/milvus-io/milvus/pull/22024))
- - Skipped search GRPC call for standalone. ([#21630](https://github.com/milvus-io/milvus/pull/21630))
- - Optimized some low-efficient code. ([#20529](https://github.com/milvus-io/milvus/pull/20529)) ([#21683](https://github.com/milvus-io/milvus/pull/21683))
- - Fixed fill the string field twice when string index exists. ([#21852](https://github.com/milvus-io/milvus/pull/21852)) ([#21865](https://github.com/milvus-io/milvus/pull/21865))
- - Used all() API for bitset check. ([#20462](https://github.com/milvus-io/milvus/pull/20462)) ([#21682](https://github.com/milvus-io/milvus/pull/21682))
-
-- Others
-
- - Implemented the GetLoadState API. ([#21533](https://github.com/milvus-io/milvus/pull/21533))
- - Added a task to unsubscribe dmchannel. ([#21513](https://github.com/milvus-io/milvus/pull/21513)) ([#21794](https://github.com/milvus-io/milvus/pull/21794))
- - Explicitly list the triggering reasons when Milvus denies reading/writing. ([#21553](https://github.com/milvus-io/milvus/pull/21553))
- - Verified and adjusted the number of rows in a segment before saving and passing SegmentInfo. ([#21200](https://github.com/milvus-io/milvus/pull/21200))
- - Added a segment seal policy by the number of binlog files. ([#21941](https://github.com/milvus-io/milvus/pull/21941))
- - Upgraded etcd to 3.5.5. ([#22007](https://github.com/milvus-io/milvus/pull/22007))
+- Added support for Float16/BFloat16 vector data types in bulk insert ([#32157](https://github.com/milvus-io/milvus/pull/32157))
+- Enhanced sparse float vector to support brute force iterator search and range search ([#32635](https://github.com/milvus-io/milvus/pull/32635))
+
+### Improvements
+
+- Added declarative resource group api ([#31930](https://github.com/milvus-io/milvus/pull/31930), [#32297](https://github.com/milvus-io/milvus/pull/32297), [#32536](https://github.com/milvus-io/milvus/pull/32536), [#32666](https://github.com/milvus-io/milvus/pull/32666))
+- Rewrote the collection observer in QueryCoord to make it task-driven ([#32441](https://github.com/milvus-io/milvus/pull/32441))
+- Refactored the data structure used in the SyncManager of DataNode to reduce memory usage and prevent errors ([#32673](https://github.com/milvus-io/milvus/pull/32673))
+- Revised the implementation of garbage collection to minimize list operations associated with object storage ([#31740](https://github.com/milvus-io/milvus/pull/31740))
+- Reduced the cpu usage when collection number is high ([#32245](https://github.com/milvus-io/milvus/pull/32245))
+- Enhanced the management of milvus.yaml by automatically generating relevant configuration items in the milvus.yaml file through code ([#31832](https://github.com/milvus-io/milvus/pull/31832), [#32357](https://github.com/milvus-io/milvus/pull/32357))
+- Enhanced the performance of the Query by retrieving the data after performing local reduction ([#32346](https://github.com/milvus-io/milvus/pull/32346))
+- Added WithBlock option for etcd client creation ([#32641](https://github.com/milvus-io/milvus/pull/32641))
+- Used client_request_id specified by the client as the TraceID if client provided ([#32264](https://github.com/milvus-io/milvus/pull/32264))
+- Added db label to the metrics for the delete and bulk insert operations ([#32611](https://github.com/milvus-io/milvus/pull/32611))
+- Added logic to skip the verification through configuration for AutoID and PartitionKey columns ([#32592](https://github.com/milvus-io/milvus/pull/32592))
+- Refined errors related to authentication ([#32253](https://github.com/milvus-io/milvus/pull/32253))
+- Refined error logs for AllocSegmentID in DataCoord ([#32351](https://github.com/milvus-io/milvus/pull/32351), [#32335](https://github.com/milvus-io/milvus/pull/32335))
+- Removed duplicate metrics ([#32380](https://github.com/milvus-io/milvus/pull/32380), [#32308](https://github.com/milvus-io/milvus/pull/32308)) and cleaned up unused metrics ([#32404](https://github.com/milvus-io/milvus/pull/32404), [#32515](https://github.com/milvus-io/milvus/pull/32515))
+- Added configuration option to control whether to enforce the activation of the partitionKey feature ([#32433](https://github.com/milvus-io/milvus/pull/32433))
+- Added configuration option to control the maximum amount of data that can be inserted in a single request ([#32433](https://github.com/milvus-io/milvus/pull/32433))
+- Parallelize the applyDelete operation at the segment level to accelerate the processing of Delete messages by the Delegator ([#32291](https://github.com/milvus-io/milvus/pull/32291))
+- Used index ([#32232](https://github.com/milvus-io/milvus/pull/32232), [#32505](https://github.com/milvus-io/milvus/pull/32505), [#32533](https://github.com/milvus-io/milvus/pull/32533), [#32595](https://github.com/milvus-io/milvus/pull/32595)) and add cache ([#32580](https://github.com/milvus-io/milvus/pull/32580)) to accelerate frequent filtering operations in QueryCoord.
+- Rewrote the data structure ([#32273](https://github.com/milvus-io/milvus/pull/32273)) and refactored code ([#32389](https://github.com/milvus-io/milvus/pull/32389)) to accelerate common operations in DataCoord.
+- Removed openblas from conan ([#32002](https://github.com/milvus-io/milvus/pull/32002))
+
+### Bug fixes
+
+- Fixed build milvus in rockylinux8 ([#32619](https://github.com/milvus-io/milvus/pull/32619))
+- Fixed compilation errors for SVE on ARM ([#32463](https://github.com/milvus-io/milvus/pull/32463), [#32270](https://github.com/milvus-io/milvus/pull/32270))
+- Fixed the crash issue on ARM-based GPU images ([#31980](https://github.com/milvus-io/milvus/pull/31980))
+- Fixed regex query can't handle text with newline ([#32569](https://github.com/milvus-io/milvus/pull/32569))
+- Fixed search get empty result caused by GetShardLeaders return empty node list ([#32685](https://github.com/milvus-io/milvus/pull/32685))
+- Fixed BulkInsert raised error when encountering dynamic fields in numpy files ([#32596](https://github.com/milvus-io/milvus/pull/32596))
+- Fixed bugs related to the RESTFulV2 interface, including an important fix that allows numeric parameters in requests to accept numerical input instead of string type ([#32485](https://github.com/milvus-io/milvus/pull/32485), [#32355](https://github.com/milvus-io/milvus/pull/32355))
+- Fixed memory leak in proxy by removing watching config event in rate limiter ([#32313](https://github.com/milvus-io/milvus/pull/32313))
+- Fixed the issue where the rate limiter incorrectly reports that the partition cannot be found when partitionName is not specified ([#32647](https://github.com/milvus-io/milvus/pull/32647))
+- Added detection between the cases of Collection being in the recovery state and not being loaded in the error type. ([#32447](https://github.com/milvus-io/milvus/pull/32447))
+- Corrected the negative queryable num entities metric ([#32361](https://github.com/milvus-io/milvus/pull/32361))
+
+
+## v2.4.0
+
+Release date: April 17, 2024
+
+| Milvus version | Python SDK version | Node.js SDK version |
+|----------------|--------------------| --------------------|
+| 2.4.0 | 2.4.0 | 2.4.0 |
+
+We are excited to announce the official launch of Milvus 2.4.- Building upon the solid foundation of the 2.4.0-rc.1 release, we have focused on addressing critical bugs reported by our users, while preserving the existing functionality. In addition, Milvus 2.4.0 introduces a range of optimizations aimed at enhancing system performance, improving observability through the incorporation of various metrics, and streamlining the codebase for increased simplicity.
+
+### Improvements
+
+- Support for MinIO TLS connections ([#31396](https://github.com/milvus-io/milvus/pull/31396), [#31618](https://github.com/milvus-io/milvus/pull/31618))
+- AutoIndex support for scalar fields ([#31593](https://github.com/milvus-io/milvus/pull/31593))
+- Hybrid search refactoring for consistent execution paths with regular search ([#31742](https://github.com/milvus-io/milvus/pull/31742), [#32178](https://github.com/milvus-io/milvus/pull/32178))
+- Accelerated filtering through bitset and bitset_view refactoring ([#31592](https://github.com/milvus-io/milvus/pull/31592), [#31754](https://github.com/milvus-io/milvus/pull/31754), [#32139](https://github.com/milvus-io/milvus/pull/32139))
+- Import tasks now support waiting for data index completion ([#31733](https://github.com/milvus-io/milvus/pull/31733))
+- Enhanced Import compatibility ([#32121](https://github.com/milvus-io/milvus/pull/32121)), task scheduling ([#31475](https://github.com/milvus-io/milvus/pull/31475)), and limits on imported file size and number ([#31542](https://github.com/milvus-io/milvus/pull/31542))
+- Code simplification efforts including interface standardization for type checking ([#31945](https://github.com/milvus-io/milvus/pull/31945), [#31857](https://github.com/milvus-io/milvus/pull/31857)), removal of deprecated code and metrics ([#32079](https://github.com/milvus-io/milvus/pull/32079), [#32134](https://github.com/milvus-io/milvus/pull/32134), [#31535](https://github.com/milvus-io/milvus/pull/31535), [#32211](https://github.com/milvus-io/milvus/pull/32211), [#31935](https://github.com/milvus-io/milvus/pull/31935)), and normalization of constant names ([#31515](https://github.com/milvus-io/milvus/pull/31515))
+- New metrics for QueryCoord current target channel check point lag latency ([#31420](https://github.com/milvus-io/milvus/pull/31420))
+- New db label for common metrics ([#32024](https://github.com/milvus-io/milvus/pull/32024))
+- New metrics regarding the count of deleted, indexed, and loaded entities, with the inclusion of labels such as collectionName and dbName ([#31861](https://github.com/milvus-io/milvus/pull/31861))
+- Error handling improvements for mismatched vector types ([#31766](https://github.com/milvus-io/milvus/pull/31766))
+- Support for throwing errors instead of crashing when index cannot be built ([#31845](https://github.com/milvus-io/milvus/pull/31845))
+- Support for invalidating the database meta cache when dropping databases ([#32092](https://github.com/milvus-io/milvus/pull/32092))
+- Interface refactoring for channel distribution ([#31814](https://github.com/milvus-io/milvus/pull/31814)) and leader view management ([#32127](https://github.com/milvus-io/milvus/pull/32127))
+- Refactor channel dist manager interface ([#31814](https://github.com/milvus-io/milvus/pull/31814)) and Refactor leader view manager interface ([#32127](https://github.com/milvus-io/milvus/pull/32127))
+- Batch processing ([#31632](https://github.com/milvus-io/milvus/pull/31632)), adding mapping information ([#32234](https://github.com/milvus-io/milvus/pull/32234), [#32249](https://github.com/milvus-io/milvus/pull/32249)), and avoiding usage of lock ([#31787](https://github.com/milvus-io/milvus/pull/31787)) to accelerate frequently invoked operations
+
+### Breaking Changes
+
+- Discontinued grouping search on binary vectors ([#31735](https://github.com/milvus-io/milvus/pull/31735))
+- Discontinued grouping search with hybrid search ([#31812](https://github.com/milvus-io/milvus/pull/31812))
+- Discontinued HNSW index on binary vectors ([#31883](https://github.com/milvus-io/milvus/pull/31883))
### Bug Fixes
-- QueryCoord segment replacement fixed
-
- - Fixed the mismatch of sealed segments IDs after enabling load-balancing in 2.2. ([#21322](https://github.com/milvus-io/milvus/pull/21322))
- - Fixed the sync logic of the leader observer. ([#20478](https://github.com/milvus-io/milvus/pull/20478)) ([#21315](https://github.com/milvus-io/milvus/pull/21315))
- - Fixed the issues that observers may update the current target to an unfinished next target. ([#21107](https://github.com/milvus-io/milvus/pull/21107)) ([#21280](https://github.com/milvus-io/milvus/pull/21280))
- - Fixed the load timeout after the next target updates. ([#21759](https://github.com/milvus-io/milvus/pull/21759)) ([#21770](https://github.com/milvus-io/milvus/pull/21770))
- - Fixed the issue that the current target may be updated to an invalid target. ([#21742](https://github.com/milvus-io/milvus/pull/21742)) ([#21762](https://github.com/milvus-io/milvus/pull/21762))
- - Fixed the issue that a failed node may update the current target to an unavailable target. ([#21743](https://github.com/milvus-io/milvus/pull/21743))
-
-- Improperly invalidated proxy cache fixed
-
- - Fixed the issue that the proxy does not update the shard leaders cache for some types of error ([#21185](https://github.com/milvus-io/milvus/pull/21185)) ([#21303](https://github.com/milvus-io/milvus/pull/21303))
- - Fixed the issue that Milvus invalidates the proxy cache first when the shard leader list contains error ([#21451](https://github.com/milvus-io/milvus/pull/21451)) ([#21464](https://github.com/milvus-io/milvus/pull/21464))
-
-- CheckPoint and GC Related issues fixed
-
- - Fixed the issue that the checkpoint will not update after data delete and compact ([#21495](https://github.com/milvus-io/milvus/pull/21495))
- - Fixed issues related to channel checkpoint and GC ([#22027](https://github.com/milvus-io/milvus/pull/22027))
- - Added restraints on segment GC of DML position before channel copy ([#21773](https://github.com/milvus-io/milvus/pull/21773))
- - Removed collection meta after GC is complete ([#21595](https://github.com/milvus-io/milvus/pull/21595)) ([#21671](https://github.com/milvus-io/milvus/pull/21671))
-
-- Issues related to not being able to use embedded etcd with Milvus fixed
-
- - Added setup config files for embedded etcd ([#22076](https://github.com/milvus-io/milvus/pull/22076))
+- Enhanced data type and value checks for queries and insertions to prevent crashes ([#31478](https://github.com/milvus-io/milvus/pull/31478), [#31653](https://github.com/milvus-io/milvus/pull/31653), [#31698](https://github.com/milvus-io/milvus/pull/31698), [#31842](https://github.com/milvus-io/milvus/pull/31842), [#32042](https://github.com/milvus-io/milvus/pull/32042), [#32251](https://github.com/milvus-io/milvus/pull/32251), [#32204](https://github.com/milvus-io/milvus/pull/32204))
+- RESTful API bug fixes ([#32160](https://github.com/milvus-io/milvus/pull/32160))
+- Improved prediction of inverted index resource usage ([#31641](https://github.com/milvus-io/milvus/pull/31641))
+- Resolution of connection issues with etcd when authorization is enabled ([#31668](https://github.com/milvus-io/milvus/pull/31668))
+- Security update for nats server ([#32023](https://github.com/milvus-io/milvus/pull/32023))
+- Stored inverted index files into a local storage path of QueryNode instead of /tmp ([#32210](https://github.com/milvus-io/milvus/pull/32210))
+- Addressed datacoord memory leaks for collectionInfo ([#32243](https://github.com/milvus-io/milvus/pull/32243))
+- Fixes for fp16/bf16 related bugs potentially causing system panic ([#31677](https://github.com/milvus-io/milvus/pull/31677), [#31841](https://github.com/milvus-io/milvus/pull/31841), [#32196](https://github.com/milvus-io/milvus/pull/32196))
+- Resolved issues with grouping search returning insufficient results ([#32151](https://github.com/milvus-io/milvus/pull/32151))
+- Adjustment of search with iterators to handle offsets in the Reduce step more effectively and ensure adequate results with "reduceStopForBest" enabled ([#32088](https://github.com/milvus-io/milvus/pull/32088))
-- Others
+## v2.4.0-rc.1
+Release date: March 20, 2024
- - Fixed the offset panic in queries ([#21292](https://github.com/milvus-io/milvus/pull/21292)) ([#21751](https://github.com/milvus-io/milvus/pull/21751))
- - Fixed the issue that small candidate compaction should only happen with more than one segment ([#21250](https://github.com/milvus-io/milvus/pull/21250))
- - Fixed the issue of memory usage calculation ([#21798](https://github.com/milvus-io/milvus/pull/21798))
- - Fixed the issue that a timestamp allocation failure blocks compaction queue forever ([#22039](https://github.com/milvus-io/milvus/pull/22039)) ([#22046](https://github.com/milvus-io/milvus/pull/22046))
- - Fixed the issue that QueryNode may panic when stopped ([#21406](https://github.com/milvus-io/milvus/pull/21406)) ([#21419](https://github.com/milvus-io/milvus/pull/21419))
- - Modified lastSyncTime in advance to prevent multiple flush binlogs ([#22048](https://github.com/milvus-io/milvus/pull/22048))
- - Fixed the issue that a collection does not exist when users try to recover it ([#21471](https://github.com/milvus-io/milvus/pull/21471)) ([#21628](https://github.com/milvus-io/milvus/pull/21628))
- - Use tt msg stream for consume delete msg ([#21478](https://github.com/milvus-io/milvus/pull/21478))
- - Prevent users from deleting entities by any non-primary-key field ([#21459](https://github.com/milvus-io/milvus/pull/21459)) ([#21472](https://github.com/milvus-io/milvus/pull/21472))
- - Fixed potential nil access on segments ([#22104](https://github.com/milvus-io/milvus/pull/22104))
+| Milvus version | Python SDK version |
+|----------------|--------------------|
+| 2.4.0-rc.1 | 2.4.0 |
-## 2.2.2
-Release date: 22 December, 2022
+This release introduces several scenario-based features:
-| Milvus version | Python SDK version | Java SDK version | Go SDK version | Node.js SDK version |
-| -------------- | ------------------ | ---------------- | -------------- | ------------------- |
-| 2.2.2 | 2.2.1 | 2.2.1 | 2.2.0 | 2.2.1 |
+- **New GPU Index - CAGRA**: Thanks to NVIDIA's contribution, this new GPU index offers a 10x performance boost, especially for batch searches. For details, refer to [GPU Index](gpu_index.md).
-Milvus 2.2.2 is a minor fix of Milvus 2.2.1. It fixed a few loading failure issues as of the upgrade to 2.2.1 and the issue that the proxy cache is not cleaned upon some types of errors.
+- **Multi-vector** and **Hybrid Search**: This feature enables storing vector embeddings from multiple models and conducting hybrid searches. For details, refer to [Hybrid Search](multi-vector-search.md).
+- **Sparse Vectors**: Ideal for keyword interpretation and analysis, sparse vectors are now supported for processing in your collection. For details, refer to [Sparse Vectors](sparse_vector.md).
-Bug Fixes
+- **Grouping Search**: Categorical aggregation enhances document-level recall for Retrieval-Augmented Generation (RAG) applications. For details, refer to [Grouping Search](https://milvus.io/docs/single-vector-search.md#Grouping-search).
-- Fixed the issue that the proxy doesn't update the cache of shard leaders due to some types of errors. ([#21320](https://github.com/milvus-io/milvus/pull/21320))
-- Fixed the issue that the loaded info is not cleaned for released collections/partitions. ([#21321](https://github.com/milvus-io/milvus/pull/21321))
-- Fixed the issue that the load count is not cleared on time. ([#21314](https://github.com/milvus-io/milvus/pull/21314))
+- **Inverted Index** and **Fuzzy Matching**: These capabilities improve keyword retrieval for scalar fields. For details, refer to [Index Scalar Fields](index-scalar-fields.md) and [Filtered Search](single-vector-search.md#filtered-search).
-## v2.2.1
-Release date: 15 December, 2022
+### New Features
-| Milvus version | Python SDK version | Java SDK version | Go SDK version | Node.js SDK version |
-| -------------- | ------------------ | ---------------- | -------------- | ------------------- |
-| 2.2.1 | 2.2.1 | 2.2.1 | 2.2.0 | 2.2.1 |
+#### GPU Index - CAGRA
-Milvus 2.2.1 is a minor fix of Milvus 2.2.0. It supports authentication and TLS on all dependencies, optimizes the performance ludicrously on searches and fixes some critical issues. With tremendous contribution from the community, this release managed to resolve over 280 issues, so please try the new release and give us feedback on stability, performance and ease of use.
+We would like to express our sincere gratitude to the NVIDIA team for their invaluable contribution to CAGRA, a state-of-the-art (SoTA) GPU-based graph index that can be used online.
-New Features
+Unlike previous GPU indices, CAGRA demonstrates overwhelming superiority even in small batch queries, an area where CPU indices traditionally excel. In addition, CAGRA's performance in large batch queries and index construction speed, domains where GPU indices already shine, is truly unparalleled.
-- Supports Pulsa tenant and authentication. ([#20762](https://github.com/milvus-io/milvus/pull/20762))
-- Supports TLS in etcd config source. ([#20910](https://github.com/milvus-io/milvus/pull/20910))
+Example code can be found in [example_gpu_cagra.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/example_gpu_cagra.py).
-Performance
+#### Sparse Vector (Beta)
-After upgrading the Knowhere vector engine and changing the parallelism strategy, Milvus 2.2.1 improves search performance by over 30%.
+In this release, we are introducing a new type of vector field called sparse vector. Sparse vectors are different from their dense counterparts as they tend to have several magnitude higher number of dimensions with only a handful being non-zero. This feature offers better interpretability due to its term-based nature and can be more effective in certain domains. Learned sparse models such as SPLADEv2/BGE-M3 have proven to be very useful for common first-stage ranking tasks. The main use case for this new feature in Milvus is to allow efficient approximate semantic nearest neighbor search over sparse vectors generated by neural models such as SPLADEv2/BGE-M3 and statistics models such as the BM25 algorithm. Milvus now supports effective and high-performance storage, indexing, and searching (MIPS, Maximum Inner Product Search) of sparse vectors.
-Optimizes the scheduler, and increases merge tasks probability. ([#20931](https://github.com/milvus-io/milvus/pull/20931))
+Example code can be found in [hello_sparse.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/hello_sparse.py).
-Bug Fixes
+#### Multi Embedding & Hybrid Search
-- Fixed term filtering failures on indexed scalar fields. ([#20840](https://github.com/milvus-io/milvus/pull/20840))
-- Fixed the issue that only partial data returned upon QueryNode restarts. ([#21139](https://github.com/milvus-io/milvus/pull/21139))([#20976](https://github.com/milvus-io/milvus/pull/20976))
-- Fixed IndexNode panic upon failures to create an index. ([#20826](https://github.com/milvus-io/milvus/pull/20826))
-- Fixed endless BinaryVector compaction and generation of data on Minio. ([#21119](https://github.com/milvus-io/milvus/pull/21119)) ([#20971](https://github.com/milvus-io/milvus/pull/20971))
-- Fixed the issue that `meta_cache` of proxy partially updates. ([#21232](https://github.com/milvus-io/milvus/pull/21232))
-- Fixed slow segment loading due to staled checkpoints. ([#21150](https://github.com/milvus-io/milvus/pull/21150))
-- Fixed concurrently loaded Casbin model causing concurrent write operations. ([#21132](https://github.com/milvus-io/milvus/pull/21132))([#21145](https://github.com/milvus-io/milvus/pull/21145))([#21073](https://github.com/milvus-io/milvus/pull/21073))
-- Forbade garbage-collecting index meta when creating an index. ([#21024](https://github.com/milvus-io/milvus/pull/21024))
-- Fixed a bug that the index data can not be garbage-collected because `ListWithPrefix` from Minio with recursive is false. ([#21040](https://github.com/milvus-io/milvus/pull/21040))
-- Fixed an issue that an error code is returned when a query expression does not match any results. ([#21066](https://github.com/milvus-io/milvus/pull/21066))
-- Fixed search failures on disk index when `search_list` equals to `limit`. ([#21114](https://github.com/milvus-io/milvus/pull/21114))
-- Filled collection schema after DataCoord restarts. ([#21164](https://github.com/milvus-io/milvus/pull/21164))
-- Fixed an issue that the compaction handler may double release and hang. ([#21019](https://github.com/milvus-io/milvus/pull/21019))
-- [restapi] Fixed precision loss for Int64 fields upon insert requests. ([#20827](https://github.com/milvus-io/milvus/pull/20827))
-- Increased `MaxWatchDuration` and make it configurable to prevent shards with large data loads from timing out. ([#21010](https://github.com/milvus-io/milvus/pull/21010))
-- Fixed the issue that the compaction target segment `rowNum` is always 0. ([#20941](https://github.com/milvus-io/milvus/pull/20941))
-- Fixed the issue that IndexCoord deletes segment index by mistake because IndexMeta is not stored in time. ([#21058](https://github.com/milvus-io/milvus/pull/21058))
-- Fixed the issue that DataCoord crushes if auto-compaction is disabled. ([#21079](https://github.com/milvus-io/milvus/pull/21079))
-- Fixed the issue that searches on growing segments even though the segments are indexed. ([#21215](https://github.com/milvus-io/milvus/pull/21215))
+Multi-vector support is the cornerstone for applications that require multi-model data processing or a mix of dense and sparse vectors. With multi-vector support, now you can:
-Improvements
+- Store vector embeddings generated for unstructured text, image, or audio samples from multiple models.
+- Conduct ANN searches that include multiple vectors of each entity.
+- Customize search strategies by assigning weights to different embedding models.
+- Experiment with various embedding models to find the optimal model combination.
-- Refined logs and the default log level is set to INFO.
-- Fixed incorrect metrics and refined the metric dashboard.
-- Made TopK limit configurable ([#21155](https://github.com/milvus-io/milvus/pull/21155))
+Multi-vector support allows storing, indexing, and applying reranking strategies to multiple vector fields of different types, such as FLOAT_VECTOR and SPARSE_FLOAT_VECTOR, in a collection. Currently, two reranking strategies are available: **Reciprocal Rank Fusion (RRF)** and **Average Weighted Scoring**. Both strategies combine the search results from different vector fields into a unified result set. The first strategy prioritizes the entities that consistently appear in the search results of different vector fields, while the other strategy assigns weights to the search results of each vector field to determine their importance in the final result set.
-Breaking changes
+Example code can be found in [hybrid_search.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/hybrid_search.py).
-Milvus now limits each RPC to 64 MB to avoid OOM and generating large message packs.
+#### Inverted Index and Fuzzy Match
-## v2.2.0
-Release date: 18 November, 2022
+In previous releases of Milvus, memory-based binary search indexes and Marisa Trie indexes were used for scalar field indexing. However, these methods were memory-intensive. The latest release of Milvus now employs the Tantivy-based inverted index, which can be applied to all numeric and string data types. This new index dramatically improves scalar query performance, reducing the query of keywords in strings by ten times. In addition, The inverted index consumes less memory, thanks to additional optimizations in data compression and Memory-mapped storage (MMap) mechanism of the internal indexing structure.
-| Milvus version | Python SDK version | Java SDK version | Go SDK version | Node.js SDK version |
-| -------------- | ------------------ | ---------------- | -------------- | ------------------- |
-| 2.2.0 | 2.2.0 | 2.2.1 | 2.2.0 | 2.2.0 |
+This release also supports fuzzy matches in scalar filtering using prefixes, infixes, and suffixes.
-Milvus 2.2.0 introduces many new features including support for Disk-based approximate nearest neighbor (ANN) algorithm, bulk insertion of entities from files, and role-based access control (RBAC) for an improved security. In addition, this major release also ushers in a new era for vector search with enhanced stability, faster search speed, and more flexible scalability.
+Example code can be found in [inverted_index_example.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/inverted_index_example.py) and [fuzzy_match.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/fuzzy_match.py).
-Breaking changes
+#### Grouping Search
-Since metadata storage is refined and API usage is normalized, Milvus 2.2 is *not* fully compatible with earlier releases. Read [this guide](upgrade_milvus_cluster-helm.md) to learn how to safely upgrade from Milvus 2.1.x to 2.2.0.
+You can now aggregate the search results by the values in a specific scalar field. This helps RAG applications to implement document-level recall. Consider a collection of documents, each document splits into various passages. Each passage is represented by one vector embedding and belongs to one document. To find the most relevant documents instead of scattering passages, you can include the group_by_field argument in the search() operation to group results by the document ID.
-Features
+Example code can be found in [example_group_by.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/example_group_by.py).
-- Support for bulk insertion of entities from files
-Milvus now offers a new set of bulk insertion APIs to make data insertion more efficient. You can now upload entities in a Json file directly to Milvus. See [Insert Entities from Files](bulk_insert.md) for details.
+#### Float16 and BFloat- Vector DataType
-- Query result pagination
-To avoid massive search and query results returned in a single RPC, Milvus now supports configuring offset and filtering results with keywords in searches and queries. See [Search](search.md) and [Query](query.md) for details.
+Machine learning and neural networks often use half-precision data types, such as Float16 and BFloat- While these data types can improve query efficiency and reduce memory usage, they come with a tradeoff of reduced accuracy. With this release, Milvus now supports these data types for vector fields.
+Example code can be found in [float16_example.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/float16_example.py) and [bfloat16_example.py](https://github.com/milvus-io/pymilvus/blob/2.4/examples/bfloat16_example.py).
-- Role-based access control (RBAC)
-Like other traditional databases, Milvus now supports RBAC so that you can manages users, roles and privileges. See [Enable RBAC](rbac.md) for details.
+### Upgraded Architecture
-- Quotas and limits
-Quota is a new mechanism that protects the system from OOM and crash under a burst of traffic. By imposing quota limitations, you can limit ingestion rate, search rate, etc. See [Quota and Limitation Configurations](configure_quota_limits.md) for details.
+#### L0 Segment
+This release includes a new segment called L0 Segment, designed to record deleted data. This segment periodically compacts stored deleted records and splits them into sealed segments, reducing the number of data flushes required for small deletions and leaving a small storage footprint. With this mechanism, Milvus completely separates data compactions from data flushes, enhancing the performance of delete and upsert operations.
-- Time to live (TTL) at a collection level
-In prior releases, we only support configuring TTL at a cluster level. Milvus 2.2.0 now supports configuring collection TTL when you create or modify a collection. After setting TTL for a collection, the entities in this collection automatically expires after the specified period of time. See [Create a collection](create_collection.md) or [Modify a collection](modify_collection.md) for details.
+#### Refactored BulkInsert
+This release also introduces improved bulk-insert logic. This allows you to import multiple files in a single bulk-insert request. With the refactored version, both the performance and stability of bulk insert have seen significant improvements. The user experience has also been enhanced, such as fine-tuned rate limiting and more user-friendly error messages. In addition, you can easily access the bulk-insert endpoints through Milvus' RESTful API.
-- Support for disk-based approximate nearest neighbor search (ANNS) indexes (Beta)
-Traditionally, you need to load the entire index into memory before search. Now with DiskANN, an SSD-resident and Vamana graph-based ANNS algorithm, you can directly search on large-scale datasets and save up to 10 times the memory.
+#### Memory-mapped Storage
+Milvus uses memory-mapped storage (MMap) to optimize its memory usage. Instead of loading file content directly into memory, this mechanism maps the file content into memory. This approach comes with a tradeoff of performance degradation. By enabling MMap for an HNSW-indexed collection on a host with 2 CPUs and 8 GB RAM, you can load 4x more data with less than 10% performance degradation.
-- Data backup (Beta)
-Thanks to the contribution from [Zilliz](https://zilliz.com/), Milvus 2.2.0 now provides [a tool](https://github.com/zilliztech/milvus-backup) to back up and restore data. The tool can be used either in a command line or an API server for data security.
-
+In addition, this release also allows dynamic and fine-grained control over MMap without the need to restart Milvus.
-Bug fixes and stability
+For details, refer to [MMap Storage](mmap.md).
-- Implements query coord V2, which handles all channel/segment allocation in a fully event-driven and asynchronous mode. Query coord V2 address all issues of stuck searches and accelerates failure recovery.
-- Root coord and index coord are refactored for more elegant handling of errors and better task scheduling.
-- Fixes the issue of invalid RocksMQ retention mechanism when Milvus Standalone restarts.
-- Meta storage format in etcd is refactored. With the new compression mechanism, etcd kv size is reduced by 10 times and the issues of etcd memory and space are solved.
-- Fixes a couple of memory issues when entities are continuously inserted or deleted.
+### Others
-Improvements
+#### Milvus-CDC
-- Performance
- - Fixes performance bottleneck to that Milvus can fully utilize all cores when CPU is more than 8 cores.
- - Dramatically improves the search throughput and reduce the latency.
- - Decreases load speed by processing load in parallel.
-
-- Observability
- - Changes all log levels to `info` by default.
- - Added collection-level latency metrics for search, query, insertion, and deletion.
+Milvus-CDC is an easy-to-use companion tool to capture and synchronize incremental data between Milvus instances, allowing for easy incremental backup and disaster recovery. In this release, Milvus-CDC has improved stability, and its Change Data Capture (CDC) functionality now becomes generally available.
-- Debug tool
- - [BirdWatcher](https://github.com/milvus-io/birdwatcher), the debug tool for Milvus, is further optimized as it can now connect to Milvus meta storage and inspect the part of the internal status of the Milvus system.
+To learn more about Milvus-CDC, refer to [GitHub repository](https://github.com/zilliztech/milvus-cdc) and [Milvus-CDC Overview](milvus-cdc-overview.md).
-Others
+#### Refined MilvusClient Interfaces
-- Index and load
- - A collection can only be loaded with an index created on it.
- - Indexes cannot be created after a collection is loaded.
- - A loaded collection must be released before dropping the index created on this collection.
-
-- Flush
- - Flush API, which forces a seal on a growing segment and syncs the segment to object storage, is now exposed to users. Calling `flush()` frequently may affect search performance as too many small segments are created.
- - No auto-flush is triggered by any SDK APIs such as `num_entities()`, `create_index()`, etc.
-
-- Time Travel
- - In Milvus 2.2, Time Travel is disabled by default to save disk usage. To enable Time Travel, configure the parameter `common.retentionDuration` manually.
+MilvusClient is an easy-to-use alternative to the ORM module. It adopts a purely functional approach to simplify interactions with the server. Instead of maintaining a connection pool, each MilvusClient establishes a gRPC connection to the server.
+The MilvusClient module has implemented most of the functionalities of the ORM module.
+To learn more about the MilvusClient module, visit [pymilvus](https://github.com/milvus-io/pymilvus) and the [reference documents](/api-reference/pymilvus/v2.4.x/About.md).
diff --git a/preview/site/en/rerankers/rerankers-bge.md b/preview/site/en/rerankers/rerankers-bge.md
new file mode 100644
index 000000000..a1208dc67
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-bge.md
@@ -0,0 +1,80 @@
+---
+id: rerankers-bge.md
+order: 2
+summary: Milvus supports BGE reranker models through the `BGERerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+title: BGE
+---
+
+# BGE
+
+Milvus supports [BGE reranker models](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) through the `BGERerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+
+To use this feature, install the necessary dependencies:
+
+```bash
+pip install --upgrade pymilvus
+pip install "pymilvus[model]"
+```
+
+Then, instantiate the `BGERerankFunction`:
+
+```python
+from pymilvus.model.reranker import BGERerankFunction
+
+# Define the rerank function
+bge_rf = BGERerankFunction(
+ model_name="BAAI/bge-reranker-v2-m3", # Specify the model name. Defaults to `BAAI/bge-reranker-v2-m3`.
+ device="cpu" # Specify the device to use, e.g., 'cpu' or 'cuda:0'
+)
+```
+
+**Parameters**
+
+- `model_name` (*string*)
+
+ The name of the model to use. You can specify any of the available BGE reranker model names, for example, `BAAI/bge-reranker-base`, `BAAI/bge-reranker-large`, etc. If you leave this parameter unspecified, `BAAI/bge-reranker-v2-m3` will be used. For a list of available models, refer to [Model List](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/llm_reranker#model-list).
+
+- `device` (*string*)
+
+ Optional. The device to use for running the model. If not specified, the model will be run on the CPU. You can specify `cpu` for the CPU and `cuda:n` for the nth GPU device.
+
+Then, use the following code to rerank documents based on the query:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+results = bge_rf(
+ query=query,
+ documents=documents,
+ top_k=3,
+)
+
+for result in results:
+ print(f"Index: {result.index}")
+ print(f"Score: {result.score:.6f}")
+ print(f"Text: {result.text}\n")
+```
+
+The expected output is similar to the following:
+
+```python
+Index: 1
+Score: 0.991162
+Text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+
+Index: 0
+Score: 0.032697
+Text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+
+Index: 3
+Score: 0.006515
+Text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+```
+
diff --git a/preview/site/en/rerankers/rerankers-cohere.md b/preview/site/en/rerankers/rerankers-cohere.md
new file mode 100644
index 000000000..f646e807e
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-cohere.md
@@ -0,0 +1,79 @@
+---
+id: rerankers-cohere.md
+order: 3
+summary: Milvus supports Cohere reranker models through the `CohereRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+title: Rerankers Cohere
+---
+
+# Cohere
+
+Milvus supports [Cohere](https://docs.cohere.com/docs/rerank-2)[ reranker models](https://docs.cohere.com/docs/rerank-2) through the `CohereRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+
+To use this feature, install the necessary dependencies:
+
+```bash
+pip install --upgrade pymilvus
+pip install "pymilvus[model]"
+```
+
+Then, instantiate the `CohereRerankFunction`:
+
+```python
+from pymilvus.model.reranker import CohereRerankFunction
+
+# Define the rerank function
+cohere_rf = CohereRerankFunction(
+ model_name="rerank-english-v3.0", # Specify the model name. Defaults to `rerank-english-v2.0`.
+ api_key=COHERE_API_KEY # Replace with your Cohere API key
+)
+```
+
+**Parameters**
+
+- `model_name` (*string*)
+
+ The name of the model to use. You can specify any of the available Cohere reranker model names, for example, `rerank-english-v3.0`, `rerank-multilingual-v3.0`, etc. If you leave this parameter unspecified, `rerank-english-v2.0` will be used. For a list of available models, refer to [Rerank](https://docs.cohere.com/docs/rerank-2).
+
+- `api_key` (*string*)
+
+ The API key for accessing the Cohere API. For information on how to create an API key, refer to [Cohere dashboard](https://dashboard.cohere.com/api-keys).
+
+Then, use the following code to rerank documents based on the query:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+results = cohere_rf(
+ query=query,
+ documents=documents,
+ top_k=3,
+)
+
+for result in results:
+ print(f"Index: {result.index}")
+ print(f"Score: {result.score:.6f}")
+ print(f"Text: {result.text}\n")
+```
+
+The expected output is similar to the following:
+
+```python
+Index: 1
+Score: 0.99691266
+Text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+
+Index: 3
+Score: 0.8578872
+Text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+
+Index: 0
+Score: 0.3589146
+Text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+```
diff --git a/preview/site/en/rerankers/rerankers-cross-encoder.md b/preview/site/en/rerankers/rerankers-cross-encoder.md
new file mode 100644
index 000000000..eb45f2976
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-cross-encoder.md
@@ -0,0 +1,79 @@
+---
+id: rerankers-cross-encoder.md
+order: 4
+summary: Milvus supports Cross Encoder reranker models through the `CrossEncoderRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+title: Cross Encoder
+---
+
+# Cross Encoder
+
+Milvus supports [Cross-Encoders](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) through the `CrossEncoderRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+
+To use this feature, install the necessary dependencies:
+
+```bash
+pip install --upgrade pymilvus
+pip install "pymilvus[model]"
+```
+
+Then, instantiate the `CrossEncoderRerankFunction`:
+
+```python
+from pymilvus.model.reranker import CrossEncoderRerankFunction
+
+# Define the rerank function
+ce_rf = CrossEncoderRerankFunction(
+ model_name="cross-encoder/ms-marco-MiniLM-L-6-v2", # Specify the model name.
+ device="cpu" # Specify the device to use, e.g., 'cpu' or 'cuda:0'
+)
+```
+
+**Parameters**:
+
+- `model_name` (*string*)
+
+ The name of the model to use. You can specify any of the available Cross-Encoder model names, for example, `cross-encoder/ms-marco-TinyBERT-L-2-v2`, `cross-encoder/ms-marco-MiniLM-L-2-v2`, etc. If you leave this parameter unspecified, an empty string will be used. For a list of available models, refer to [Pretrained Cross-Encoders](https://www.sbert.net/docs/pretrained_cross-encoders.html#).
+
+- `device` (*string*)
+
+ The device to use for running the model. You can specify `cpu` for the CPU and `cuda:n` for the nth GPU device.
+
+Then, use the following code to rerank documents based on the query:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+results = ce_rf(
+ query=query,
+ documents=documents,
+ top_k=3,
+)
+
+for result in results:
+ print(f"Index: {result.index}")
+ print(f"Score: {result.score:.6f}")
+ print(f"Text: {result.text}\n")
+```
+
+The expected output is similar to the following:
+
+```python
+Index: 1
+Score: 6.250533
+Text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+
+Index: 0
+Score: -2.954602
+Text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+
+Index: 3
+Score: -4.771512
+Text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+```
diff --git a/preview/site/en/rerankers/rerankers-jina.md b/preview/site/en/rerankers/rerankers-jina.md
new file mode 100644
index 000000000..9646228ee
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-jina.md
@@ -0,0 +1,78 @@
+---
+id: rerankers-jina.md
+order: 6
+summary: Milvus supports Jina reranker model through the `JinaRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+title: Jina AI - Rerankers
+---
+
+# Jina AI
+
+Milvus supports [Jina AI reranker models](https://jina.ai/reranker/) through the JinaRerankFunction class. This functionality allows you to score the relevance of query-document pairs effectively.
+
+To use this feature, install the necessary dependencies:
+
+```bash
+pip install --upgrade pymilvus
+pip install "pymilvus[model]"
+```
+
+Then, instantiate the `JinaRerankFunction`:
+
+```python
+from pymilvus.model.reranker import JinaRerankFunction
+
+jina_rf = JinaRerankFunction(
+ model_name="jina-reranker-v2-base-multilingual", # Defaults to `jina-reranker-v2-base-multilingual`
+ api_key=JINAAI_API_KEY
+)
+```
+
+**Parameters**:
+
+- `model_name` (*string*)
+
+ The name of the Jina AI reranker model to use for encoding. If you leave this parameter unspecified, `jina-reranker-v2-base-multilingual` will be used. For a list of available models, refer to [Jina AI Rerankers](https://jina.ai/reranker/#apiform).
+
+- `api_key` (*string*)
+
+ The API key for accessing the Jina AI API.
+
+Then, use the following code to rerank documents based on the query:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+results = jina_rf(
+ query=query,
+ documents=documents,
+ top_k=3,
+)
+
+for result in results:
+ print(f"Index: {result.index}")
+ print(f"Score: {result.score:.6f}")
+ print(f"Text: {result.text}\n")
+```
+
+The expected output is similar to the following:
+
+```python
+Index: 1
+Score: 0.937096
+Text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+
+Index: 3
+Score: 0.354210
+Text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+
+Index: 0
+Score: 0.349866
+Text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+```
diff --git a/preview/site/en/rerankers/rerankers-overview.md b/preview/site/en/rerankers/rerankers-overview.md
new file mode 100644
index 000000000..7ccdd4349
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-overview.md
@@ -0,0 +1,210 @@
+---
+id: rerankers-overview.md
+order: 1
+summary: PyMilvus model library integrates rerank functions to optimize the order of results returned from initial searches.
+title: Rerankers Overview
+---
+
+# Rerankers Overview
+
+In the realm of information retrieval and generative AI, a reranker is an essential tool that optimizes the order of results from initial searches. Rerankers differ from traditional [embedding models](embeddings.md) by taking a query and document as input and directly returning a similarity score instead of embeddings. This score indicates the relevance between the input query and document.
+
+Rerankers are often employed after the first stage retrieval, typically done via vector Approximate Nearest Neighbor (ANN) techniques. While ANN searches are efficient at fetching a broad set of potentially relevant results, they might not always prioritize results in terms of actual semantic closeness to the query. Here, rerankers is used to optimize the results order using deeper contextual analyses, often leveraging advanced machine learning models like BERT or other Transformer-based models. By doing this, rerankers can dramatically enhance the accuracy and relevance of the final results presented to the user.
+
+PyMilvus model library integrates rerank functions to optimize the order of results returned from initial searches. After you retrieved nearest embedings from Milvus, you can leverage these reranking tools to refine search results to enhance the precision of search outcomes.
+
+| Rerank Function | API or Open-sourced |
+| --------------- | ------------------- |
+| [BGE](https://milvus.io/api-reference/pymilvus/v2.4.x/Rerankers/BGERerankFunction/BGERerankFunction.md) | Open-sourced |
+| [Cross Encoder](https://milvus.io/api-reference/pymilvus/v2.4.x/Rerankers/CrossEncoderRerankFunction/CrossEncoderRerankFunction.md) | Open-sourced |
+| [Voyage](https://milvus.io/api-reference/pymilvus/v2.4.x/Rerankers/VoyageRerankFunction/VoyageRerankFunction.md) | API |
+| [Cohere](https://milvus.io/api-reference/pymilvus/v2.4.x/Rerankers/CohereRerankFunction/CohereRerankFunction.md) | API |
+| [Jina AI](https://milvus.io/api-reference/pymilvus/v2.4.x/Rerankers/JinaRerankFunction/JinaRerankFunction.md) | API |
+
+
+
+- Before using open-source rerankers, make sure to download and install all required dependencies and models.
+
+- For API-based rerankers, get an API key from the provider and set it in the appropriate environment variables or arguments.
+
+
+
+## Example 1: Use BGE rerank function to rerank documents according to a query
+
+In this example, we demonstrate how to rerank search results using the [BGE reranker](rerankers-bge.md) based on a specific query.
+
+To use a reranker with [PyMilvus model](https://github.com/milvus-io/milvus-model) library, start by installing the PyMilvus model library along with the model subpackage that contains all necessary reranking utilities:
+
+```bash
+pip install pymilvus[model]
+# or pip install "pymilvus[model]" for zsh.
+```
+
+To use the BGE reranker, first import the `BGERerankFunction` class:
+
+```python
+from pymilvus.model.reranker import BGERerankFunction
+```
+
+Then, create a `BGERerankFunction` instance for reranking:
+
+```python
+bge_rf = BGERerankFunction(
+ model_name="BAAI/bge-reranker-v2-m3", # Specify the model name. Defaults to `BAAI/bge-reranker-v2-m3`.
+ device="cpu" # Specify the device to use, e.g., 'cpu' or 'cuda:0'
+)
+```
+
+To rerank documents based on a query, use the following code:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+bge_rf(query, documents)
+```
+
+The expected output is similar to the following:
+
+```python
+[RerankResult(text="The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.", score=0.9911615761470803, index=1),
+ RerankResult(text="In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.", score=0.0326971950177779, index=0),
+ RerankResult(text='The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.', score=0.006514905766152258, index=3),
+ RerankResult(text='In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.', score=0.0042116724917325935, index=2)]
+```
+
+## Example 2: Use a reranker to enhance relevance of search results
+
+In this guide, we'll explore how to utilize the `search()` method in PyMilvus for conducting similarity searches, and how to enhance the relevance of the search results using a reranker. Our demonstration will use the following dataset:
+
+```python
+entities = [
+ {'doc_id': 0, 'doc_vector': [-0.0372721,0.0101959,...,-0.114994], 'doc_text': "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence."},
+ {'doc_id': 1, 'doc_vector': [-0.00308882,-0.0219905,...,-0.00795811], 'doc_text': "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals."},
+ {'doc_id': 2, 'doc_vector': [0.00945078,0.00397605,...,-0.0286199], 'doc_text': 'In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.'},
+ {'doc_id': 3, 'doc_vector': [-0.0391119,-0.00880096,...,-0.0109257], 'doc_text': 'The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.'}
+]
+```
+
+__Dataset components__:
+
+- `doc_id`: Unique identifier for each document.
+- `doc_vector`: Vector embeddings representing the document. For guidance on generating embeddings, refer to [Embeddings](embeddings.md).
+- `doc_text`: Text content of the document.
+
+### Preparations
+
+Before initiating a similarity search, you need to establish a connection with Milvus, create a collection, and prepare and insert data into that collection. The following code snippet illustrates these preliminary steps.
+
+```python
+from pymilvus import MilvusClient, DataType
+
+client = MilvusClient(
+ uri="http://10.102.6.214:19530" # replace with your own Milvus server address
+)
+
+client.drop_collection('test_collection')
+
+# define schema
+
+schema = client.create_schema(auto_id=False, enabel_dynamic_field=True)
+
+schema.add_field(field_name="doc_id", datatype=DataType.INT64, is_primary=True, description="document id")
+schema.add_field(field_name="doc_vector", datatype=DataType.FLOAT_VECTOR, dim=384, description="document vector")
+schema.add_field(field_name="doc_text", datatype=DataType.VARCHAR, max_length=65535, description="document text")
+
+# define index params
+
+index_params = client.prepare_index_params()
+
+index_params.add_index(field_name="doc_vector", index_type="IVF_FLAT", metric_type="IP", params={"nlist": 128})
+
+# create collection
+
+client.create_collection(collection_name="test_collection", schema=schema, index_params=index_params)
+
+# insert data into collection
+
+client.insert(collection_name="test_collection", data=entities)
+
+# Output:
+# {'insert_count': 4, 'ids': [0, 1, 2, 3]}
+```
+
+### Conduct a similarity search
+
+After data insertion, perform similarity searches using the `search` method.
+
+```python
+# search results based on our query
+
+res = client.search(
+ collection_name="test_collection",
+ data=[[-0.045217834, 0.035171617, ..., -0.025117004]], # replace with your query vector
+ limit=3,
+ output_fields=["doc_id", "doc_text"]
+)
+
+for i in res[0]:
+ print(f'distance: {i["distance"]}')
+ print(f'doc_text: {i["entity"]["doc_text"]}')
+```
+
+The expected output is similar to the following:
+
+```python
+distance: 0.7235960960388184
+doc_text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+distance: 0.6269873976707458
+doc_text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+distance: 0.5340118408203125
+doc_text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+```
+
+### Use a reranker to enhance search results
+
+Then, improve the relevance of your search results with a reranking step. In this example, we use `CrossEncoderRerankFunction` built in PyMilvus to rerank the results for improved accuracy.
+
+```python
+# use reranker to rerank search results
+
+from pymilvus.model.reranker import CrossEncoderRerankFunction
+
+ce_rf = CrossEncoderRerankFunction(
+ model_name="cross-encoder/ms-marco-MiniLM-L-6-v2", # Specify the model name.
+ device="cpu" # Specify the device to use, e.g., 'cpu' or 'cuda:0'
+)
+
+reranked_results = ce_rf(
+ query='What event in 1956 marked the official birth of artificial intelligence as a discipline?',
+ documents=[
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+ ],
+ top_k=3
+)
+
+# print the reranked results
+for result in reranked_results:
+ print(f'score: {result.score}')
+ print(f'doc_text: {result.text}')
+```
+
+The expected output is similar to the following:
+
+```python
+score: 6.250532627105713
+doc_text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+score: -2.9546022415161133
+doc_text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+score: -4.771512031555176
+doc_text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+```
diff --git a/preview/site/en/rerankers/rerankers-voyage.md b/preview/site/en/rerankers/rerankers-voyage.md
new file mode 100644
index 000000000..25ad50a3c
--- /dev/null
+++ b/preview/site/en/rerankers/rerankers-voyage.md
@@ -0,0 +1,79 @@
+---
+id: rerankers-voyage.md
+order: 5
+summary: Milvus supports Voyage reranker model through the `VoyageRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+title: Rerankers Voyage
+---
+
+# Voyage
+
+Milvus supports [Voyage reranker model](https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/reranker) through the `VoyageRerankFunction` class. This functionality allows you to score the relevance of query-document pairs effectively.
+
+To use this feature, install the necessary dependencies:
+
+```bash
+pip install --upgrade pymilvus
+pip install "pymilvus[model]"
+```
+
+Then, instantiate the `VoyageRerankFunction`:
+
+```python
+from pymilvus.model.reranker import VoyageRerankFunction
+
+# Define the rerank function
+voyage_rf = VoyageRerankFunction(
+ model_name="rerank-lite-1", # Specify the model name. Defaults to `rerank-lite-1`.
+ api_key=VOYAGE_API_KEY # Replace with your Voyage API key
+)
+```
+
+**Parameters**:
+
+- `model_name` (*string*)
+
+ The name of the Voyage model to use for encoding. If you leave this parameter unspecified, `rerank-lite-1` will be used. For a list of available models, refer to [Rerankers](https://docs.voyageai.com/docs/reranker).
+
+- `api_key` (*string*)
+
+ The API key for accessing the Voyage API. For information on how to create an API key, refer to [API Key and Python Client](https://docs.voyageai.com/docs/api-key-and-installation).
+
+Then, use the following code to rerank documents based on the query:
+
+```python
+query = "What event in 1956 marked the official birth of artificial intelligence as a discipline?"
+
+documents = [
+ "In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.",
+ "The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.",
+ "In 1951, British mathematician and computer scientist Alan Turing also developed the first program designed to play chess, demonstrating an early example of AI in game strategy.",
+ "The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems."
+]
+
+results = voyage_rf(
+ query=query,
+ documents=documents,
+ top_k=3,
+)
+
+for result in results:
+ print(f"Index: {result.index}")
+ print(f"Score: {result.score:.6f}")
+ print(f"Text: {result.text}\n")
+```
+
+The expected output is similar to the following:
+
+```python
+Index: 1
+Score: 0.898438
+Text: The Dartmouth Conference in 1956 is considered the birthplace of artificial intelligence as a field; here, John McCarthy and others coined the term 'artificial intelligence' and laid out its basic goals.
+
+Index: 3
+Score: 0.718750
+Text: The invention of the Logic Theorist by Allen Newell, Herbert A. Simon, and Cliff Shaw in 1955 marked the creation of the first true AI program, which was capable of solving logic problems, akin to proving mathematical theorems.
+
+Index: 0
+Score: 0.679688
+Text: In 1950, Alan Turing published his seminal paper, 'Computing Machinery and Intelligence,' proposing the Turing Test as a criterion of intelligence, a foundational concept in the philosophy and development of artificial intelligence.
+```
diff --git a/preview/site/en/tutorials/audio_similarity_search.md b/preview/site/en/tutorials/audio_similarity_search.md
index a21b5e58f..3c3550fff 100644
--- a/preview/site/en/tutorials/audio_similarity_search.md
+++ b/preview/site/en/tutorials/audio_similarity_search.md
@@ -1,13 +1,12 @@
---
id: audio_similarity_search.md
-summary: Build an audio similarity search system with Milvus.
+summary: Build an audio similarity search system with Milvus.
+title: Audio Similarity Search
---
# Audio Similarity Search
This tutorial demonstrates how to use Milvus, the open-source vector database to build an audio similarity search system.
-- [Open Jupyter notebook](https://github.com/milvus-io/bootcamp/blob/master/solutions/audio/audio_similarity_search/audio_similarity_search.ipynb)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/tree/master/solutions/audio/audio_similarity_search/quick_deploy)
The ML model and third-party software used include:
- PANNs (Large-Scale Pretrained Audio Neural Networks)
diff --git a/preview/site/en/tutorials/build-rag-with-milvus.md b/preview/site/en/tutorials/build-rag-with-milvus.md
new file mode 100644
index 000000000..fa281696d
--- /dev/null
+++ b/preview/site/en/tutorials/build-rag-with-milvus.md
@@ -0,0 +1,278 @@
+---
+id: build-rag-with-milvus.md
+summary: build rag with milvus
+title: Build RAG with Milvus
+---
+
+# Build RAG with Milvus
+
+
+
+In this tutorial, we will show you how to build a RAG(Retrieval-Augmented Generation) pipeline with Milvus.
+
+The RAG system combines a retrieval system with a generative model to generate new text based on a given prompt. The system first retrieves relevant documents from a corpus using Milvus, and then uses a generative model to generate new text based on the retrieved documents.
+
+
+## Preparation
+### Dependencies and Environment
+
+
+```python
+$ pip install --upgrade pymilvus openai requests tqdm
+```
+
+
+
+If you are using Google Colab, to enable dependencies just installed, you may need to **restart the runtime**. (Click on the "Runtime" menu at the top of the screen, and select "Restart session" from the dropdown menu).
+
+
+
+We will use OpenAI as the LLM in this example. You should prepare the [api key](https://platform.openai.com/docs/quickstart) `OPENAI_API_KEY` as an environment variable.
+
+
+```python
+import os
+
+os.environ["OPENAI_API_KEY"] = "sk-***********"
+```
+
+### Prepare the data
+
+We use the [Milvus development guide](https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md) to be as the private knowledge in our RAG, which is a good data source for a simple RAG pipeline.
+
+Download it and save it as a local text file.
+
+
+```python
+import json
+import urllib.request
+
+url = "https://raw.githubusercontent.com/milvus-io/milvus/master/DEVELOPMENT.md"
+file_path = "./Milvus_DEVELOPMENT.md"
+
+if not os.path.exists(file_path):
+ urllib.request.urlretrieve(url, file_path)
+```
+
+We simply use "# " to separate the content in the file, which can roughly separate the content of each main part of the markdown file.
+
+
+```python
+with open(file_path, "r") as file:
+ file_text = file.read()
+
+text_lines = file_text.split("# ")
+```
+
+### Prepare the Embedding Model
+
+We initialize the OpenAI client to prepare the embedding model.
+
+
+```python
+from openai import OpenAI
+
+openai_client = OpenAI()
+```
+
+Define a function to generate text embeddings using OpenAI client. We use the [text-embedding-3-small](https://platform.openai.com/docs/guides/embeddings) model as an example.
+
+
+```python
+def emb_text(text):
+ return (
+ openai_client.embeddings.create(input=text, model="text-embedding-3-small")
+ .data[0]
+ .embedding
+ )
+```
+
+Generate a test embedding and print its dimension and first few elements.
+
+
+```python
+test_embedding = emb_text("This is a test")
+embedding_dim = len(test_embedding)
+print(embedding_dim)
+print(test_embedding[:10])
+```
+
+ 1536
+ [0.009907577186822891, -0.0055520725436508656, 0.006800490897148848, -0.0380667969584465, -0.018235687166452408, -0.04122573509812355, -0.007634099572896957, 0.03221159428358078, 0.0189057644456625, 9.491520904703066e-05]
+
+
+## Load data into Milvus
+
+### Create the Collection
+
+
+```python
+from pymilvus import MilvusClient
+
+milvus_client = MilvusClient(uri="./milvus_demo.db")
+
+collection_name = "my_rag_collection"
+```
+
+
+
+As for the argument of `MilvusClient`:
+
+- Setting the `uri` as a local file, e.g.`./milvus.db`, is the most convenient method, as it automatically utilizes [Milvus Lite](https://milvus.io/docs/milvus_lite.md) to store all data in this file.
+- If you have large scale of data, you can set up a more performant Milvus server on [docker or kubernetes](https://milvus.io/docs/quickstart.md). In this setup, please use the server uri, e.g.`http://localhost:19530`, as your `uri`.
+- If you want to use [Zilliz Cloud](https://zilliz.com/cloud), the fully managed cloud service for Milvus, adjust the `uri` and `token`, which correspond to the [Public Endpoint and Api key](https://docs.zilliz.com/docs/on-zilliz-cloud-console#free-cluster-details) in Zilliz Cloud.
+
+
+
+Check if the collection already exists and drop it if it does.
+
+
+```python
+if milvus_client.has_collection(collection_name):
+ milvus_client.drop_collection(collection_name)
+```
+
+Create a new collection with specified parameters.
+
+If we don't specify any field information, Milvus will automatically create a default `id` field for primary key, and a `vector` field to store the vector data. A reserved JSON field is used to store non-schema-defined fields and their values.
+
+
+```python
+milvus_client.create_collection(
+ collection_name=collection_name,
+ dimension=embedding_dim,
+ metric_type="IP", # Inner product distance
+ consistency_level="Strong", # Strong consistency level
+)
+```
+
+### Insert data
+Iterate through the text lines, create embeddings, and then insert the data into Milvus.
+
+Here is a new field `text`, which is a non-defined field in the collection schema. It will be automatically added to the reserved JSON dynamic field, which can be treated as a normal field at a high level.
+
+
+```python
+from tqdm import tqdm
+
+data = []
+
+for i, line in enumerate(tqdm(text_lines, desc="Creating embeddings")):
+ data.append({"id": i, "vector": emb_text(line), "text": line})
+
+milvus_client.insert(collection_name=collection_name, data=data)
+```
+
+ Creating embeddings: 100%|█| 47/47 [00:16<00:00,
+
+
+
+
+
+ {'insert_count': 47,
+ 'ids': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46],
+ 'cost': 0}
+
+
+
+## Build RAG
+
+### Retrieve data for a query
+
+Let's define a query question about the content of the development guide documentation.
+
+
+```python
+question = "what is the hardware requirements specification if I want to build Milvus and run from source code?"
+```
+
+Search for the question in the collection and retrieve the semantic top-3 matches.
+
+
+```python
+search_res = milvus_client.search(
+ collection_name=collection_name,
+ data=[
+ emb_text(question)
+ ], # Use the `emb_text` function to convert the question to an embedding vector
+ limit=3, # Return top 3 results
+ search_params={"metric_type": "IP", "params": {}}, # Inner product distance
+ output_fields=["text"], # Return the text field
+)
+```
+
+Let's take a look at the search results of the query
+
+
+
+```python
+retrieved_lines_with_distances = [
+ (res["entity"]["text"], res["distance"]) for res in search_res[0]
+]
+print(json.dumps(retrieved_lines_with_distances, indent=4))
+```
+
+ [
+ [
+ "Hardware Requirements\n\nThe following specification (either physical or virtual machine resources) is recommended for Milvus to build and run from source code.\n\n```\n- 8GB of RAM\n- 50GB of free disk space\n```\n\n##",
+ 0.7718855142593384
+ ],
+ [
+ "Building Milvus on a local OS/shell environment\n\nThe details below outline the hardware and software requirements for building on Linux and MacOS.\n\n##",
+ 0.7328144907951355
+ ],
+ [
+ "Software Requirements\n\nAll Linux distributions are available for Milvus development. However a majority of our contributor worked with Ubuntu or CentOS systems, with a small portion of Mac (both x86_64 and Apple Silicon) contributors. If you would like Milvus to build and run on other distributions, you are more than welcome to file an issue and contribute!\n\nHere's a list of verified OS types where Milvus can successfully build and run:\n\n- Debian/Ubuntu\n- Amazon Linux\n- MacOS (x86_64)\n- MacOS (Apple Silicon)\n\n##",
+ 0.6443224549293518
+ ]
+ ]
+
+
+### Use LLM to get a RAG response
+
+Convert the retrieved documents into a string format.
+
+
+```python
+context = "\n".join(
+ [line_with_distance[0] for line_with_distance in retrieved_lines_with_distances]
+)
+```
+
+Define system and user prompts for the Lanage Model. This prompt is assembled with the retrieved documents from Milvus.
+
+
+```python
+SYSTEM_PROMPT = """
+Human: You are an AI assistant. You are able to find answers to the questions from the contextual passage snippets provided.
+"""
+USER_PROMPT = f"""
+Use the following pieces of information enclosed in tags to provide an answer to the question enclosed in tags.
+
+{context}
+
+
+{question}
+
+"""
+```
+
+Use OpenAI ChatGPT to generate a response based on the prompts.
+
+
+```python
+response = openai_client.chat.completions.create(
+ model="gpt-3.5-turbo",
+ messages=[
+ {"role": "system", "content": SYSTEM_PROMPT},
+ {"role": "user", "content": USER_PROMPT},
+ ],
+)
+print(response.choices[0].message.content)
+```
+
+ The hardware requirements specification for building Milvus and running it from the source code are as follows:
+
+ - 8GB of RAM
+ - 50GB of free disk space
+
diff --git a/preview/site/en/tutorials/dna_sequence_classification.md b/preview/site/en/tutorials/dna_sequence_classification.md
index ae8499f32..e84371264 100644
--- a/preview/site/en/tutorials/dna_sequence_classification.md
+++ b/preview/site/en/tutorials/dna_sequence_classification.md
@@ -1,13 +1,12 @@
---
id: dna_sequence_classification.md
-summary: Build a DNA sequence classification system with Milvus.
+summary: Build a DNA sequence classification system with Milvus.
+title: DNA Sequence Classification
---
# DNA Sequence Classification
This tutorial demonstrates how to use Milvus, the open-source vector database, to build a DNA sequence classification model.
-- [Open Jupyter notebook](https://github.com/milvus-io/bootcamp/blob/master/solutions/medical/dna_sequence_classification/dna_sequence_classification.ipynb)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/blob/master/solutions/medical/dna_sequence_classification/quick_deploy)
The ML model and third-party software used include:
- CountVectorizer
diff --git a/preview/site/en/tutorials/example_applications.md b/preview/site/en/tutorials/example_applications.md
deleted file mode 100644
index c0fd677b8..000000000
--- a/preview/site/en/tutorials/example_applications.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-id: example_applications.md
-title: Example applications
----
-
-# Example applications
-
-Milvus makes it easy to supercharge your AI application with vector similarity search. Check out the following example applications of Milvus.
-
-- [Image Similarity Search](image_similarity_search.md)
-
-- [Question Answering System](question_answering_system.md)
-
-- [Recommender System](recommendation_system.md)
-
-- [Video Similarity Search](video_similarity_search.md)
-
-- [Audio Similarity Search](audio_similarity_search.md)
-
-- [Molecular Similarity Search](molecular_similarity_search.md)
-
-- [DNA Sequence Classification](dna_sequence_classification.md)
-
-- [Text Search Engine](text_search_engine.md)
diff --git a/preview/site/en/tutorials/image_deduplication_system.md b/preview/site/en/tutorials/image_deduplication_system.md
index e77fca81a..6116a84da 100644
--- a/preview/site/en/tutorials/image_deduplication_system.md
+++ b/preview/site/en/tutorials/image_deduplication_system.md
@@ -1,6 +1,7 @@
---
id: image_deduplication_system.md
-summary: Build an image deduplication system with Milvus.
+summary: Build an image deduplication system with Milvus.
+title: Image Deduplication
---
# Image Deduplication
diff --git a/preview/site/en/tutorials/image_similarity_search.md b/preview/site/en/tutorials/image_similarity_search.md
index 9c7cdca32..f4263b001 100644
--- a/preview/site/en/tutorials/image_similarity_search.md
+++ b/preview/site/en/tutorials/image_similarity_search.md
@@ -1,31 +1,201 @@
---
id: image_similarity_search.md
-summary: Build an image similarity search system with Milvus.
+summary: image search with Milvus
+title: Image Search with Milvus
---
-# Image Similarity Search
+# Image Search with Milvus
-This tutorial demonstrates how to use Milvus, the open-source vector database, to build a reverse image search system.
-- [Open Jupyter notebook](https://github.com/towhee-io/examples/tree/main/image/reverse_image_search)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/blob/master/solutions/image/reverse_image_search/quick_deploy)
-- [Try online demo](https://milvus.io/milvus-demos/)
+
-The ML models and third-party software used include:
-- YOLOv3
-- ResNet-50
-- MySQL
-- [Towhee](https://towhee.io/)
+In this notebook, we will show you how to use Milvus to search for similar images in a dataset. We will use a subset of the [ImageNet](https://www.image-net.org/) dataset, then search for an image of an Afghan hound to demonstrate this.
-
-Major search engines like Google already give users the option to search by image. Additionally, e-commerce platforms have realized the benefits this functionality offers online shoppers, with Amazon incorporating image search into its smartphone applications.
+## Dataset Preparation
+First, we need to load the dataset and unextract it for further processing.
-
-In this tutorial, you will learn how to build a reverse image search system that can detect image patterns and return similar images to the one you upload. To build such an image similarity search system, download PASCAL VOC image set which contains 17125 images of 20 categories. Alternatively, you can prepare your own image datasets. Use YOLOv3 for object detection and ResNet-50 for image feature extraction. After going through the two ML models, images are converted into 256-dimensional vectors. Then store the vectors in Milvus and a unique ID for each vector is automatically generated by Milvus. MySQL is then used to map the vector IDs to the images in the dataset. Whenever you upload a new image to the image search system, it will be converted into a new vector and compared against the vectors previously stored in Milvus. Milvus then returns the IDs of the most similar vectors and you can query the corresponding images in MySQL.
+```python
+!wget https://github.com/milvus-io/pymilvus-assets/releases/download/imagedata/reverse_image_search.zip
+!unzip -q -o reverse_image_search.zip
+```
-
+## Prequisites
-![image_search](../../../assets/image_search.png "Workflow of a reverse image search system.")
+To run this notebook, you need to have the following dependencies installed:
+- pymilvus>=2.4.2
+- timm
+- torch
+- numpy
+- sklearn
+- pillow
-![image_search_demo](../../../assets/image_search_demo.jpeg "Demo of a reverse image search system.")
+To run Colab, we provide the handy commands to install the necessary dependencies.
+
+
+```python
+$ pip install pymilvus --upgrade
+$ pip install timm
+```
+
+
+If you are using Google Colab, to enable dependencies just installed, you may need to **restart the runtime**. (Click on the "Runtime" menu at the top of the screen, and select "Restart session" from the dropdown menu).
+
+
+
+## Define the Feature Extractor
+Then, we need to define a feature extractor which extracts embedding from an image using timm's ResNet-34 model.
+
+
+```python
+import torch
+from PIL import Image
+import timm
+from sklearn.preprocessing import normalize
+from timm.data import resolve_data_config
+from timm.data.transforms_factory import create_transform
+
+
+class FeatureExtractor:
+ def __init__(self, modelname):
+ # Load the pre-trained model
+ self.model = timm.create_model(
+ modelname, pretrained=True, num_classes=0, global_pool="avg"
+ )
+ self.model.eval()
+
+ # Get the input size required by the model
+ self.input_size = self.model.default_cfg["input_size"]
+
+ config = resolve_data_config({}, model=modelname)
+ # Get the preprocessing function provided by TIMM for the model
+ self.preprocess = create_transform(**config)
+
+ def __call__(self, imagepath):
+ # Preprocess the input image
+ input_image = Image.open(imagepath).convert("RGB") # Convert to RGB if needed
+ input_image = self.preprocess(input_image)
+
+ # Convert the image to a PyTorch tensor and add a batch dimension
+ input_tensor = input_image.unsqueeze(0)
+
+ # Perform inference
+ with torch.no_grad():
+ output = self.model(input_tensor)
+
+ # Extract the feature vector
+ feature_vector = output.squeeze().numpy()
+
+ return normalize(feature_vector.reshape(1, -1), norm="l2").flatten()
+```
+
+## Create a Milvus Collection
+Then we need to create Milvus collection to store the image embeddings
+
+
+```python
+from pymilvus import MilvusClient
+
+# Set up a Milvus client
+client = MilvusClient(uri="example.db")
+# Create a collection in quick setup mode
+if client.has_collection(collection_name="image_embeddings"):
+ client.drop_collection(collection_name="image_embeddings")
+client.create_collection(
+ collection_name="image_embeddings",
+ vector_field_name="vector",
+ dimension=512,
+ auto_id=True,
+ enable_dynamic_field=True,
+ metric_type="COSINE",
+)
+```
+
+
+
+As for the argument of `MilvusClient`:
+
+- Setting the `uri` as a local file, e.g.`./milvus.db`, is the most convenient method, as it automatically utilizes [Milvus Lite](https://milvus.io/docs/milvus_lite.md) to store all data in this file.
+- If you have large scale of data, you can set up a more performant Milvus server on [docker or kubernetes](https://milvus.io/docs/quickstart.md). In this setup, please use the server uri, e.g.`http://localhost:19530`, as your `uri`.
+- If you want to use [Zilliz Cloud](https://zilliz.com/cloud), the fully managed cloud service for Milvus, adjust the `uri` and `token`, which correspond to the [Public Endpoint and Api key](https://docs.zilliz.com/docs/on-zilliz-cloud-console#free-cluster-details) in Zilliz Cloud.
+
+
+
+## Insert the Embeddings to Milvus
+We will extract embeddings of each image using the ResNet34 model and insert images from the training set into Milvus.
+
+
+```python
+import os
+
+extractor = FeatureExtractor("resnet34")
+
+root = "./train"
+insert = True
+if insert is True:
+ for dirpath, foldername, filenames in os.walk(root):
+ for filename in filenames:
+ if filename.endswith(".JPEG"):
+ filepath = dirpath + "/" + filename
+ image_embedding = extractor(filepath)
+ client.insert(
+ "image_embeddings",
+ {"vector": image_embedding, "filename": filepath},
+ )
+```
+
+
+```python
+from IPython.display import display
+
+query_image = "./test/Afghan_hound/n02088094_4261.JPEG"
+
+results = client.search(
+ "image_embeddings",
+ data=[extractor(query_image)],
+ output_fields=["filename"],
+ search_params={"metric_type": "COSINE"},
+)
+images = []
+for result in results:
+ for hit in result[:10]:
+ filename = hit["entity"]["filename"]
+ img = Image.open(filename)
+ img = img.resize((150, 150))
+ images.append(img)
+
+width = 150 * 5
+height = 150 * 2
+concatenated_image = Image.new("RGB", (width, height))
+
+for idx, img in enumerate(images):
+ x = idx % 5
+ y = idx // 5
+ concatenated_image.paste(img, (x * 150, y * 150))
+display("query")
+display(Image.open(query_image).resize((150, 150)))
+display("results")
+display(concatenated_image)
+```
+
+
+ 'query'
+
+
+
+
+
+
+
+
+
+ 'results'
+
+
+
+
+![Results](../../../assets/results.png)
+
+
+
+We can see that most of the images are from the same category as the search image, which is the Afghan hound. This means that we found similar images to the search image.
diff --git a/preview/site/en/tutorials/molecular_similarity_search.md b/preview/site/en/tutorials/molecular_similarity_search.md
deleted file mode 100644
index a82294dc3..000000000
--- a/preview/site/en/tutorials/molecular_similarity_search.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-id: molecular_similarity_search.md
-summary: Build a molecular similarity search system with Milvus.
----
-
-# Molecular Similarity Search
-
-This tutorial demonstrates how to use Milvus, the open-source vector database, to build a molecular similarity search system.
-- [Open Jupyter notebook](https://github.com/towhee-io/examples/tree/main/medical/molecular_search)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/tree/master/solutions/medical/molecular_similarity_search/quick_deploy)
-- [Try demo](https://milvus.io/milvus-demos/)
-
-The third-party software used include:
-- RDKit
-- MySQL
-- [Towhee](https://towhee.io/)
-
-
-
-Drug discovery is an important part of new medicine research and development. The process of drug discovery includes target selection and confirmation. When fragments or lead compounds are discovered, researchers usually search for similar compounds in internal or commercial compound libraries in order to discover structure-activity relationship (SAR), compound availability. Ultimately, they will evaluate the potential of the lead compounds to be optimized to candidate compounds. In order to discover available compounds from billion-scale compound libraries, chemical fingerprint is usually retrieved for substructure search and molecule similarity search.
-
-
-
-In this tutorial, you will learn how to build a molecular similarity search system that can retrieve the substructure, superstructure, and similar structure of a particular molecule. RDKit is an open-source cheminformatics software that can convert molecule structures into vectors. Then, the vectors are stored in Milvus and Milvus can perform similarity search on vectors. Milvus also automatically generates a unique ID for each vector. The mapping of vector IDs and structure of molecules are stored in MySQL.
-
-
-
-![molecular](../../../assets/molecular.png "Workflow of a molecular similarity search system.")
-![molecular](../../../assets/molecular_demo.jpeg "Demo of a molded similarity search system.")
-
diff --git a/preview/site/en/tutorials/question_answering_system.md b/preview/site/en/tutorials/question_answering_system.md
index 6d8c62522..dec6aafce 100644
--- a/preview/site/en/tutorials/question_answering_system.md
+++ b/preview/site/en/tutorials/question_answering_system.md
@@ -1,13 +1,13 @@
---
id: question_answering_system.md
-summary: Build a question answering system with Milvus.
+summary: Build a question answering system with Milvus.
+title: Question Answering System
---
# Question Answering System
This tutorial demonstrates how to use Milvus, the open-source vector database, to build a question answering (QA) system.
- [Open Jupyter notebook](https://github.com/towhee-io/examples/tree/main/nlp/question_answering)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/blob/master/solutions/nlp/question_answering_system/quick_deploy)
- [Try online demo](https://milvus.io/milvus-demos/)
The ML model and third-party software used include:
diff --git a/preview/site/en/tutorials/recommendation_system.md b/preview/site/en/tutorials/recommendation_system.md
index 7fcb612d6..cee4bf2db 100644
--- a/preview/site/en/tutorials/recommendation_system.md
+++ b/preview/site/en/tutorials/recommendation_system.md
@@ -1,13 +1,12 @@
---
id: recommendation_system.md
-summary: Build a personalized recommender system with Milvus.
+summary: Build a personalized recommender system with Milvus.
+title: Recommender System
---
# Recommender System
This tutorial demonstrates how to use Milvus, the open-source vector database, to build a recommendation system.
-- [Open Jupyter notebook](https://github.com/milvus-io/bootcamp/blob/master/solutions/nlp/recommender_system/recommender_system.ipynb)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/blob/master/solutions/nlp/recommender_system/quick_deploy)
The ML model and third-party software used include:
- PaddlePaddle
diff --git a/preview/site/en/tutorials/text_image_search.md b/preview/site/en/tutorials/text_image_search.md
index ea4cb53f2..bc38dda35 100644
--- a/preview/site/en/tutorials/text_image_search.md
+++ b/preview/site/en/tutorials/text_image_search.md
@@ -1,6 +1,7 @@
---
id: text_image_search.md
-summary: Build a text to image search engine with Milvus.
+summary: Build a text to image search engine with Milvus.
+title: Text to Image Search Engine
---
# Text to Image Search Engine
diff --git a/preview/site/en/tutorials/text_search_engine.md b/preview/site/en/tutorials/text_search_engine.md
index f99bb749a..f223d1579 100644
--- a/preview/site/en/tutorials/text_search_engine.md
+++ b/preview/site/en/tutorials/text_search_engine.md
@@ -1,6 +1,7 @@
---
id: text_search_engine.md
-summary: Build a text search engine with Milvus.
+summary: Build a text search engine with Milvus.
+title: Text Search Engine
---
# Text Search Engine
diff --git a/preview/site/en/tutorials/video_similarity_search.md b/preview/site/en/tutorials/video_similarity_search.md
index 4292487d3..7071bc136 100644
--- a/preview/site/en/tutorials/video_similarity_search.md
+++ b/preview/site/en/tutorials/video_similarity_search.md
@@ -1,13 +1,13 @@
---
id: video_similarity_search.md
-summary: Build a video similarity search system with Milvus.
+summary: Build a video similarity search system with Milvus.
+title: Video Similarity Search
---
# Video Similarity Search
This tutorial demonstrates how to use Milvus, the open-source vector database, to build a video similarity search system.
- [Open Jupyter notebook](https://github.com/towhee-io/examples/tree/main/video/reverse_video_search)
-- [Quick deploy](https://github.com/milvus-io/bootcamp/blob/master/solutions/video/video_similarity_search/quick_deploy)
The ML models and third-party software used include:
- OpenCV
diff --git a/preview/site/en/userGuide/build_index.md b/preview/site/en/userGuide/build_index.md
deleted file mode 100644
index d9ddd48cc..000000000
--- a/preview/site/en/userGuide/build_index.md
+++ /dev/null
@@ -1,536 +0,0 @@
----
-id: build_index.md
-related_key: create index
-summary: Learn how to build an index for vectors in Milvus.
----
-
-# Build an Index on Vectors
-
-This guide describes how to build an index on vectors in Milvus.
-
-Vector indexes are an organizational unit of metadata used to accelerate [vector similarity search](search.md). Without the index built on vectors, Milvus will perform a brute-force search by default.
-
-See [Vector Index](index.md) for more information about the mechanism and varieties of vector indexes.
-
-
-
-The following example builds a 1024-cluster IVF_FLAT index with Euclidean distance (L2) as the similarity metric. You can choose the index and metrics that suit your scenario. See [Similarity Metrics](metric.md) for more information.
-
-## Prepare index parameter
-
-Prepare the index parameters as follows:
-
-
-
-
-```python
-index_params = {
- "metric_type":"L2",
- "index_type":"IVF_FLAT",
- "params":{"nlist":1024}
-}
-```
-
-```javascript
-const index_params = {
- metric_type: "L2",
- index_type: "IVF_FLAT",
- params: JSON.stringify({ nlist: 1024 }),
-};
-```
-
-```go
-idx, err := entity.NewIndexIvfFlat( // NewIndex func
- entity.L2, // metricType
- 1024, // ConstructParams
-)
-if err != nil {
- log.Fatal("fail to create ivf flat index parameter:", err.Error())
-}
-```
-
-```java
-final IndexType INDEX_TYPE = IndexType.IVF_FLAT; // IndexType
-final String INDEX_PARAM = "{\"nlist\":1024}"; // ExtraParam
-```
-
-```shell
-create index
-
-Collection name (book): book
-
-The name of the field to create an index for (book_intro): book_intro
-
-Index type (FLAT, IVF_FLAT, IVF_SQ8, IVF_PQ, RNSG, HNSW, ANNOY): IVF_FLAT
-
-Index metric type (L2, IP, HAMMING, TANIMOTO): L2
-
-Index params nlist: 1024
-
-Timeout []:
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/index' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "field_name": "book_intro",
- "extra_params":[
- {"key": "metric_type", "value": "L2"},
- {"key": "index_type", "value": "IVF_FLAT"},
- {"key": "params", "value": "{\"nlist\":1024}"}
- ]
- }'
-```
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- metric_type |
- Type of metrics used to measure the similarity of vectors. |
- For floating point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- For binary vectors:
-
- JACCARD (Jaccard distance)
- TANIMOTO (Tanimoto distance)
- HAMMING (Hamming distance)
- SUPERSTRUCTURE (Superstructure)
- SUBSTRUCTURE (Substructure)
-
- |
-
-
- index_type |
- Type of index used to accelerate the vector search. |
- For floating point vectors:
-
- FLAT (FLAT)
- IVF_FLAT (IVF_FLAT)
- IVF_SQ8 (IVF_SQ8)
- IVF_PQ (IVF_PQ)
- HNSW (HNSW)
- ANNOY (ANNOY)
- DISKANN* (DISK_ANN)
-
- For binary vectors:
-
- BIN_FLAT (BIN_FLAT)
- BIN_IVF_FLAT (BIN_IVF_FLAT)
-
- |
-
-
- params |
- Building parameter(s) specific to the index. |
- See In-memory Index and On-disk Index for more information. |
-
-
- * DISKANN has certain prerequisites to meet. For details, see On-disk Index. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- metric_type |
- Type of metrics used to measure the similarity of vectors. |
- For floating point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- For binary vectors:
-
- JACCARD (Jaccard distance)
- TANIMOTO (Tanimoto distance)
- HAMMING (Hamming distance)
- SUPERSTRUCTURE (Superstructure)
- SUBSTRUCTURE (Substructure)
-
- |
-
-
- index_type |
- Type of index used to accelerate the vector search. |
- For floating point vectors:
-
- FLAT (FLAT)
- IVF_FLAT (IVF_FLAT)
- IVF_SQ8 (IVF_SQ8)
- IVF_PQ (IVF_PQ)
- HNSW (HNSW)
- ANNOY (ANNOY)
-
- For binary vectors:
-
- BIN_FLAT (BIN_FLAT)
- BIN_IVF_FLAT (BIN_IVF_FLAT)
-
- |
-
-
- params |
- Building parameter(s) specific to the index. |
- See In-memory Index and On-disk Index for more information. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- NewIndex func |
- Function to create entity. Index according to different index types. |
- For floating point vectors:
-
- NewIndexFlat (FLAT)
- NewIndexIvfFlat (IVF_FLAT)
- NewIndexIvfSQ8 (IVF_SQ8)
- NewIndexIvfPQ (IVF_PQ)
- NewIndexHNSW (HNSW)
- NewIndexANNOY (ANNOY)
- NewIndexDISKANN* (DISK_ANN)
-
- For binary vectors:
-
- NewIndexBinFlat (BIN_FLAT)
- NewIndexBinIvfFlat (BIN_IVF_FLAT)
-
- |
-
-
- metricType |
- Type of metrics used to measure the similarity of vectors. |
- For floating point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- For binary vectors:
-
- JACCARD (Jaccard distance)
- TANIMOTO (Tanimoto distance)
- HAMMING (Hamming distance)
- SUPERSTRUCTURE (Superstructure)
- SUBSTRUCTURE (Substructure)
-
- |
-
-
- ConstructParams |
- Building parameter(s) specific to the index. |
- See In-memory Index and On-disk Index for more information. |
-
-
- * DISKANN has certain prerequisites to meet. For details, see On-disk Index. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- IndexType |
- Type of index used to accelerate the vector search. |
- For floating point vectors:
-
- FLAT (FLAT)
- IVF_FLAT (IVF_FLAT)
- IVF_SQ8 (IVF_SQ8)
- IVF_PQ (IVF_PQ)
- HNSW (HNSW)
- ANNOY (ANNOY)
- DISKANN* (DISK_ANN)
-
- For binary vectors:
-
- BIN_FLAT (BIN_FLAT)
- BIN_IVF_FLAT (BIN_IVF_FLAT)
-
- |
-
-
- ExtraParam |
- Building parameter(s) specific to the index. |
- See In-memory Index and On-disk Index for more information. |
-
-
- * DISKANN has certain prerequisites to meet. For details, see On-disk Index. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- --help |
- Displays help for using the command. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- collection_name |
- Name of the collection to build the index on. |
-
-
- field_name |
- Name of the vector field to build the index on. |
-
-
- metric_type |
- Type of metrics used to measure the similarity of vectors. |
- For floating point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- For binary vectors:
-
- JACCARD (Jaccard distance)
- TANIMOTO (Tanimoto distance)
- HAMMING (Hamming distance)
- SUPERSTRUCTURE (Superstructure)
- SUBSTRUCTURE (Substructure)
-
- |
-
-
- index_type |
- Type of index used to accelerate the vector search. |
- For floating point vectors:
-
- FLAT (FLAT)
- IVF_FLAT (IVF_FLAT)
- IVF_SQ8 (IVF_SQ8)
- IVF_PQ (IVF_PQ)
- HNSW (HNSW)
- ANNOY (ANNOY)
-
- For binary vectors:
-
- BIN_FLAT (BIN_FLAT)
- BIN_IVF_FLAT (BIN_IVF_FLAT)
-
- |
-
-
- params |
- Building parameter(s) specific to the index. |
- See In-memory Index for more information. |
-
-
-
-
-## Build index
-
-Build the index by specifying the vector field name and index parameters.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.create_index(
- field_name="book_intro",
- index_params=index_params
-)
-```
-
-```python
-Status(code=0, message='')
-```
-
-```javascript
-await milvusClient.indexManager.createIndex({
- collection_name: "book",
- field_name: "book_intro",
- extra_params: index_params,
-});
-```
-
-```go
-err = milvusClient.CreateIndex(
- context.Background(), // ctx
- "book", // CollectionName
- "book_intro", // fieldName
- idx, // entity.Index
- false, // async
-)
-if err != nil {
- log.Fatal("fail to create index:", err.Error())
-}
-```
-
-```java
-milvusClient.createIndex(
- CreateIndexParam.newBuilder()
- .withCollectionName("book")
- .withFieldName("book_intro")
- .withIndexType(INDEX_TYPE)
- .withMetricType(MetricType.L2)
- .withExtraParam(INDEX_PARAM)
- .withSyncMode(Boolean.FALSE)
- .build()
-);
-```
-
-```shell
-# Follow the previous step.
-```
-
-```curl
-# Follow the previous step.
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- field_name |
- Name of the vector field to build index on. |
-
-
- index_params |
- Parameters of the index to build. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to build index in. |
-
-
- field_name |
- Name of the vector field to build index on. |
-
-
- extra_params |
- Parameters of the index to build. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to build index on. |
-
-
- fieldName |
- Name of the vector field to build index on. |
-
-
- entity.Index |
- Parameters of the index to build. |
-
-
- async |
- Switch to control sync/async behavior. The deadline of context is not applied in sync building process. |
-
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
- - [Search with Time Travel](timetravel.md)
diff --git a/preview/site/en/userGuide/build_scalar_index.md b/preview/site/en/userGuide/build_scalar_index.md
deleted file mode 100644
index 132175d3f..000000000
--- a/preview/site/en/userGuide/build_scalar_index.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-id: build_scalar_index.md
-related_key: create scalar index
-summary: Learn how to build an index for scalar fields in Milvus.
----
-
-# Build an Index on Scalars
-
-This guide describes how to build an index on scalar fields.
-
-## Overview
-
-Unlike vectors, which have both magnitude and direction, scalars have only magnitude. Milvus regards single numbers and strings as scalars. [Here](schema.md#Supported-data-type) is a list of the available data types for scalar fields in Milvus.
-
-To speed up [attribute filtering](boolean.md) in [hybrid searches](hybridsearch.md), you can build indexes on scalar fields since Milvus v2.1.0. You can read more about scalar field indexing [here](scalar_index.md).
-
-## Build index
-
-To build an index on scalar fields, you do not need to set any index parameters. The default value of a scalar field index name is **_default_idx_**. You can set it to another value that seems fit.
-
-The following code snippet assumes that a collection named `book` already exists and an index is to be created on the string field `book_name`.
-
-```python
-from pymilvus import Collection
-
-collection = Collection("book")
-collection.create_index(
- field_name="book_name",
- index_name="scalar_index",
-)
-collection.load()
-```
-
-Once the index has been created, you can include a boolean expression on this string field in a vector similarity search as follows:
-
-```python
-search_param = {
- "data": [[0.1, 0.2]],
- "anns_field": "book_intro",
- "param": {"metric_type": "L2", "params": {"nprobe": 10}},
- "limit": 2,
- "expr": "book_name like \"Hello%\"",
-}
-res = collection.search(**search_param)
-```
-
-## What's next
-
-- To learn more about scalar field indexing, read [Scalar Index](scalar_index.md).
-- To learn more about the related terms and rules mentioned above, read
-
- - [Bitset](bitset.md)
- - [Hybrid search](hybridsearch.md)
- - [Boolean expression rules](boolean.md)
- - [Supported data types](schema.md#Supported-data-type)
-
diff --git a/preview/site/en/userGuide/bulk_insert.md b/preview/site/en/userGuide/bulk_insert.md
deleted file mode 100644
index 61ee310b4..000000000
--- a/preview/site/en/userGuide/bulk_insert.md
+++ /dev/null
@@ -1,514 +0,0 @@
----
-id: bulk_insert.md
-related_key: bulk load
-summary: Learn how to insert multiple entities in a batch from a JSON file.
----
-
-# Insert Entities from Files
-
-Milvus 2.2 now supports inserting a batch of entities from a file. Compared to the `insert()` method, this feature reduces network transmission across the Milvus client, proxy, Pulsar, and data nodes. You can now import a batch of entities in one file or multiple files into a collection with just a few lines of code.
-
-## Prepare the data file
-
-Organize the data to be inserted into a Milvus collection in a row-based JSON file or multiple NumPy files.
-
-### Row-based JSON file
-
-You can name the file whatever makes sense, but the root key must be **root**. In the file, each entity is organized in a dictionary. The keys in the dictionary are field names, and the values are field values in the corresponding entity.
-
-The following is an example of a row-based JSON file.
-
-```
-{
- "rows":[
- {"book_id": 101, "word_count": 13, "book_intro": [1.1, 1.2]},
- {"book_id": 102, "word_count": 25, "book_intro": [2.1, 2.2]},
- {"book_id": 103, "word_count": 7, "book_intro": [3.1, 3.2]},
- {"book_id": 104, "word_count": 12, "book_intro": [4.1, 4.2]},
- {"book_id": 105, "word_count": 34, "book_intro": [5.1, 5.2]}
- ]
-}
-```
-
-
-
-- Do not add any field that does not exist in the target collection, and do not miss any field that the schema of the target collection defines.
-- Use the correct types of values in each field. For example, use integers in integer fields, floats in float fields, strings in varchar fields, and float arrays in vector fields.
-- Do not include an auto-generated primary key in the JSON file.
-- For binary vectors, use uint8 arrays. Each uint8 value represents 8 dimensions, and the value must be between 0 and 255. For example, `[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]` is a 16-dimensional binary vector and should be written as `[128, 7]` in the JSON file.
-
-
-
-### Column-based NumPy files
-
-As an alternative to the row-based JSON file mentioned above, you can also use NumPy arrays to organize each column of a dataset in a separate file. In this case, use the field name of each column to name the NumPy file.
-
-```python
-import numpy
-numpy.save('book_id.npy', numpy.array([101, 102, 103, 104, 105]))
-numpy.save('word_count.npy', numpy.array([13, 25, 7, 12, 34]))
-arr = numpy.array([[1.1, 1.2],
- [2.1, 2.2],
- [3.1, 3.2],
- [4.1, 4.2],
- [5.1, 5.2]])
-numpy.save('book_intro.npy', arr)
-```
-
-
-
-- Use the field name of each column to name the NumPy file. Do not add files named after a field that does not exist in the target collection. There should be one NumPy file for each field.
-- Use the correct value type when creating NumPy arrays. For details, refer to [these examples](#Create-NumPy-files).
-
-
-
-## Insert entities from files
-
-### 1. Upload data files
-
-You can use either MinIO or the local hard disk for storage in Milvus.
-
-
-Using the local hard disk for storage is only available in Milvus Standalone.
-
-
-- To use MinIO for storage, upload data files to the bucket defined by `minio.bucketName` in the `milvus.yml` configuration file .
-- For local storage, copy the data files into a directory of the local disk.
-
-
-### 2. Insert entities
-
-To facilitate data import from files, Milvus offers a bulk-insert API in various flavors. In PyMilvus, you can use the [`do_bulk_insert()`](https://milvus.io/api-reference/pymilvus/v2.2.2/Utility/do_bulk_insert().md) method. As to the Java SDK, use the [`bulkInsert`](https://milvus.io/api-reference/java/v2.2.3/BulkInsert/bulkInsert().md) method.
-
-In this method, you need to set the name of the target collection as **collection_name** and the list of files [prepared in the previous step](#Prepare-the-data-file) as **files**. Optionally, you can specify the name of a specific partition as **partition_name** in the target collection so that Milvus imports the data from the files listed only into this partition.
-
-- For a row-based JSON file, parameter **files** should be a one-member list containing the path to the JSON file.
-
-
-
- ```python
- from pymilvus import utility
- task_id = utility.do_bulk_insert(
- collection_name="book",
- partition_name="2022",
- files=["test.json"]
- )
- ```
-
- ```java
- import io.milvus.param.bulkinsert.BulkInsertParam;
- import io.milvus.response.BulkInsertResponseWrapper;
- import io.milvus.grpc.ImportResponse;
- import io.milvus.param.R;
-
- BulkInsertParam param = BulkInsertParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("2022")
- .addFile("test.json")
- .build()
- R response = milvusClient.bulkInsert(param);
- BulkInsertResponseWrapper wrapper = new BulkInsertResponseWrapper(response.getData());
- task_id = wrapper.getTaskID();
- ```
-
-- For a set of column-based NumPy files, parameter **files** should be a multi-member list containing the paths to the NumPy files.
-
-
-
- ```python
- from pymilvus import utility
- task_id = utility.do_bulk_insert(
- collection_name="book",
- partition_name="2022",
- files=["book_id.npy", "word_count.npy", "book_intro.npy"]
- )
- ```
-
- ```java
- import io.milvus.param.bulkinsert.BulkInsertParam;
- import io.milvus.response.BulkInsertResponseWrapper;
- import io.milvus.grpc.ImportResponse;
- import io.milvus.param.R;
-
- BulkInsertParam param = BulkInsertParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("2022")
- .addFile("book_id.npy")
- .addFile("word_count.npy")
- .addFile("book_intro.npy")
- .build()
- R response = milvusClient.bulkInsert(param);
- BulkInsertResponseWrapper wrapper = new BulkInsertResponseWrapper(response.getData());
- task_id = wrapper.getTaskID();
- ```
-
- Each call to the bulk-insert API returns immediately. The return value is the ID of a data-import task running in the background. Milvus maintains a queue of such tasks to be dispatched in parallel to idle data nodes.
-
-
-
- When setting the file paths, note that
-
- - If you upload the data file to a MinIO instance, a valid file path should be relative to the root bucket defined in **"milvus.yml"**, such as **"data/book_id.npy"**.
- - If you upload the data file to the local hard drive, a valid file path should be an absolute path such as **"/tmp/data/book_id.npy"**.
-
- If you have a lot of files to process, consider [creating multiple data-import tasks and have them run in parallel](#Import-multiple-NumPy-files-in-parallel).
-
-
-
-
-
-## List tasks
-
-### Check task state
-
-Since the bulk-insert API is asynchronous, you might need to check whether a data-import task is complete. Milvus provides a **BulkInsertState** object to hold the details of a data-import task and you can use the get-bulk-insert-state API to retrieve this object using the programming language of your choice.
-
-In the flavor of PyMilvus, you can use [`get_bulk_insert_state()`](https://milvus.io/api-reference/pymilvus/v2.2.2/Utility/get_bulk_insert_state().md). For Java SDK, use [`getBulkInsertState()`](https://milvus.io/api-reference/java/v2.2.3/BulkInsert/getBulkInsertState().md).
-
-
-
-```python
-task = utility.get_bulk_insert_state(task_id=task_id)
-print("Task state:", task.state_name())
-print("Imported files:", task.files)
-print("Collection name:", task.collection_name)
-print("Partition name:", task.partition_name)
-print("Start time:", task.create_time_str)
-print("Imported row count:", task.row_count)
-print("Entities ID array generated by this task:", task.ids())
-
-if task.state == BulkInsertState.ImportFailed:
- print("Failed reason:", task.failed_reason)
-```
-
-```java
-import io.milvus.param.bulkinsert.GetBulkInsertStateParam;
-import io.milvus.response.GetBulkInsertStateWrapper;
-import io.milvus.grpc.GetImportStateResponse;
-import io.milvus.grpc.ImportState;
-import io.milvus.param.R;
-
-GetBulkInsertStateParam param = GetBulkInsertStateParam.newBuilder()
- .withTask(task_id)
- .build()
-R response = milvusClient.getBulkInsertState(param);
-GetBulkInsertStateWrapper wrapper = new GetBulkInsertStateWrapper(response.getData());
-ImportState state = wrapper.getState();
-long row_count = wrapper.getImportedCount();
-String create_ts = wrapper.getCreateTimeStr();
-String failed_reason = wrapper.getFailedReason();
-String files = wrapper.getFiles();
-int progress = wrapper.getProgress();
-```
-
-The following table lists the state of a data-import task returned.
-
-| State | Code | Description |
-| ------------------ | -------- | ------------------------------------------------------------ |
-| Pending | 0 | The task is pending. |
-| Failed | 1 | The task fails. Use task.failed_reason
to understand why the task fails. |
-| Started | 2 | The task has been dispatched to a data node and will be executed soon. |
-| Persisted | 5 | New data segments have been generated and persisted. |
-| Completed | 6 | The metadata has been updated for the new segments. |
-| Failed and cleaned | 7 | The task fails and all temporary data generated by this task are cleared. |
-
-
-### List all tasks
-
-Milvus also offers a list-bulk-insert-tasks API for you to list all data-import tasks. In this method, you need to specify a collection name so that Milvus lists all tasks that import data into this collection. Optionally, you can specify a limit for the maximum number of tasks to return.
-
-
-
-```python
-tasks = utility.list_bulk_insert_tasks(collection_name="book", limit=10)
-for task in tasks:
- print(task)
-```
-
-```java
-import io.milvus.param.bulkinsert.ListBulkInsertTasksParam;
-import io.milvus.grpc. ListImportTasksResponse;
-import io.milvus.grpc.GetImportStateResponse;
-import io.milvus.grpc.ImportState;
-import io.milvus.param.R;
-
-ListBulkInsertTasksParam param = ListBulkInsertTasksParam.newBuilder()
- .withCollectionName("book")
- .build()
-R response = milvusClient.listBulkInsertTasks(param);
-List tasks = response.getTasksList();
-for (GetImportStateResponse task : tasks) {
- GetBulkInsertStateWrapper wrapper = new GetBulkInsertStateWrapper(task);
- ImportState state = wrapper.getState();
- long row_count = wrapper.getImportedCount();
- String create_ts = wrapper.getCreateTimeStr();
- String failed_reason = wrapper.getFailedReason();
- String files = wrapper.getFiles();
-}
-```
-
-| Parameter | Description |
-| -------------------------- | ------------------------------------------------------------ |
-| collection_name (optional) | Specify the target collection name to list all tasks on this collection. Leave the value empty if you want to list all tasks recorded by Milvus root coords. |
-| limit (optional) | Specify this parameter to limit the number of returned tasks. |
-
-
-See [System Configurations](configure_rootcoord.md) for more information about import task configurations.
-
-## Limits
-
-| Feature | Maximum limit |
-| ------------------------------ | ------------- |
-| Max. size of task pending list | 65536 |
-| Max. size of a data file | 16 GB |
-
-
-## Reference
-
-### Configure Milvus for data import
-
-To have Milvus remove failed or old data-import tasks automatically, you can specify a timeout duration and retention period for data-import tasks in the Milvus configuration file.
-
-```yaml
-rootCoord:
- # (in seconds) Duration after which an import task will expire (be killed). Default 900 seconds (15 minutes).
- # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
- importTaskExpiration: 900
- # (in seconds) Milvus will keep the record of import tasks for at least `importTaskRetention` seconds. Default 86400
- # seconds (24 hours).
- # Note: If default value is to be changed, change also the default in: internal/util/paramtable/component_param.go
- importTaskRetention: 86400
-```
-
-### Create NumPy files
-
-The following examples demonstrate how to create NumPy files for columns of data types that Milvus supports.
-
-- Create a Numpy file from a boolean array
-
- ```
- import numpy as np
- data = [True, False, True, False]
- dt = np.dtype('bool', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from an int8 array
-
- ```
- import numpy as np
- data = [1, 2, 3, 4]
- dt = np.dtype('int8', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from an int16 array
-
- ```
- import numpy as np
- data = [1, 2, 3, 4]
- dt = np.dtype('int16', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from an int32 array
-
- ```
- import numpy as np
- data = [1, 2, 3, 4]
- dt = np.dtype('int32', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from an int64 array
-
- ```
- import numpy as np
- data = [1, 2, 3, 4]
- dt = np.dtype('int64', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from a float array
-
- ```
- import numpy as np
- data = [0.1, 0.2, 0.3, 0.4]
- dt = np.dtype('float32', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from a double float array
-
- ```
- import numpy as np
- data = [0.1, 0.2, 0.3, 0.4]
- dt = np.dtype('float64', (len(data)))
- arr = np.array(data, dtype=dt)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from a VARCHAR array
-
- ```
- data = ["a", "b", "c", "d"]
- arr = np.array(data)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from a binary vector array
-
- For binary vectors, use **uint8** as the NumPy data type. Each uint8 value represents 8 dimensions. For a 32-dimensional binary vector, use four uint8 values.
-
- ```
- data = [
- [43, 35, 124, 90],
- [65, 212, 12, 57],
- [6, 126, 232, 78],
- [87, 189, 38, 22],
- ]
- dt = np.dtype('uint8', (len(data), 4))
- arr = np.array(data)
- np.save(file_path, arr)
- ```
-
-- Create a NumPy file from a float vector array
-
- In Milvus, you can use either float32 or float64 values to form a float vector.
-
- The following snippet creates a NumPy file from an 8-dimensional vector array formed using float32 values.
-
- ```
- data = [
- [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8],
- [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8],
- [3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8],
- [4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8],
- ]
- dt = np.dtype('float32', (len(data), 8))
- arr = np.array(data)
- np.save(file_path, arr)
- ```
-
-### Import multiple NumPy files in parallel
-
-You can upload NumPy files into different subdirectories, create multiple import tasks, and execute them in parallel.
-
-Assume the data structure is as follows:
-
-
-├── task_1
-│ └── book_id.npy
-│ └── word_count.npy
-│ └── book_intro.npy
-├── task_2
-│ └── book_id.npy
-│ └── word_count.npy
-│ └── book_intro.npy
-
-
-You can create multiple data-import tasks as follows
-
-```
-task_1 = utility.do_bulk_insert(
- collection_name="book",
- files=["task_1/book_id.npy", "task_1/word_count.npy", "task_1/book_intro.npy"]
-)
-task_2 = utility.do_bulk_insert(
- collection_name="book",
- files=["task_2/book_id.npy", "task_2/word_count.npy", "task_2/book_intro.npy"]
-)
-```
-
-
-### Check data searchability
-
-After a data-import task is complete, Milvus persists the imported data into segments and sends these segments to the index nodes for index-building. During the index-building process, these segments are unavailable for searches. Once such a process is complete, you need to call the load API again to load these segments into the query nodes. These segments will then be ready for searches.
-
-1. Check the index-building progress
-
- PyMilvus provides a utility method to wait for the index-building process to complete.
-
- ```
- utility.wait_for_index_building_complete(collection_name)
- ```
-
- In other SDKs, you can use the describe-index API to check the index-building progress.
-
- ```
- while (true) {
- R response = milvusClient.describeIndex(
- DescribeIndexParam.newBuilder()
- .withCollectionName(collection_name)
- .withIndexName(index_name)
- .build());
- IndexDescription desc = response.getData().getIndexDescriptions(0);
- if (desc.getIndexedRows() == desc.getTotalRows()) {
- break;
- }
- }
- ```
-
-2. Load new segments into query nodes
-
-Newly indexed segments need to be loaded manually as follows:
-
-
-
-```python
-collection.load(_refresh = True)
-```
-
-```java
-R response = milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName(collection_name)
- .withRefresh(Boolean.TRUE)
- .build());
-```
-
-
-
-
- The `_refresh` parameter is `false` by default. Do not set it to `true` when you load a collection for the first time.
-
-
-
-
-
-
-
- The `withRefresh()` method is optional. Do not call it with a `Boolean.TRUE` when you load a collection for the first time.
-
-
-
-
-
-
-## What's next
-
-Learn more basic operations of Milvus:
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/calculate_distance.md b/preview/site/en/userGuide/calculate_distance.md
deleted file mode 100644
index 5e0893069..000000000
--- a/preview/site/en/userGuide/calculate_distance.md
+++ /dev/null
@@ -1,375 +0,0 @@
----
-id: calculate_distance.md
-related_key: calculate distance
-summary: Learn how to calculate distance between vectors with Milvus.
----
-
-# Calculate Distance Between Vectors
-
-This topic describes how to calculate distance between vectors with Milvus.
-
-Milvus searches most similar vectors based on the distance calculation of vectors. Vice versa, you can use Milvus to calculate the distance between vectors using distance metrics that suit specific scenario. See [Similarity Metrics](metric.md) for more information.
-
-The following example simulates the scenarios when you want to calculate the distance between vectors in the collection and some other vectors.
-
-## Prepare vectors
-
-Prepare the vectors used for calculation.
-
-
-Vectors to be calculated must agree in vector type and dimension.
-
-
-
-
-
-```python
-vectors_left = {
- "ids": [0, 1],
- "collection": "book",
- "partition": "_default",
- "field": "book_intro"
-}
-import random
-external_vectors = [[random.random() for _ in range(2)] for _ in range(4)]
-vectors_right = {"float_vectors": external_vectors}
-```
-
-```javascript
-// Node User Guide will be ready soon.
-```
-
-```go
-// GO User Guide will be ready soon.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-// CLI User Guide will be ready soon.
-```
-
-```curl
-vectors_left='{
- "dim": 2,
- "ids": {
- "id_array": [1,2],
- "collection_name": "book",
- "partition_names": ["_default"],
- "field_name": "book_intro"
- }
-}'
-vectors_right='{
- "dim": 2,
- "vectors": [1,2,3,4,5,6,7,8] # The numbers in the list will be automatically split into four vectors.
-}'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- vectors_left and vectors_right |
- Vectors on the left and right side of the operator. Dict type that can be represented as {"ids": [primary_key_1, primary_key_2, ... primary_key_n], "collection": "collection_name", "partition": "partition_name", "field": "vector_field_name"} , {"float_vectors": [[1.0, 2.0], [3.0, 4.0], ... [9.0, 10.0]]} , or {"bin_vectors": [b'', b'N', ... b'Ê']} . |
-
-
- ids |
- List of primary key of entities that in the collection. |
-
-
- collection |
- Name of the collection that holds the entities. |
-
-
- partition |
- Name of the partition that holds the entities. |
-
-
- field |
- Name of the vector field in the collection. |
-
-
- float_vectors or bin_vectors |
- Type of the vectors. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- dim |
- Dimension of the vector. |
- N/A |
-
-
- id_array |
- List of the primary keys of entities in the collection. |
- N/A |
-
-
- collection_name |
- Name of the collection that holds the entities. |
- N/A |
-
-
- partition_names |
- Names of the partitions that hold the entities. |
- N/A |
-
-
- field_name |
- Name of the vector field in the collection. |
- N/A |
-
-
- vectors |
- Temporarily only floating-point vectors are supported. |
- N/A |
-
-
-
-
-## Prepare calculation parameters
-
-Specify the parameters used for the calculation.
-
-
-
-
-```python
-params = {
- "metric": "IP",
- "dim": 2
-}
-```
-
-```javascript
-// Node User Guide will be ready soon.
-```
-
-```go
-// GO User Guide will be ready soon.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-// CLI User Guide will be ready soon.
-```
-
-```curl
-params='[
- {"key": "metric", "value": "IP"}
-]'
-```
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- params |
- Calculation parameters. |
- N/A |
-
-
- metric |
- Metric types used for calculation. |
- For floating-point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- For binary vectors:
-
- JACCARD (Jaccard distance)
- TANIMOTO (Tanimoto distance)
- HAMMING (Hamming distance)
- SUPERSTRUCTURE (Superstructure)
- SUBSTRUCTURE (Substructure)
-
- |
-
-
- dim |
- Dimension of the vector. |
- N/A |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- metric |
- Metric types used for calculation. |
- For floating-point vectors:
-
- L2 (Euclidean distance)
- IP (Inner product)
-
- |
-
-
-
-
-## (Optional) Load collection
-
-If you calculate with the vectors in a collection in Milvus, you must load the collection to memory first.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load()
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.LoadCollection(
- context.Background(), // ctx
- "book", // CollectionName
- false // async
-)
-if err != nil {
- log.Fatal("failed to load collection:", err.Error())
-}
-```
-
-```java
-milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-load -c book
-```
-
-``` curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-## Calculate vector distance
-
-Calculate the distance between vectors based on the vectors and parameters provided.
-
-```python
-from pymilvus import utility
-results = utility.calc_distance(
- vectors_left=vectors_left,
- vectors_right=vectors_right,
- params=params
-)
-print(results)
-```
-
-```javascript
-// Node User Guide will be ready soon.
-```
-
-```go
-// GO User Guide will be ready soon.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-// CLI User Guide will be ready soon.
-```
-
-```curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/distance' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d "{
- \"op_left\": $vectors_left,
- \"op_right\": $vectors_right,
- \"params\": $params
- }"
-```
-
-
-Output:
-
-```json
-{"status":{},"Array":{"FloatDist":{"data":[3,7,11,15,4,10,16,22]}}}
-```
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
- - [Search with Time Travel](timetravel.md)
-
diff --git a/preview/site/en/userGuide/check_collection.md b/preview/site/en/userGuide/check_collection.md
deleted file mode 100644
index aabf1f0fa..000000000
--- a/preview/site/en/userGuide/check_collection.md
+++ /dev/null
@@ -1,534 +0,0 @@
----
-id: check_collection.md
-related_key: collection
-summary: Learn how to check collection information in Milvus.
----
-
-# Check Collection Information
-
-This topic describes how to check the information of the collection in Milvus.
-
-## Check if a collection exists
-
-Verify if a collection exists in Milvus.
-
-
-
-
-```python
-from pymilvus import utility
-utility.has_collection("book")
-```
-
-```javascript
-await milvusClient.collectionManager.hasCollection({
- collection_name: "book",
-});
-```
-
-```go
-hasColl, err := milvusClient.HasCollection(
- context.Background(), // ctx
- collectionName, // CollectionName
-)
-if err != nil {
- log.Fatal("failed to check whether collection exists:", err.Error())
-}
-log.Println(hasColl)
-```
-
-```java
-R respHasCollection = milvusClient.hasCollection(
- HasCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-if (respHasCollection.getData() == Boolean.TRUE) {
- System.out.println("Collection exists.");
-}
-```
-
-```shell
-describe collection -c book
-```
-
-```curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/collection/existence' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "value":true
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-## Check collection details
-
-Check the details of a collection.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-
-collection.schema # Return the schema.CollectionSchema of the collection.
-collection.description # Return the description of the collection.
-collection.name # Return the name of the collection.
-collection.is_empty # Return the boolean value that indicates if the collection is empty.
-collection.num_entities # Return the number of entities in the collection.
-collection.primary_field # Return the schema.FieldSchema of the primary key field.
-collection.partitions # Return the list[Partition] object.
-collection.indexes # Return the list[Index] object.
-collection.properties # Return the expiration time of data in the collection.
-```
-
-```javascript
-await milvusClient.collectionManager.describeCollection({ // Return the name and schema of the collection.
- collection_name: "book",
-});
-
-await milvusClient.collectionManager.getCollectionStatistics({ // Return the statistics information of the collection.
- collection_name: "book",
-});
-```
-
-```go
-collDesc, err := milvusClient.DescribeCollection( // Return the name and schema of the collection.
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("failed to check collection schema:", err.Error())
-}
-log.Printf("%v\n", collDesc)
-
-collStat, err := milvusClient.GetCollectionStatistics( // Return the statistics information of the collection.
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("failed to check collection statistics:", err.Error())
-}
-```
-
-```java
-R respDescribeCollection = milvusClient.describeCollection(
- // Return the name and schema of the collection.
- DescribeCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-DescCollResponseWrapper wrapperDescribeCollection = new DescCollResponseWrapper(respDescribeCollection.getData());
-System.out.println(wrapperDescribeCollection);
-
-R respCollectionStatistics = milvusClient.getCollectionStatistics(
- // Return the statistics information of the collection.
- GetCollectionStatisticsParam.newBuilder()
- .withCollectionName("book")
- .build()
- );
-GetCollStatResponseWrapper wrapperCollectionStatistics = new GetCollStatResponseWrapper(respCollectionStatistics.getData());
-System.out.println("Collection row count: " + wrapperCollectionStatistics.getRowCount());
-```
-
-```shell
-describe collection -c book
-```
-
-```curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/collection' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status": {},
- "schema": {
- "name": "book",
- "description": "Test book search",
- "fields": [
- {
- "fieldID": 100,
- "name": "book_id",
- "is_primary_key": true,
- "description": "book id",
- "data_type": 5
- },
- {
- "fieldID": 101,
- "name": "book_intro",
- "description": "embedded vector of book introduction",
- "data_type": 101,
- "type_params": [
- {
- "key": "dim",
- "value": "2"
- }
- ]
- }
- ]
- },
- "collectionID": 434240188610972993,
- "virtual_channel_names": [
- "by-dev-rootcoord-dml_0_434240188610972993v0",
- "by-dev-rootcoord-dml_1_434240188610972993v1"
- ],
- "physical_channel_names": [
- "by-dev-rootcoord-dml_0",
- "by-dev-rootcoord-dml_1"
- ],
- "created_timestamp": 434240188610772994,
- "created_utc_timestamp": 1656494860118,
- "shards_num": 2,
- "consistency_level": 1
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- schema |
- The schema of the collection. |
-
-
- description |
- The description of the collection. |
-
-
- name |
- The name of the collection. |
-
-
- is_empty |
- A boolean value that indicates whether the collection is empty. |
-
-
- num_entities |
- The number of entities in the collection. |
-
-
- primary_field |
- The primary field of the collection. |
-
-
- properties |
- Currently, only the property of collection.ttl.seconds is shown. Collection time to live (TTL) is the expiration time of data in a collection. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-## List all collections
-
-List all collections in this Milvus Instance.
-
-
-
-
-```python
-from pymilvus import utility
-utility.list_collections()
-```
-
-```javascript
-await milvusClient.collectionManager.showCollections();
-```
-
-```go
-listColl, err := milvusClient.ListCollections(
- context.Background(), // ctx
-)
-if err != nil {
- log.Fatal("failed to list all collections:", err.Error())
-}
-log.Println(listColl)
-```
-
-```java
-R respShowCollections = milvusClient.showCollections(
- ShowCollectionsParam.newBuilder().build()
- );
-System.out.println(respShowCollections);
-```
-
-```shell
-list collections
-```
-
-```curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/collections' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json'
-```
-
-
-Output:
-
-```json
-{
- "status": {},
- "collection_names": [
- "book"
- ],
- "collection_ids": [
- 434240188610972993
- ],
- "created_timestamps": [
- 434240188610772994
- ],
- "created_utc_timestamps": [
- 1656494860118
- ]
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/check_partition.md b/preview/site/en/userGuide/check_partition.md
deleted file mode 100644
index 915af85f6..000000000
--- a/preview/site/en/userGuide/check_partition.md
+++ /dev/null
@@ -1,354 +0,0 @@
----
-id: check_partition.md
-related_key: Partition
-summary: Learn how to check partition information in Milvus.
----
-
-# Check Partition Information
-
-This topic describes how to check the information of partitions in Milvus.
-
-## Verify if a partition exists
-
-Verify if a partition exists in the specified collection.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.has_partition("novel")
-```
-
-```javascript
-await milvusClient.partitionManager.hasPartition({
- collection_name: "book",
- partition_name: "novel",
-});
-```
-
-```go
-hasPar, err := milvusClient.HasPartition(
- context.Background(), // ctx
- "book", // CollectionName
- "novel", // partitionName
-)
-if err != nil {
- log.Fatal("failed to check the partition:", err.Error())
-}
-log.Println(hasPar)
-```
-
-```java
-R respHasPartition = milvusClient.hasPartition(
- HasPartitionParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("novel")
- .build()
-);
-if (respHasPartition.getData() == Boolean.TRUE) {
- System.out.println("Partition exists.");
-}
-```
-
-```shell
-describe partition -c book -p novel
-```
-
-``` curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/partition/existence' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "partition_name": "novel"
- }'
-```
-
-
-Output:
-
-```json
-{"status":{},"value":true}
-```
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name |
- Name of the partition to check. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
- partition_name |
- Name of the partition to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to check. |
-
-
- partitionName |
- Name of the partition to check. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to check. |
-
-
- -p |
- Name of the partition to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
- partition_name |
- Name of the partition to check. |
-
-
-
-
-## List all partitions
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.partitions
-```
-
-```javascript
-await milvusClient.partitionManager.showPartitions({
- collection_name: "book",
-});
-```
-
-```go
-listPar, err := milvusClient.ShowPartitions(
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("failed to list partitions:", err.Error())
-}
-log.Println(listPar)
-```
-
-```java
-R respShowPartitions = milvusClient.showPartitions(
- ShowPartitionsParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-System.out.println(respShowPartitions);
-```
-
-```shell
-list partitions -c book
-```
-
-``` curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/partitions' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status": {},
- "partition_names": [
- "_default",
- "novel"
- ],
- "partitionIDs": [
- 434261413928632322,
- 434261764795531265
- ],
- "created_timestamps": [
- 434261413928632323,
- 434261764795531266
- ],
- "created_utc_timestamps": [
- 1656575828280,
- 1656577166731
- ]
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to check. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to check. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/collection_alias.md b/preview/site/en/userGuide/collection_alias.md
deleted file mode 100644
index d7a0a016c..000000000
--- a/preview/site/en/userGuide/collection_alias.md
+++ /dev/null
@@ -1,489 +0,0 @@
----
-id: collection_alias.md
-related_key: collection alias
-summary: Learn how to manage collection alias in Milvus.
----
-
-# Collection Alias
-
-This topic describes how to manage collection aliases. Milvus supports specifying a unique alias for a collection.
-
-
-A collection alias is globally unique, hence you cannot assign the same alias to different collections. However, you can assign multiple aliases to one collection.
-
-
-The following example is based on the alias `publication`.
-
-## Create a collection alias
-
-Specify an alias for a collection.
-
-
-
-
-```python
-from pymilvus import utility
-utility.create_alias(
- collection_name = "book",
- alias = "publication"
-)
-```
-
-```javascript
-await milvusClient.collectionManager.createAlias({
- collection_name: "book",
- alias: "publication",
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-milvusClient.createAlias(
- CreateAliasParam.newBuilder()
- .withCollectionName("book")
- .withAlias("publication")
- .build()
-);
-```
-
-```shell
-create alias -c book -a publication
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/alias' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "alias":"publication"
- }'
-```
-```curl
-# Output:
-{}
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to create alias on. |
-
-
- alias |
- Collection alias to create. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to create alias on. |
-
-
- alias |
- Collection alias to create. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to create alias on. |
-
-
- Alias |
- Collection alias to create. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to create alias on. |
-
-
- -a |
- Collection alias to create. |
-
-
- -A (Optional) |
- Flag to transfer the alias to a specified collection. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to create alias on. |
-
-
- alias |
- Collection alias to create. |
-
-
-
-
-## Drop a collection alias
-
-Drop a specified alias.
-
-
-
-
-```python
-from pymilvus import utility
-utility.drop_alias(alias = "publication")
-```
-
-```javascript
-await milvusClient.collectionManager.dropAlias({
- alias: "publication",
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-milvusClient.dropAlias(
- DropAliasParam.newBuilder()
- .withAlias("publication")
- .build()
-);
-```
-
-```shell
-delete alias -a publication
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/alias' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "alias":"publication"
- }'
-```
-```curl
-# Output:
-{}
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- alias |
- Collection alias to drop. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- alias |
- Collection alias to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- Alias |
- Collection alias to drop. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -a |
- Collection alias to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- alias |
- Collection alias to drop. |
-
-
-
-
-## Alter a collection alias
-
-Alter an existing alias to another collection. The following example is based on the situation that the alias `publication` was originally created for another collection.
-
-
-
-
-```python
-from pymilvus import utility
-utility.alter_alias(
- collection_name = "book",
- alias = "publication"
-)
-```
-
-```javascript
-await milvusClient.collectionManager.alterAlias({
- collection_name: "book",
- alias: "publication",
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-milvusClient.alterAlias(
- AlterAliasParam.newBuilder()
- .withCollectionName("book")
- .withAlias("publication")
- .build()
-);
-```
-
-```shell
-create alias -c book -A -a publication
-```
-
-```curl
-curl -X 'PATCH' \
- 'http://localhost:9091/api/v1/alias' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "alias":"publication"
- }'
-```
-
-
-Output:
-
-```json
-{}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to alter alias to. |
-
-
- alias |
- Collection alias to alter. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to alter alias to. |
-
-
- alias |
- Collection alias to alter. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to alter alias to. |
-
-
- Alias |
- Collection alias to alter. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to alter alias to. |
-
-
- -a |
- Collection alias to alter. |
-
-
- -A |
- Flag to transfer the alias to a specified collection. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to alter alias to. |
-
-
- alias |
- Collection alias to alter. |
-
-
-
-
-## Limits
-
-|Feature|Maximum limit|
-|---|---|
-|Length of an alias|255 characters|
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/compact_data.md b/preview/site/en/userGuide/compact_data.md
deleted file mode 100644
index b30b1e429..000000000
--- a/preview/site/en/userGuide/compact_data.md
+++ /dev/null
@@ -1,192 +0,0 @@
----
-id: compact_data.md
-related_key: compact data
-summary: Learn how to compact data in Milvus.
----
-
-# Compact Data
-
-This topic describes how to compact data in Milvus.
-
-Milvus supports automatic data compaction by default. You can [configure](configure-docker.md) your Milvus to enable or disable [compaction](configure_datacoord.md#dataCoordenableCompaction) and [automatic compaction](configure_datacoord.md#dataCoordcompactionenableAutoCompaction).
-
-If automatic compaction is disabled, you can still compact data manually.
-
-
-To ensure accuracy of searches with Time Travel, Milvus retains the data operation log within the span specified in
common.retentionDuration
. Therefore, data operated within this period will not be compacted.
-
-
-## Compact data manually
-
-Compaction requests are processed asynchronously because they are usually time-consuming.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.compact()
-```
-
-```javascript
-const res = await milvusClient.collectionManager.compact({
- collection_name: "book",
-});
-const compactionID = res.compactionID;
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-R response = milvusClient.manualCompaction(
- ManualCompactionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-long compactionID = response.getData().getCompactionID();
-```
-
-```shell
-compact -c book
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/compaction' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collectionID": 434262071120432449
- }'
-```
-
-
-Output:
-
-```json
-{"status":{},"compactionID":434262132129005569}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to compact data. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to compact data. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to compact data. |
-
-
-
-
-## Check compaction status
-
-You can check the compaction status with the compaction ID returned when the manual compaction is triggered.
-
-
-
-
-```python
-collection.get_compaction_state()
-```
-
-```javascript
-const state = await milvusClient.collectionManager.getCompactionState({
- compactionID
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-milvusClient.getCompactionState(GetCompactionStateParam.newBuilder()
- .withCompactionID(compactionID)
- .build()
-);
-```
-
-```shell
-show compaction_state -c book
-```
-
-```curl
-curl -X 'GET' \
- 'http://localhost:9091/api/v1/compaction/state' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "compactionID": 434262132129005569
- }'
-```
-
-
-Output:
-
-```json
-{"status":{},"state":2}
-```
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/create_collection.md b/preview/site/en/userGuide/create_collection.md
deleted file mode 100644
index 6935a5e00..000000000
--- a/preview/site/en/userGuide/create_collection.md
+++ /dev/null
@@ -1,735 +0,0 @@
----
-id: create_collection.md
-related_key: create collection
-summary: Learn how to create a collection in Milvus.
----
-
-# Create a Collection
-
-This topic describes how to create a collection in Milvus.
-
-A collection consists of one or more partitions. While creating a new collection, Milvus creates a default partition `_default`. See [Glossary - Collection](glossary.md#Collection) for more information.
-
-The following example builds a two-[shard](glossary.md#Sharding) collection named `book`, with a primary key field named `book_id`, an `INT64` scalar field named `word_count`, and a two-dimensional floating-point vector field named `book_intro`. Real applications will likely use much higher dimensional vectors than the example.
-
-
-## Prepare Schema
-
-
-The collection to create must contain a primary key field and a vector field. INT64 and String are supported data type on primary key field.
-
-
-
-First, prepare necessary parameters, including field schema, collection schema, and collection name.
-
-
-
-
-```python
-from pymilvus import CollectionSchema, FieldSchema, DataType
-book_id = FieldSchema(
- name="book_id",
- dtype=DataType.INT64,
- is_primary=True,
-)
-book_name = FieldSchema(
- name="book_name",
- dtype=DataType.VARCHAR,
- max_length=200,
-)
-word_count = FieldSchema(
- name="word_count",
- dtype=DataType.INT64,
-)
-book_intro = FieldSchema(
- name="book_intro",
- dtype=DataType.FLOAT_VECTOR,
- dim=2
-)
-schema = CollectionSchema(
- fields=[book_id, book_name, word_count, book_intro],
- description="Test book search"
-)
-collection_name = "book"
-```
-
-```javascript
-const params = {
- collection_name: "book",
- description: "Test book search"
- fields: [
- {
- name: "book_intro",
- description: "",
- data_type: 101, // DataType.FloatVector
- type_params: {
- dim: "2",
- },
- },
- {
- name: "book_id",
- data_type: 5, //DataType.Int64
- is_primary_key: true,
- description: "",
- },
- {
- name: "word_count",
- data_type: 5, //DataType.Int64
- description: "",
- },
- ],
-};
-```
-
-```go
-var (
- collectionName = "book"
- )
-schema := &entity.Schema{
- CollectionName: collectionName,
- Description: "Test book search",
- Fields: []*entity.Field{
- {
- Name: "book_id",
- DataType: entity.FieldTypeInt64,
- PrimaryKey: true,
- AutoID: false,
- },
- {
- Name: "word_count",
- DataType: entity.FieldTypeInt64,
- PrimaryKey: false,
- AutoID: false,
- },
- {
- Name: "book_intro",
- DataType: entity.FieldTypeFloatVector,
- TypeParams: map[string]string{
- "dim": "2",
- },
- },
- },
-}
-```
-
-```java
-FieldType fieldType1 = FieldType.newBuilder()
- .withName("book_id")
- .withDataType(DataType.Int64)
- .withPrimaryKey(true)
- .withAutoID(false)
- .build();
-FieldType fieldType2 = FieldType.newBuilder()
- .withName("word_count")
- .withDataType(DataType.Int64)
- .build();
-FieldType fieldType3 = FieldType.newBuilder()
- .withName("book_intro")
- .withDataType(DataType.FloatVector)
- .withDimension(2)
- .build();
-CreateCollectionParam createCollectionReq = CreateCollectionParam.newBuilder()
- .withCollectionName("book")
- .withDescription("Test book search")
- .withShardsNum(2)
- .addFieldType(fieldType1)
- .addFieldType(fieldType2)
- .addFieldType(fieldType3)
- .build();
-```
-
-```shell
-create collection -c book -f book_id:INT64:book_id -f word_count:INT64:word_count -f book_intro:FLOAT_VECTOR:2 -p book_id
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "schema": {
- "autoID": false,
- "description": "Test book search",
- "fields": [
- {
- "name": "book_id",
- "description": "book id",
- "is_primary_key": true,
- "autoID": false,
- "data_type": 5
- },
- {
- "name": "word_count",
- "description": "count of words",
- "is_primary_key": false,
- "data_type": 5
- },
- {
- "name": "book_intro",
- "description": "embedded vector of book introduction",
- "data_type": 101,
- "is_primary_key": false,
- "type_params": [
- {
- "key": "dim",
- "value": "2"
- }
- ]
- }
- ],
- "name": "book"
- }
- }'
-```
-
-
-Output:
-
-```json
-{}
-```
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- FieldSchema |
- Schema of the fields within the collection to create. Refer to Schema for more information. |
- N/A |
-
-
- name |
- Name of the field to create. |
- N/A |
-
-
- dtype |
- Data type of the field to create. |
- For primary key field:
-
- DataType.INT64 (numpy.int64)
- DataType.VARCHAR (VARCHAR)
-
- For scalar field:
-
- DataType.BOOL (Boolean)
- DataType.INT64 (numpy.int64)
- DataType.FLOAT (numpy.float32)
- DataType.DOUBLE (numpy.double)
-
- For vector field:
-
- BINARY_VECTOR (Binary vector)
- FLOAT_VECTOR (Float vector)
-
- |
-
-
- is_primary (Mandatory for primary key field) |
- Switch to control if the field is primary key field. |
- True or False |
-
-
- auto_id (Mandatory for primary key field) |
- Switch to enable or disable automatic ID (primary key) allocation. |
- True or False |
-
-
- max_length (Mandatory for VARCHAR field) |
- Maximum length of strings allowed to be inserted. |
- [1, 65,535] |
-
-
- dim (Mandatory for vector field) |
- Dimension of the vector. |
- [1, 32,768] |
-
-
- description (Optional) |
- Description of the field. |
- N/A |
-
-
- CollectionSchema |
- Schema of the collection to create. Refer to Schema for more information. |
- N/A |
-
-
- fields |
- Fields of the collection to create. |
- N/A |
-
-
- description (Optional) |
- Description of the collection to create. |
- N/A |
-
-
- collection_name |
- Name of the collection to create. |
- N/A |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- collectionName |
- Name of the collection to create. |
- N/A |
-
-
- description |
- Description of the collection to create. |
- N/A |
-
-
- Fields |
- Schema of the fields within the collection to create. Refer to Schema for more information. |
- N/A |
-
-
- Name |
- Name of the field to create. |
- N/A |
-
-
- DataType |
- Data type of the field to create. |
- For primary key field:
-
- entity.FieldTypeInt64 (numpy.int64)
-
- For scalar field:
-
- entity.FieldTypeBool (Boolean)
- entity.FieldTypeInt64 (numpy.int64)
- entity.FieldTypeFloat (numpy.float32)
- entity.FieldTypeDouble (numpy.double)
-
- For vector field:
-
- entity.FieldTypeBinaryVector (Binary vector)
- entity.FieldTypeFloatVector (Float vector)
-
- |
-
-
- PrimaryKey (Mandatory for primary key field) |
- Switch to control if the field is primary key field. |
- True or False |
-
-
- AutoID (Mandatory for primary key field) |
- Switch to enable or disable Automatic ID (primary key) allocation. |
- True or False |
-
-
- dim (Mandatory for vector field) |
- Dimension of the vector. |
- [1, 32768] |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- collection_name |
- Name of the collection to create. |
- N/A |
-
-
- description |
- Description of the collection to create. |
- N/A |
-
-
- fields |
- Schema of the filed and the collection to create. |
- Refer to Schema for more information. |
-
-
- data_type |
- Data type of the filed to create. |
- Refer to data type reference number for more information. |
-
-
- is_primary (Mandatory for primary key field) |
- Switch to control if the field is primary key field. |
- True or False |
-
-
- auto_id |
- Switch to enable or disable Automatic ID (primary key) allocation. |
- True or False |
-
-
- dim (Mandatory for vector field) |
- Dimension of the vector. |
- [1, 32768] |
-
-
- description (Optional) |
- Description of the field. |
- N/A |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- Name |
- Name of the field to create. |
- N/A |
-
-
- Description |
- Description of the field to create. |
- N/A |
-
-
- DataType |
- Data type of the field to create. |
- For primary key field:
-
- entity.FieldTypeInt64 (numpy.int64)
-
- For scalar field:
-
- entity.FieldTypeBool (Boolean)
- entity.FieldTypeInt64 (numpy.int64)
- entity.FieldTypeFloat (numpy.float32)
- entity.FieldTypeDouble (numpy.double)
-
- For vector field:
-
- entity.FieldTypeBinaryVector (Binary vector)
- entity.FieldTypeFloatVector (Float vector)
-
- |
-
-
- PrimaryKey (Mandatory for primary key field) |
- Switch to control if the field is primary key field. |
- True or False |
-
-
- AutoID |
- Switch to enable or disable Automatic ID (primary key) allocation. |
- True or False |
-
-
- Dimension (Mandatory for vector field) |
- Dimension of the vector. |
- [1, 32768] |
-
-
- CollectionName |
- Name of the collection to create. |
- N/A |
-
-
- Description (Optional) |
- Description of the collection to create. |
- N/A |
-
-
- ShardsNum |
- Number of the shards for the collection to create. |
- [1,64] |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- The name of the collection. |
-
-
- -f (Multiple) |
- The field schema in the <fieldName>:<dataType>:<dimOfVector/desc> format. |
-
-
- -p |
- The name of the primary key field. |
-
-
- -a (Optional) |
- Flag to generate IDs automatically. |
-
-
- -d (Optional) |
- The description of the collection. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- collection_name |
- Name of the collection to create. |
- N/A |
-
-
- name (schema) |
- Must be the same as collection_name , this duplicated field is kept for historical reasons. |
- Same as collection_name |
-
-
- autoID (schema) |
- Switch to enable or disable Automatic ID (primary key) allocation. |
- True or False |
-
-
- description (schema) |
- Description of the collection to create. |
- N/A |
-
-
- fields |
- Schema of the fields within the collection to create. Refer to Schema for more information. |
- N/A |
-
-
- name (field) |
- Name of the field to create. |
- N/A |
-
-
- description (field) |
- Description of the collection to create. |
- N/A |
-
-
- is_primary_key (Mandatory for primary key field) |
- Switch to control if the field is primary key field. |
- True or False |
-
-
- autoID (field)(Mandatory for primary key field) |
- Switch to enable or disable Automatic ID (primary key) allocation. |
- True or False |
-
-
- data_type |
- Data type of the field to create. |
-
- Enums:
- 1: "Bool",
- 2: "Int8",
- 3: "Int16",
- 4: "Int32",
- 5: "Int64",
- 10: "Float",
- 11: "Double",
- 20: "String",
- 21: "VarChar",
- 100: "BinaryVector",
- 101: "FloatVector",
-
- For primary key field:
-
- DataType.INT64 (numpy.int64)
- DataType.VARCHAR (VARCHAR)
-
- For scalar field:
-
- DataType.BOOL (Boolean)
- DataType.INT64 (numpy.int64)
- DataType.FLOAT (numpy.float32)
- DataType.DOUBLE (numpy.double)
-
- For vector field:
-
- BINARY_VECTOR (Binary vector)
- FLOAT_VECTOR (Float vector)
-
- |
-
-
- dim (Mandatory for vector field) |
- Dimension of the vector. |
- [1, 32,768] |
-
-
-
-
-## Create a collection with the schema
-
-Then, create a collection with the schema you specified above.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection(
- name=collection_name,
- schema=schema,
- using='default',
- shards_num=2
- )
-```
-
-```javascript
-await milvusClient.collectionManager.createCollection(params);
-```
-
-```go
-err = milvusClient.CreateCollection(
- context.Background(), // ctx
- schema,
- 2, // shardNum
-)
-if err != nil {
- log.Fatal("failed to create collection:", err.Error())
-}
-```
-
-```java
-milvusClient.createCollection(createCollectionReq);
-```
-
-```shell
-# Follow the previous step.
-```
-
-```curl
-# Follow the previous step.
-```
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- using (optional) |
- By specifying the server alias here, you can choose in which Milvus server you create a collection. |
- N/A |
-
-
- shards_num (optional) |
- Number of the shards for the collection to create. |
- [1,256] |
-
-
- properties: collection.ttl.seconds (optional) |
- Collection time to live (TTL) is the expiration time of a collection. Data in an expired collection will be cleaned up and will not be involved in searches or queries. Specify TTL in the unit of seconds. |
- The value should be 0 or greater. 0 means TTL is disabled. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- ctx |
- Context to control API invocation process. |
- N/A |
-
-
- shardNum |
- Number of the shards for the collection to create. |
- [1,256] |
-
-
-
-
-
-
-## Limits
-|Feature|Maximum limit|
-|---|---|
-|Length of a collection name|255 characters|
-|Number of partitions in a collection|4,096|
-|Number of fields in a collection|64|
-|Number of shards in a collection|256|
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/create_partition.md b/preview/site/en/userGuide/create_partition.md
deleted file mode 100644
index 62a1ba84a..000000000
--- a/preview/site/en/userGuide/create_partition.md
+++ /dev/null
@@ -1,211 +0,0 @@
----
-id: create_partition.md
-related_key: Partition
-summary: Learn how to create a partition in Milvus.
----
-
-# Create a Partition
-
-This topic describes how to create a partition in Milvus.
-
-Milvus allows you to divide the bulk of vector data into a small number of partitions. Search and other operations can then be limited to one partition to improve the performance.
-
-A collection consists of one or more partitions. While creating a new collection, Milvus creates a default partition `_default`. See [Glossary - Partition](glossary.md#Partition) for more information.
-
-The following example builds a partition `novel` in the collection `book`.
-
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.create_partition("novel")
-```
-
-```javascript
-await milvusClient.partitionManager.createPartition({
- collection_name: "book",
- partition_name: "novel",
-});
-```
-
-```go
-err := milvusClient.CreatePartition(
- context.Background(), // ctx
- "book", // CollectionName
- "novel" // partitionName
-)
-if err != nil {
- log.Fatal("failed to create partition:", err.Error())
-}
-```
-
-```java
-milvusClient.createPartition(
- CreatePartitionParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("novel")
- .build()
-);
-```
-
-```shell
-create partition -c book -p novel
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/partition' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "partition_name": "novel"
- }'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name |
- Name of the partition to create. |
-
-
- description (optional) |
- Description of the partition to create. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to create a partition in. |
-
-
- partition_name |
- Name of the partition to create. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to create a partition in. |
-
-
- partitionName |
- Name of the partition to create. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to create a partition in. |
-
-
- PartitionName |
- Name of the partition to create. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- The name of the collection. |
-
-
- -p |
- The partition name. |
-
-
- -d (Optional) |
- The description of the partition. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to create a partition in. |
-
-
- partition_name |
- Name of the partition to create. |
-
-
-
-
-## Limits
-|Feature |Maximum limit|
-|---|---|
-|Number of partitions in a collection|4,096|
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/data-import/import-data.md b/preview/site/en/userGuide/data-import/import-data.md
new file mode 100644
index 000000000..2f43829ef
--- /dev/null
+++ b/preview/site/en/userGuide/data-import/import-data.md
@@ -0,0 +1,256 @@
+---
+id: import-data.md
+order: 1
+title: Import Data
+summary: This page demonstrates the procedure to import the prepared data.
+---
+
+# Import data
+
+This page demonstrates the procedure to import the prepared data.
+
+## Before you start
+
+- You have already prepared your data and placed it into the Milvus bucket.
+
+ If not, you should use **RemoteBulkWriter** to prepare your data first, and ensure that the prepared data has already been transferred to the Milvus bucket on the MinIO instance started along with your Milvus instance. For details, refer to [Prepare Source Data](prepare-source-data.md).
+
+- You have already created a collection with the schema you use to prepare your data. If not, refer to [Manage Collections](manage-collections.md).
+
+
+
+The following code snippet creates a simple collection with the given schema. For more information on parameters, refer to [`create_schema()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_schema.md) and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) in the SDK reference.
+
+
+
+
+
+The following code snippet creates a simple collection with the given schema. For more information on parameters, refer to [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v1/Collection/createCollection.md) in the SDK reference.
+
+
+
+
+
+```python
+client = MilvusClient("http://localhost:19530")
+
+schema = MilvusClient.create_schema(
+ auto_id=False,
+ enable_dynamic_field=True
+)
+
+schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
+schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=768)
+schema.add_field(field_name="scalar_1", datatype=DataType.VARCHAR, max_length=512)
+schema.add_field(field_name="scalar_2", datatype=DataType.INT64)
+
+client.create_collection(
+ collection_name="quick_setup",
+ schema=schema
+)
+```
+
+```java
+import io.milvus.client.MilvusServiceClient;
+import io.milvus.param.ConnectParam;
+import io.milvus.grpc.DataType;
+import io.milvus.param.collection.CollectionSchemaParam;
+import io.milvus.param.collection.CollectionSchemaParam;
+import io.milvus.param.collection.FieldType;
+
+final MilvusServiceClient milvusClient = new MilvusServiceClient(
+ConnectParam.newBuilder()
+ .withUri("localhost:19530")
+ .withToken("root:Milvus")
+ .build()
+);
+
+// Define schema for the target collection
+FieldType id = FieldType.newBuilder()
+ .withName("id")
+ .withDataType(DataType.Int64)
+ .withPrimaryKey(true)
+ .withAutoID(false)
+ .build();
+
+FieldType vector = FieldType.newBuilder()
+ .withName("vector")
+ .withDataType(DataType.FloatVector)
+ .withDimension(768)
+ .build();
+
+FieldType scalar1 = FieldType.newBuilder()
+ .withName("scalar_1")
+ .withDataType(DataType.VarChar)
+ .withMaxLength(512)
+ .build();
+
+FieldType scalar2 = FieldType.newBuilder()
+ .withName("scalar_2")
+ .withDataType(DataType.Int64)
+ .build();
+
+CollectionSchemaParam schema = CollectionSchemaParam.newBuilder()
+ .withEnableDynamicField(true)
+ .addFieldType(id)
+ .addFieldType(vector)
+ .addFieldType(scalar1)
+ .addFieldType(scalar2)
+ .build();
+
+// Create a collection with the given schema
+milvusClient.createCollection(CreateCollectionParam.newBuilder()
+ .withCollectionName("quick_setup")
+ .withSchema(schema)
+ .build()
+);
+```
+
+## Import data
+
+To import the prepared data, you have to create an import job as follows:
+
+```
+export MILVUS_URI="localhost:19530"
+
+curl --request POST "http://${MILVUS_URI}/v2/vectordb/jobs/import/create" \
+--header "Content-Type: application/json" \
+--data-raw '{
+ "files": [
+ [
+ "/8ca44f28-47f7-40ba-9604-98918afe26d1/1.parquet"
+ ],
+ [
+ "/8ca44f28-47f7-40ba-9604-98918afe26d1/2.parquet"
+ ]
+ ],
+ "collectionName": "quick_setup"
+}'
+```
+
+The request body contains two fields:
+
+- `collectionName`
+
+ The name of the target collection.
+
+- `files`
+
+ A list of lists of file paths relative to the root path of the Milvus bucket on the MioIO instance started along with your Milvus instance. Possible sub-lists are as follows:
+
+ - **JSON files**
+
+ If the prepared file is in JSON format, **each sub-list should contain the path to a single prepared JSON file**.
+
+ ```
+ [
+ "/d1782fa1-6b65-4ff3-b05a-43a436342445/1.json"
+ ],
+ ```
+
+ - **Parquet files**
+
+ If the prepared file is in Parquet format, **each sub-list should contain the path to a single prepared parquet file**.
+
+ ```
+ [
+ "/a6fb2d1c-7b1b-427c-a8a3-178944e3b66d/1.parquet"
+ ]
+
+The possible return is as follows:
+
+```
+{
+ "code": 200,
+ "data": {
+ "jobId": "448707763884413158"
+ }
+}
+```
+
+## Check import progress
+
+Once you get an import job ID, you can check the import progress as follows:
+
+```
+export MILVUS_URI="localhost:19530"
+
+curl --request POST "http://${MILVUS_URI}/v2/vectordb/jobs/import/get_progress" \
+--header "Content-Type: application/json" \
+--data-raw '{
+ "jobId": "449839014328146739"
+}'
+```
+
+The possible response is as follows:
+
+```
+{
+ "code": 200,
+ "data": {
+ "collectionName": "quick_setup",
+ "completeTime": "2024-05-18T02:57:13Z",
+ "details": [
+ {
+ "completeTime": "2024-05-18T02:57:11Z",
+ "fileName": "id:449839014328146740 paths:\"/8ca44f28-47f7-40ba-9604-98918afe26d1/1.parquet\" ",
+ "fileSize": 31567874,
+ "importedRows": 100000,
+ "progress": 100,
+ "state": "Completed",
+ "totalRows": 100000
+ },
+ {
+ "completeTime": "2024-05-18T02:57:11Z",
+ "fileName": "id:449839014328146741 paths:\"/8ca44f28-47f7-40ba-9604-98918afe26d1/2.parquet\" ",
+ "fileSize": 31517224,
+ "importedRows": 100000,
+ "progress": 100,
+ "state": "Completed",
+ "totalRows": 200000
+ }
+ ],
+ "fileSize": 63085098,
+ "importedRows": 200000,
+ "jobId": "449839014328146739",
+ "progress": 100,
+ "state": "Completed",
+ "totalRows": 200000
+ }
+}
+```
+
+## List Import Jobs
+
+You can list all import jobs relative to a specific collection as follows:
+
+```
+export MILVUS_URI="localhost:19530"
+
+curl --request POST "http://${MILVUS_URI}/v2/vectordb/jobs/import/list" \
+--header "Content-Type: application/json" \
+--data-raw '{
+ "collectionName": "quick_setup"
+}'
+```
+
+The possible values are as follows:
+
+```
+{
+ "code": 200,
+ "data": {
+ "records": [
+ {
+ "collectionName": "quick_setup",
+ "jobId": "448761313698322011",
+ "progress": 50,
+ "state": "Importing"
+ }
+ ]
+ }
+}
+```
diff --git a/preview/site/en/userGuide/data-import/prepare-source-data.md b/preview/site/en/userGuide/data-import/prepare-source-data.md
new file mode 100644
index 000000000..e1a87c146
--- /dev/null
+++ b/preview/site/en/userGuide/data-import/prepare-source-data.md
@@ -0,0 +1,437 @@
+---
+id: prepare-source-data.md
+order: 0
+title: Prepare Source Data
+summary: This page discusses something you should consider before you start bulk-inserting data into your collection.
+---
+
+# Prepare Source Data
+
+This page discusses something you should consider before you start bulk-inserting data into your collection.
+
+## Before you start
+
+The target collection requires mapping the source data to its schema. The diagram below shows how acceptable source data is mapped to the schema of a target collection.
+
+![Map data to schema](../../../../assets/map-data-to-schema.png)
+
+You should carefully examine your data and design the schema of the target collection accordingly.
+
+Taking the JSON data in the above diagram as an example, there are two entities in the rows list, each row having six fields. The collection schema selectively includes four: **id**, **vector**, **scalar_1**, and **scalar_2**.
+
+There are two more things to consider when designing the schema:
+
+- **Whether to enable AutoID**
+
+ The **id** field serves as the primary field of the collection. To make the primary field automatically increment, you can enable **AutoID** in the schema. In this case, you should exclude the **id** field from each row in the source data.
+
+- **Whether to enable dynamic fields**
+
+ The target collection can also store fields not included in its pre-defined schema if the schema enables dynamic fields. The **$meta** field is a reserved JSON field to hold dynamic fields and their values in key-value pairs. In the above diagram, the fields **dynamic_field_1** and **dynamic_field_2** and the values will be saved as key-value pairs in the **$meta** field.
+
+The following code shows how to set up the schema for the collection illustrated in the above diagram.
+
+
+
+To obtain more information, refer to [`create_schema()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_schema.md) and [`add_field()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/CollectionSchema/add_field.md) in the SDK reference.
+
+
+
+
+
+To obtain more information, refer to [`CollectionSchema`](https://milvus.io/api-reference/java/v2.4.x/v2/CollectionSchema/CollectionSchema.md) in the SDK reference.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient, DataType
+
+# You need to work out a collection schema out of your dataset.
+schema = MilvusClient.create_schema(
+ auto_id=False,
+ enable_dynamic_field=True
+)
+
+schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
+schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=768)
+schema.add_field(field_name="scalar_1", datatype=DataType.VARCHAR, max_length=512)
+schema.add_field(field_name="scalar_2", datatype=DataType.INT64)
+
+schema.verify()
+```
+
+```java
+import io.milvus.grpc.DataType;
+import io.milvus.param.collection.CollectionSchemaParam;
+import io.milvus.param.collection.FieldType;
+
+// Define schema for the target collection
+FieldType id = FieldType.newBuilder()
+ .withName("id")
+ .withDataType(DataType.Int64)
+ .withPrimaryKey(true)
+ .withAutoID(false)
+ .build();
+
+FieldType vector = FieldType.newBuilder()
+ .withName("vector")
+ .withDataType(DataType.FloatVector)
+ .withDimension(768)
+ .build();
+
+FieldType scalar1 = FieldType.newBuilder()
+ .withName("scalar_1")
+ .withDataType(DataType.VarChar)
+ .withMaxLength(512)
+ .build();
+
+FieldType scalar2 = FieldType.newBuilder()
+ .withName("scalar_2")
+ .withDataType(DataType.Int64)
+ .build();
+
+CollectionSchemaParam schema = CollectionSchemaParam.newBuilder()
+ .withEnableDynamicField(true)
+ .addFieldType(id)
+ .addFieldType(vector)
+ .addFieldType(scalar1)
+ .addFieldType(scalar2)
+ .build();
+```
+
+## Set up BulkWriter
+
+**BulkWriter** is a tool designed to convert raw datasets into a format suitable for importing via the RESTful Import API. It offers two types of writers:
+
+- **LocalBulkWriter**: Reads the designated dataset and transforms it into an easy-to-use format.
+- **RemoteBulkWriter**: Performs the same task as the LocalBulkWriter but additionally transfers the converted data files to a specified remote object storage bucket.
+
+**RemoteBulkWriter** differs from **LocalBulkWriter** in that **RemoteBulkWriter** transfers the converted data files to a target object storage bucket.
+
+### Set up LocalBulkWriter
+
+A **LocalBulkWriter** appends rows from the source dataset and commits them to a local file of the specified format.
+
+
+
+```python
+from pymilvus.bulk_writer import LocalBulkWriter, BulkFileType
+# Use `from pymilvus import LocalBulkWriter, BulkFileType`
+# when you use pymilvus earlier than 2.4.2
+
+writer = LocalBulkWriter(
+ schema=schema,
+ local_path='.',
+ segment_size=512 * 1024 * 1024, # Default value
+ file_type=BulkFileType.PARQUET
+)
+```
+
+```java
+import io.milvus.bulkwriter.LocalBulkWriter;
+import io.milvus.bulkwriter.LocalBulkWriterParam;
+import io.milvus.bulkwriter.common.clientenum.BulkFileType;
+
+LocalBulkWriterParam localBulkWriterParam = LocalBulkWriterParam.newBuilder()
+ .withCollectionSchema(schema)
+ .withLocalPath(".")
+ .withChunkSize(512 * 1024 * 1024)
+ .withFileType(BulkFileType.PARQUET)
+ .build();
+
+LocalBulkWriter localBulkWriter = new LocalBulkWriter(localBulkWriterParam);
+```
+
+
+
+When creating a **LocalBulkWriter**, you should:
+
+- Reference the created schema in `schema`.
+- Set `local_path` to the output directory.
+- Set `file_type` to the output file type.
+- If your dataset contains a large number of records, you are advised to segment your data by setting `segment_size` to a proper value.
+
+For details on parameter settings, refer to [LocalBulkWriter](https://milvus.io/api-reference/pymilvus/v2.4.x/DataImport/LocalBulkWriter/LocalBulkWriter.md) in the SDK reference.
+
+
+
+
+
+When creating a **LocalBulkWriter**, you should:
+
+- Reference the created schema in `CollectionSchema()`.
+- Set the output directory in `withLocalPath()`.
+- Set the output file type in `withFileType()`.
+- If your dataset contains a large number of records, you are advised to segment your data by setting `withChunkSize()` to a proper value.
+
+For details on parameter settings, refer to LocalBulkWriter in the SDK reference.
+
+
+
+### Set up RemoteBulkWriter
+
+Instead of committing appended data to a local file, a **RemoteBulkWriter** commits them to a remote bucket. Therefore, you should set up a **ConnectParam** object before creating a **RemoteBulkWriter**.
+
+
+
+
+```python
+from pymilvus.bulk_writer import RemoteBulkWriter
+# Use `from pymilvus import RemoteBulkWriter`
+# when you use pymilvus earlier than 2.4.2
+
+# Third-party constants
+ACCESS_KEY="minioadmin"
+SECRET_KEY="minioadmin"
+BUCKET_NAME="milvus-bucket"
+
+# Connections parameters to access the remote bucket
+conn = RemoteBulkWriter.S3ConnectParam(
+ endpoint="localhost:9000", # the default MinIO service started along with Milvus
+ access_key=ACCESS_KEY,
+ secret_key=SECRET_KEY,
+ bucket_name=BUCKET_NAME,
+ secure=False
+)
+```
+
+```java
+import io.milvus.bulkwriter.common.clientenum.BulkFileType;
+import io.milvus.bulkwriter.connect.S3ConnectParam;
+import io.milvus.bulkwriter.connect.StorageConnectParam;
+
+String ACCESS_KEY = "minioadmin";
+String SECRET_KEY = "minioadmin";
+String BUCKET_NAME = "milvus-bucket";
+
+StorageConnectParam storageConnectParam = S3ConnectParam.newBuilder()
+ .withEndpoint(MINIO_URI)
+ .withAccessKey(ACCESS_KEY)
+ .withSecretKey(SECRET_KEY)
+ .withBucketName(BUCKET_NAME)
+ .build();
+```
+
+Once the connection parameters are ready, you can reference it in the **RemoteBulkWriter** as follows:
+
+
+
+```python
+from pymilvus.bulk_writer import BulkFileType
+# Use `from pymilvus import BulkFileType`
+# when you use pymilvus earlier than 2.4.2
+
+writer = RemoteBulkWriter(
+ schema=schema,
+ remote_path="/",
+ connect_param=conn,
+ file_type=BulkFileType.PARQUET
+)
+```
+
+```java
+import io.milvus.bulkwriter.RemoteBulkWriter;
+import io.milvus.bulkwriter.RemoteBulkWriterParam;
+
+RemoteBulkWriterParam remoteBulkWriterParam = RemoteBulkWriterParam.newBuilder()
+ .withCollectionSchema(schema)
+ .withConnectParam(storageConnectParam)
+ .withChunkSize(512 * 1024 * 1024)
+ .withRemotePath("/")
+ .withFileType(BulkFileType.PARQUET)
+ .build();
+
+RemoteBulkWriter remoteBulkWriter = new RemoteBulkWriter(remoteBulkWriterParam);
+```
+
+
+
+The parameters for creating a **RemoteBulkWriter** are barely the same as those for a **LocalBulkWriter**, except `connect_param`. For details on parameter settings, refer to [RemoteBulkWriter](https://milvus.io/api-reference/pymilvus/v2.4.x/DataImport/RemoteBulkWriter/RemoteBulkWriter.md) and [ConnectParam](https://milvus.io/api-reference/pymilvus/v2.4.x/DataImport/RemoteBulkWriter/S3ConnectParam.md) in the SDK reference.
+
+
+
+
+
+The parameters for creating a **RemoteBulkWriter** are barely the same as those for a **LocalBulkWriter**, except `StorageConnectParam`. For details on parameter settings, refer to RemoteBulkWriter and StorageConnectParam in the SDK reference.
+
+
+
+## Start writing
+
+
+
+A **BulkWriter** has two methods: `append_row()` adds a row from a source dataset, and `commit()` commits added rows to a local file or a remote bucket.
+
+
+
+
+
+A **BulkWriter** has two methods: `appendRow()` adds a row from a source dataset, and `commit()` commits added rows to a local file or a remote bucket.
+
+
+
+For demonstration purposes, the following code appends randomly generated data.
+
+
+
+```python
+import random
+import string
+
+def generate_random_str(length=5):
+ letters = string.ascii_uppercase
+ digits = string.digits
+
+ return ''.join(random.choices(letters + digits, k=length))
+
+for i in range(10000):
+ writer.append_row({
+ "id": i,
+ "vector": [random.uniform(-1, 1) for _ in range(768)],
+ "scalar_1": generate_random_str(random.randint(1, 20)),
+ "scalar_2": random.randint(0, 100)
+ })
+
+writer.commit()
+```
+
+```java
+import com.alibaba.fastjson.JSONObject;
+
+for (int i = 0; i < 10000; i++) {
+ JSONObject json = new JSONObject();
+ json.put("id", i);
+ json.put("vector", get_random_vector(768));
+ json.put("scalar_1", get_random_string(20));
+ json.put("scalar_2", (long) (Math.random() * 100));
+
+ // localBulkWriter.appendRow(json);
+ remoteBulkWriter.appendRow(json);
+}
+
+// localBulkWriter.commit(false);
+remoteBulkWriter.commit(false);
+```
+
+Since the schema defined permits dynamic fields, you can also include non-schema-defined fields in the data to insert as follows.
+
+
+
+```python
+import random
+import string
+
+def generate_random_string(length=5):
+ letters = string.ascii_uppercase
+ digits = string.digits
+
+ return ''.join(random.choices(letters + digits, k=length))
+
+for i in range(10000):
+ writer.append_row({
+ "id": i,
+ "vector":[random.uniform(-1, 1) for _ in range(768)],
+ "scalar_1": generate_random_string(),
+ "scalar_2": random.randint(0, 100),
+ "dynamic_field_1": random.choice([True, False]),
+ "dynamic_field_2": random.randint(0, 100)
+ })
+
+writer.commit()
+```
+
+```java
+for (int i = 0; i < 10000; i++) {
+ JSONObject json = new JSONObject();
+ json.put("id", i);
+ json.put("vector", get_random_vector(768));
+ json.put("scalar_1", get_random_string(20));
+ json.put("scalar_2", (long) (Math.random() * 100));
+ json.put("dynamic_field_1", get_random_boolean());
+ json.put("dynamic_field_2", (long) (Math.random() * 100));
+
+ // localBulkWriter.appendRow(json);
+ remoteBulkWriter.appendRow(json);
+}
+
+// localBulkWriter.commit(false);
+remoteBulkWriter.commit(false);
+```
+
+## Verify the results
+
+
+
+To check the results, you can get the actual output path by printing the `batch_files` property of the writer.
+
+
+
+
+
+To check the results, you can get the actual output path by printing the `getBatchFiles()` method of the writer.
+
+
+
+
+
+```python
+print(writer.batch_files)
+
+# [['d4220a9e-45be-4ccb-8cb5-bf09304b9f23/1.parquet'],
+# ['d4220a9e-45be-4ccb-8cb5-bf09304b9f23/2.parquet']]
+```
+
+```java
+// localBulkWriter.getBatchFiles();
+remoteBulkWriter.getBatchFiles();
+
+//
+
+// Close the BulkWriter
+try {
+ localBulkWriter.close();
+ remoteBulkWriter.close();
+} catch (Exception e) {
+ // TODO: handle exception
+ e.printStackTrace();
+}
+```
+
+**BulkWriter** generates a UUID, creates a sub-folder using the UUID in the provided output directory, and places all generated files in the sub-folder. [Click here](https://assets.zilliz.com/bulk_writer.zip) to download the prepared sample data.
+
+Possible folder structures are as follows:
+
+```bash
+# JSON
+├── folder
+│ └── 45ae1139-1d87-4aff-85f5-0039111f9e6b
+│ └── 1.json
+
+# Parquet
+├── folder
+│ └── 45ae1139-1d87-4aff-85f5-0039111f9e6b
+│ └── 1.parquet
+```
diff --git a/preview/site/en/userGuide/delete_data.md b/preview/site/en/userGuide/delete_data.md
deleted file mode 100644
index e065abcde..000000000
--- a/preview/site/en/userGuide/delete_data.md
+++ /dev/null
@@ -1,242 +0,0 @@
----
-id: delete_data.md
-related_key: delete
-summary: Learn how to delete data in Milvus.
----
-
-# Delete Entities
-
-This topic describes how to delete entities in Milvus.
-
-Milvus supports deleting entities by primary key filtered with boolean expression.
-
-
-
-
- - Deleted entities can still be retrieved immediately after the deletion if the consistency level is set lower than
Strong
.
- - Entities deleted beyond the pre-specified span of time for Time Travel cannot be retrieved again.
- - Frequent deletion operations will impact the system performance.
-
-
-
-
-
-## Prepare boolean expression
-
-Prepare the boolean expression that filters the entities to delete.
-
-Milvus only supports deleting entities with clearly specified primary keys, which can be achieved merely with the term expression `in`. Other operators can be used only in query or scalar filtering in vector search. See [Boolean Expression Rules](boolean.md) for more information.
-
-The following example filters data with primary key values of `0` and `1`.
-
-
-
-
-```python
-expr = "book_id in [0,1]"
-```
-
-```javascript
-const expr = "book_id in [0,1]";
-```
-
-```java
-private static final String DELETE_EXPR = "book_id in [0,1]";
-```
-
-```shell
-delete entities -c book
-The expression to specify entities to be deleted: book_id in [0,1]
-```
-
-```curl
-"expr" = "book_id in [0,1]"
-```
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- The name of the collection. |
-
-
- -p (Optional) |
- The name of the partition that the entities belong to. |
-
-
-
-
-
-## Delete entities
-
-Delete the entities with the boolean expression you created. Milvus returns the ID list of the deleted entities.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.delete(expr)
-```
-
-```javascript
-await milvusClient.dataManager.deleteEntities({
- collection_name: "book",
- expr: expr,
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-milvusClient.delete(
- DeleteParam.newBuilder()
- .withCollectionName("book")
- .withExpr(DELETE_EXPR)
- .build()
-);
-```
-
-```shell
-You are trying to delete the entities of collection. This action cannot be undone!
-Do you want to continue? [y/N]: y
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/entities' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "expr": "book_id in [0,1]"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "IDs":{"IdField":{"IntId":{"data":[0,1]}}},
- "delete_cnt":2,
- "timestamp":434262178115092482
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- expr |
- Boolean expression that specifies the entities to delete. |
-
-
- partition_name (optional) |
- Name of the partition to delete entities from. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to delete entities from. |
-
-
- expr |
- Boolean expression that specifies the entities to delete. |
-
-
- partition_name (optional) |
- Name of the partition to delete entities from. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to delete entities from. |
-
-
- expr |
- Boolean expression that specifies the entities to delete. |
-
-
- PartitionName (optional) |
- Name of the partition to delete entities from. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to delete entities from. |
-
-
- expr |
- Boolean expression that specifies the entities to delete. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/drop_collection.md b/preview/site/en/userGuide/drop_collection.md
deleted file mode 100644
index ee45f4cbe..000000000
--- a/preview/site/en/userGuide/drop_collection.md
+++ /dev/null
@@ -1,177 +0,0 @@
----
-id: drop_collection.md
-related_key: drop collection
-summary: Learn how to drop a collection in Milvus.
----
-
-# Drop a collection
-
-This topic describes how to drop a collection and the data within.
-
-
-Dropping a collection irreversibly deletes all data within it.
-
-
-
-
-
-
-```python
-from pymilvus import utility
-utility.drop_collection("book")
-```
-
-```javascript
-await milvusClient.collectionManager.dropCollection({ collection_name: "book",});
-```
-
-```go
-err = milvusClient.DropCollection(
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("fail to drop collection:", err.Error())
-}
-```
-
-```java
-milvusClient.dropCollection(
- DropCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-delete collection -c book
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/collection' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to drop. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/drop_index.md b/preview/site/en/userGuide/drop_index.md
deleted file mode 100644
index 00c2a2d42..000000000
--- a/preview/site/en/userGuide/drop_index.md
+++ /dev/null
@@ -1,169 +0,0 @@
----
-id: drop_index.md
-related_key: drop index
-summary: Learn how to drop an index in Milvus.
----
-
-# Drop an Index
-
-This topic describes how to drop an index in Milvus.
-
-
-Dropping an index irreversibly removes all corresponding index files.
-
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.drop_index()
-```
-
-```javascript
-await milvusClient.indexManager.dropIndex({
- collection_name: "book",
-});
-```
-
-```go
-err = milvusClient.DropIndex(
- context.Background(), // ctx
- "book", // CollectionName
- "book_intro", // fieldName
-)
-if err != nil {
- log.Fatal("fail to drop index:", err.Error())
-}
-```
-
-```java
-milvusClient.dropIndex(
- DropIndexParam.newBuilder()
- .withCollectionName("book")
- .withFieldName("book_intro")
- .build()
-);
-```
-
-```shell
-delete index -c book
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/index' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "field_name": "book_intro"
- }'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop index from. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to drop index on. |
-
-
- fieldName |
- Name of the vector field to drop index on. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to drop index on. |
-
-
- FieldName |
- Name of the vector field to drop index on. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to drop index from. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop index on. |
-
-
- field_name |
- Name of the vector field to drop index on. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
- - [Search with Time Travel](timetravel.md)
-
diff --git a/preview/site/en/userGuide/drop_partition.md b/preview/site/en/userGuide/drop_partition.md
deleted file mode 100644
index ebd2563c7..000000000
--- a/preview/site/en/userGuide/drop_partition.md
+++ /dev/null
@@ -1,196 +0,0 @@
----
-id: drop_partition.md
-related_key: Partition
-summary: Learn how to drop a partition in Milvus.
----
-
-# Drop Partitions
-
-This topic describes how to drop a partition in a specified collection.
-
-
-
-Dropping a partition irreversibly deletes all data within it.
-
-
-
-
-
-
-```python
-from pymilvus import Collection
-collection.drop_partition("novel")
-```
-
-```javascript
-await milvusClient.partitionManager.dropPartition({
- collection_name: "book",
- partition_name: "novel",
-});
-```
-
-```go
-err := milvusClient.DropPartition(
- context.Background(), // ctx
- "book", // CollectionName
- "novel", // partitionName
-)
-if err != nil {
- log.Fatal("fail to drop partition:", err.Error())
-}
-```
-
-```java
-milvusClient.dropPartition(
- DropPartitionParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("novel")
- .build()
-);
-```
-
-```shell
-delete partition -c book -p novel
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/partition' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "partition_name": "novel"
- }'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name |
- Name of the partition to drop. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop partition from. |
-
-
- partition_name |
- Name of the partition to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to drop a partition in. |
-
-
- partitionName |
- Name of the partition to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to drop a partition in. |
-
-
- PartitionName |
- Name of the partition to drop. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to drop partition from. |
-
-
- -p |
- Name of the partition to drop. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to drop partition from. |
-
-
- partition_name |
- Name of the partition to drop. |
-
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/enable-dynamic-field.md b/preview/site/en/userGuide/enable-dynamic-field.md
new file mode 100644
index 000000000..fb07c6de9
--- /dev/null
+++ b/preview/site/en/userGuide/enable-dynamic-field.md
@@ -0,0 +1,570 @@
+---
+id: enable-dynamic-field.md
+title: Enable Dynamic Field
+---
+
+# Enable Dynamic Field
+
+This page explains how to use the dynamic field in a collection for flexible data insertion and retrieval.
+
+## Overview
+
+Milvus allows you to define the schema of a collection by setting the name and the data type of each specific field so that you can create indexes in these fields for improved search performance.
+
+Once a field is defined, you need to include this field when you insert data. What if some fields are not always present in all your data entries? This is where the dynamic field comes in.
+
+The dynamic field in a collection is a reserved JSON field named $meta. It can hold non-schema-defined fields and their values as key-value pairs. Using the dynamic field, you can search and query both schema-defined fields and any non-schema-defined fields they may have.
+
+## Enable dynamic field
+
+When defining a schema for a collection, you can set `enable_dynamic_field` to `True` to enable the reserved dynamic field, indicating that any non-schema-defined fields and their values inserted later on will be saved as key-value pairs in the reserved dynamic field.
+
+The following snippet creates a collection with two schema-defined fields, namely id and vector, and enables the dynamic field.
+
+
+
+For more information on parameters, refer to [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) in the SDK reference.
+
+
+
+
+
+```python
+import random, time
+from pymilvus import connections, MilvusClient, DataType
+
+SERVER_ADDR = "http://localhost:19530"
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri=SERVER_ADDR
+)
+
+# 2. Create a collection
+schema = MilvusClient.create_schema(
+ auto_id=False,
+ # highlight-next-line
+ enable_dynamic_field=True,
+)
+
+schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
+schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=5)
+
+index_params = MilvusClient.prepare_index_params()
+
+index_params.add_index(
+ field_name="id",
+ index_type="STL_SORT"
+)
+
+index_params.add_index(
+ field_name="vector",
+ index_type="IVF_FLAT",
+ metric_type="L2",
+ params={"nlist": 1024}
+)
+
+client.create_collection(
+ collection_name="test_collection",
+ schema=schema,
+ index_params=index_params
+)
+
+res = client.get_load_state(
+ collection_name="test_collection"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.common.DataType;
+import io.milvus.v2.common.IndexParam;
+import io.milvus.v2.service.collection.request.AddFieldReq;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+import io.milvus.v2.service.collection.request.GetLoadStateReq;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in customized setup mode
+
+// 2.1 Create schema
+CreateCollectionReq.CollectionSchema schema = client.createSchema();
+
+// 2.2 Add fields to schema
+schema.addField(AddFieldReq.builder().fieldName("id").dataType(DataType.Int64).isPrimaryKey(true).autoID(false).build());
+schema.addField(AddFieldReq.builder().fieldName("vector").dataType(DataType.FloatVector).dimension(5).build());
+
+// 2.3 Prepare index parameters
+IndexParam indexParamForIdField = IndexParam.builder()
+ .fieldName("id")
+ .indexType(IndexParam.IndexType.STL_SORT)
+ .build();
+
+IndexParam indexParamForVectorField = IndexParam.builder()
+ .fieldName("vector")
+ .indexType(IndexParam.IndexType.IVF_FLAT)
+ .metricType(IndexParam.MetricType.IP)
+ .extraParams(Map.of("nlist", 1024))
+ .build();
+
+List indexParams = new ArrayList<>();
+indexParams.add(indexParamForIdField);
+indexParams.add(indexParamForVectorField);
+
+// 2.4 Create a collection with schema and index parameters
+CreateCollectionReq customizedSetupReq = CreateCollectionReq.builder()
+ .collectionName("customized_setup")
+ .collectionSchema(schema)
+ .indexParams(indexParams)
+ // highlight-next-line
+ .enableDynamicField(true)
+ .build();
+
+client.createCollection(customizedSetupReq);
+
+Thread.sleep(5000);
+
+// 2.5 Get load state of the collection
+GetLoadStateReq customSetupLoadStateReq1 = GetLoadStateReq.builder()
+ .collectionName("customized_setup")
+ .build();
+
+boolean res = client.getLoadState(customSetupLoadStateReq1);
+
+System.out.println(res);
+
+// Output:
+// true
+```
+
+```javascript
+const { MilvusClient, DataType, sleep } = require("@zilliz/milvus2-sdk-node")
+
+const address = "http://localhost:19530"
+
+async function main() {
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection
+// 2.1 Define fields
+const fields = [
+ {
+ name: "id",
+ data_type: DataType.Int64,
+ is_primary_key: true,
+ auto_id: false
+ },
+ {
+ name: "vector",
+ data_type: DataType.FloatVector,
+ dim: 5
+ },
+]
+
+// 2.2 Prepare index parameters
+const index_params = [{
+ field_name: "id",
+ index_type: "STL_SORT"
+},{
+ field_name: "vector",
+ index_type: "IVF_FLAT",
+ metric_type: "IP",
+ params: { nlist: 1024}
+}]
+
+// 2.3 Create a collection with fields and index parameters
+res = await client.createCollection({
+ collection_name: "test_collection",
+ fields: fields,
+ index_params: index_params,
+ // highlight-next-line
+ enable_dynamic_field: true
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.getLoadState({
+ collection_name: "test_collection",
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+## Insert dynamic data
+
+Once the collection is created, you can start inserting data, including the dynamic data into the collection.
+
+### Prepare data
+
+In this section, you need to prepare some randomly generated data for the insertion later on.
+
+
+
+```python
+colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+data = []
+
+for i in range(1000):
+ current_color = random.choice(colors)
+ current_tag = random.randint(1000, 9999)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": f"{current_color}_{str(current_tag)}"
+ })
+
+print(data[0])
+```
+
+```java
+List colors = Arrays.asList("green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey");
+List data = new ArrayList<>();
+
+for (int i=0; i<1000; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ int current_tag = rand.nextInt(8999) + 1000;
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("tag", current_tag);
+ row.put("color_tag", current_color + "_" + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+System.out.println(JSONObject.toJSON(data.get(0)));
+```
+
+```javascript
+const colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+var data = []
+
+for (let i = 0; i < 1000; i++) {
+ const current_color = colors[Math.floor(Math.random() * colors.length)]
+ const current_tag = Math.floor(Math.random() * 8999 + 1000)
+ data.push({
+ id: i,
+ vector: [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ color: current_color,
+ tag: current_tag,
+ color_tag: `${current_color}_${current_tag}`
+ })
+}
+
+console.log(data[0])
+```
+
+You can view the structure of the generated data by checking its first entry.
+
+```
+{
+ id: 0,
+ vector: [
+ 0.1275656405044483,
+ 0.47417858592773277,
+ 0.13858264437643286,
+ 0.2390904907020377,
+ 0.8447862593689635
+ ],
+ color: 'blue',
+ tag: 2064,
+ color_tag: 'blue_2064'
+}
+```
+
+### Insert data
+
+Then you can safely insert the data into the collection.
+
+
+
+For more information on parameters, refer to [`insert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/insert.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`insert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`insert()`](https://milvus.io/api-reference/node/v2.4.x/Vector/insert.md) in the SDK reference.
+
+
+
+
+
+```python
+res = client.insert(
+ collection_name="test_collection",
+ data=data,
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 1000,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(990 more items hidden)"
+# ]
+# }
+
+time.sleep(5)
+```
+
+```java
+// 3.1 Insert data into the collection
+InsertReq insertReq = InsertReq.builder()
+ .collectionName("customized_setup")
+ .data(data)
+ .build();
+
+InsertResp insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 1000}
+
+Thread.sleep(5000);
+```
+
+```javascript
+res = await client.insert({
+ collection_name: "test_collection",
+ data: data,
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 1000
+//
+
+await sleep(5000)
+```
+
+## Search with dynamic fields
+
+If you have created the collection with the dynamic field enabled and inserted non-schema-defined fields, you can use these fields in the filter expression of a search or a query as follows.
+
+
+
+For more information on parameters, refer to [`search()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/search.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`search()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/search.md) in the SDK reference.
+
+
+
+
+
+For more information on parameters, refer to [`search()`](https://milvus.io/api-reference/node/v2.4.x/Vector/search.md) in the SDK reference.
+
+
+
+
+
+```python
+# 4. Search with dynamic fields
+query_vectors = [[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]]
+
+res = client.search(
+ collection_name="test_collection",
+ data=query_vectors,
+ filter="color in [\"red\", \"green\"]",
+ search_params={"metric_type": "L2", "params": {"nprobe": 10}},
+ limit=3
+)
+
+print(res)
+
+# Output
+#
+# [
+# [
+# {
+# "id": 863,
+# "distance": 0.188413605093956,
+# "entity": {
+# "id": 863,
+# "color_tag": "red_2371"
+# }
+# },
+# {
+# "id": 799,
+# "distance": 0.29188022017478943,
+# "entity": {
+# "id": 799,
+# "color_tag": "red_2235"
+# }
+# },
+# {
+# "id": 564,
+# "distance": 0.3492690920829773,
+# "entity": {
+# "id": 564,
+# "color_tag": "red_9186"
+# }
+# }
+# ]
+# ]
+```
+
+```java
+// 4. Search with non-schema-defined fields
+List> queryVectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+SearchReq searchReq = SearchReq.builder()
+ .collectionName("customized_setup")
+ .data(queryVectors)
+ .filter("$meta[\"color\"] in [\"red\", \"green\"]")
+ .outputFields(List.of("id", "color_tag"))
+ .topK(3)
+ .build();
+
+SearchResp searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+
+// Output:
+// {"searchResults": [[
+// {
+// "distance": 1.3159835,
+// "id": 979,
+// "entity": {
+// "color_tag": "red_7155",
+// "id": 979
+// }
+// },
+// {
+// "distance": 1.0744804,
+// "id": 44,
+// "entity": {
+// "color_tag": "green_8006",
+// "id": 44
+// }
+// },
+// {
+// "distance": 1.0060014,
+// "id": 617,
+// "entity": {
+// "color_tag": "red_4056",
+// "id": 617
+// }
+// }
+// ]]}
+```
+
+```javascript
+// 4. Search with non-schema-defined fields
+const query_vectors = [[0.1, 0.2, 0.3, 0.4, 0.5]]
+
+res = await client.search({
+ collection_name: "test_collection",
+ data: query_vectors,
+ filter: "color in [\"red\", \"green\"]",
+ output_fields: ["color_tag"],
+ limit: 3
+})
+
+console.log(res.results)
+
+// Output
+//
+// [
+// { score: 1.2284551858901978, id: '301', color_tag: 'red_1270' },
+// { score: 1.2195171117782593, id: '205', color_tag: 'red_2780' },
+// { score: 1.2055039405822754, id: '487', color_tag: 'red_6653' }
+// ]
+//
+```
+
+## Recaps
+
+It is worth noting that __color__, __tag__, and __color_tag__ are not present when you define the collection schema, but you can use them as schema-defined fields when you conduct searches and queries.
+
+If the name of a non-schema-defined field contains characters other than digits, letters, and underscores, such as plus signs (+), asterisks (*), or dollar signs ($), you have to include the key within __$meta[]__ as shown in the following code snippet when using it in a boolean expression or including it in the output fields.
+
+```python
+...
+filter='$meta["$key"] in ["a", "b", "c"]',
+output_fields='$meta["$key"]'
+...
+```
diff --git a/preview/site/en/userGuide/import_data.md b/preview/site/en/userGuide/import_data.md
deleted file mode 100644
index ad1e0c8f6..000000000
--- a/preview/site/en/userGuide/import_data.md
+++ /dev/null
@@ -1,191 +0,0 @@
----
-id: import_data.md
-related_key: bulk load
-summary: Learn how to bulk load data in Milvus.
----
-
-# Import Data
-
-This topic describes how to import data in Milvus via bulk load.
-
-Regular method to insert a large batch of entities to Milvus usually leads to a massive network transmission across client, proxy, Pulsar and data nodes. To avoid such situation, Milvus 2.1 supports loading data from files via bulk load. You can import large amounts of data into a collection by just a few lines of code, and endow atomicity to a whole batch of entities.
-
-You can also migrate data to Milvus with [MilvusDM](migrate_overview.md), an open-source tool designed specifically for importing and exporting data with Milvus.
-
-## Prepare data file
-
-You can prepare the data file on row base or column base.
-
-- Row-based data file
-
-A row-based data file is a JSON file containing multiple rows. The root key must be "rows". The file name can be specified arbitrarily.
-
-```json
-{
- "rows":[
- {"book_id": 101, "word_count": 13, "book_intro": [1.1, 1.2]},
- {"book_id": 102, "word_count": 25, "book_intro": [2.1, 2.2]},
- {"book_id": 103, "word_count": 7, "book_intro": [3.1, 3.2]},
- {"book_id": 104, "word_count": 12, "book_intro": [4.1, 4.2]},
- {"book_id": 105, "word_count": 34, "book_intro": [5.1, 5.2]},
- ]
-}
-```
-
-- Column-based data file
-
-A column-based data file can be a JSON file containing multiple columns, several Numpy files, each contains a single column, or a JSON file contains multiple columns and some Numpy files.
-
- - JSON file containing multiple columns
- ```json
- {
- "book_id": [101, 102, 103, 104, 105],
- "word_count": [13, 25, 7, 12, 34],
- "book_intro": [
- [1.1, 1.2],
- [2.1, 2.2],
- [3.1, 3.2],
- [4.1, 4.2],
- [5.1, 5.2]
- ]
- }
- ```
-
- - Numpy files
-
- ```python
- import numpy
- numpy.save('book_id.npy', numpy.array([101, 102, 103, 104, 105]))
- numpy.save('word_count.npy', numpy.array([13, 25, 7, 12, 34]))
- arr = numpy.array([[1.1, 1.2],
- [2.1, 2.2],
- [3.1, 3.2],
- [4.1, 4.2],
- [5.1, 5.2]])
- numpy.save('book_intro.npy', arr)
- ```
-
- - A JSON file contains multiple columns and some Numpy files.
-
- ```json
- {
- "book_id": [101, 102, 103, 104, 105],
- "word_count": [13, 25, 7, 12, 34]
- }
- ```
-
- ```python
- {
- "book_id": [101, 102, 103, 104, 105],
- "word_count": [13, 25, 7, 12, 34]
- }
- ```
-
-## Upload data file
-
-Upload data files to object storage.
-
-You can upload data file to MinIO or local storage (available only in Milvus Standalone).
-
-- Upload to MinIO
-
-upload the data files to the bucket which is defined by [`minio.bucketName`](configure_minio.md#miniobucketName) in the configuration file `milvus.yml`.
-
-- Upload to local storage
-
-copy the data files into the directory which is defined by [`localStorage.path`](configure_localstorage.md#localStoragepath) in the configuration file `milvus.yml`.
-
-
-## Insert data to Milvus
-
-Import the data to the collection.
-
-- For row-based files
-
-```python
-from pymilvus import utility
-tasks = utility.bulk_load(
- collection_name="book",
- is_row_based=True,
- files=["row_based_1.json", "row_based_2.json"]
-)
-```
-
-- For column-based files
-
-```python
-from pymilvus import utility
-tasks = utility.bulk_load(
- collection_name="book",
- is_row_based=False,
- files=["columns.json", "book_intro.npy"]
-)
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to load data into. |
-
-
- is_row_based |
- Boolean value to indicate if the file is row-based. |
-
-
- files |
- List of file names to load into Milvus. |
-
-
- partition_name (optional) |
- Name of the partition to insert data into. |
-
-
-
-
-## Check the import task state
-
-Check the state of the import task.
-
-```python
-state = utility.get_bulk_load_state(tasks[0])
-print(state.state_name())
-print(state.ids())
-print(state.infos())
-```
-The state codes and their corresponding descriptions.
-
-| State code | State | Description |
-| ---------- | ----------------------- | -------------------------------------------------------------- |
-| 0 | BulkLoadPending | Task is in pending list |
-| 1 | BulkLoadFailed | Task failed, get the failed reason with `state.infos["failed_reason"]` |
-| 2 | BulkLoadStarted | Task is dispatched to data node, gonna to be executed |
-| 3 | BulkLoadDownloaded | Data file has been downloaded from MinIO to local |
-| 4 | BulkLoadParsed | Data file has been validated and parsed |
-| 5 | BulkLoadPersisted | New segments have been generated and persisted |
-| 6 | BulkLoadCompleted | Task completed |
-
-
-## Limits
-
-|Feature|Maximum limit|
-|---|---|
-|Max size of task pending list|32|
-|Max size of a data file|4GB|
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-- Explore API references for Milvus SDKs:
- - [PyMilvus API reference](/api-reference/pymilvus/v2.2.2/tutorial.html)
- - [Node.js API reference](/api-reference/node/v2.2.x/tutorial.html)
-
diff --git a/preview/site/en/userGuide/insert-update-delete.md b/preview/site/en/userGuide/insert-update-delete.md
new file mode 100644
index 000000000..10f7b225b
--- /dev/null
+++ b/preview/site/en/userGuide/insert-update-delete.md
@@ -0,0 +1,751 @@
+---
+id: insert-update-delete.md
+summary: This guide walks you through the data manipulation operations within a collection, including insertion, upsertion, and deletion.
+title: Insert, Upsert & Delete
+---
+
+# Insert, Upsert & Delete
+
+This guide walks you through the data manipulation operations within a collection, including insertion, upsertion, and deletion.
+
+## Before you start
+
+- You have installed the SDK of your choice. To install an SDK, refer to [Install SDKs](https://milvus.io/docs/install-pymilvus.md).
+
+- You have created a collection. To create a collection, refer to [Manage Collections](manage-collections.md).
+
+- To insert a large volume of data, you are advised to use [Data Import](https://milvus.io/api-reference/pymilvus/v2.4.x/DataImport/LocalBulkWriter/LocalBulkWriter.md).
+
+## Overview
+
+An entity, within the context of Milvus collections, is a singular, identifiable instance within a collection. It represents a distinct member of a particular class, be it a book in a library, a gene in a genome, or any other identifiable entity.
+
+Entities within a collection share a common set of attributes, termed schema, outlining the structure that each entity must adhere to, including field names, data types, and any other constraints.
+
+Successful insertion of entities into a collection requires that the provided data should contain all the schema-defined fields of the target collection. Additionally, you can also include non-schema-defined fields only if you have enabled the dynamic field. For details, refer to [Enable Dynamic Field](enable-dynamic-field.md).
+
+## Preparations
+
+The code snippet below repurposes the existing code to establish a connection to a Milvus cluster and quickly set up a collection.
+
+
+
+For preparations, use [`MilvusClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) to connect to the Milvus server and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+For preparations, use [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) to connect to the Milvus server and [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+For preparations, use [`MilvusClient`](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) to connect to the Milvus server and [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create a collection
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5,
+ metric_type="IP"
+)
+```
+
+```java
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in quick setup mode
+CreateCollectionReq quickSetupReq = CreateCollectionReq.builder()
+ .collectionName("quick_setup")
+ .dimension(5)
+ .metricType("IP")
+ .build();
+
+client.createCollection(quickSetupReq);
+```
+
+```javascript
+const { MilvusClient, DataType, sleep } = require("@zilliz/milvus2-sdk-node")
+
+const address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection in quick setup mode
+await client.createCollection({
+ collection_name: "quick_setup",
+ dimension: 5,
+ metric_type: "IP"
+});
+```
+
+
+
+
notes
+
+
The collection generated in the above code contains only two fields: id
(as the primary key) and vector
(as the vector field), with auto_id
and enable_dynamic_field
settings enabled by default. When inserting data,
+
+You do not need to include id in the data to be inserted, because the primary field automatically increments as data is inserted.
+Non-schema-defined fields will be saved as key-value pairs in a reserved JSON field named $meta.
+
+
+
+
+## Insert entities
+
+To insert entities, you need to organize the data into a list of dictionaries, where each dictionary represents an entity. Each dictionary contains the keys corresponding to both pre-defined and dynamic fields in the target collection.
+
+
+
+To insert entities into a collection, use the [`insert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/insert.md) method.
+
+
+
+
+
+To insert entities into a collection, use the [`insert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) method.
+
+
+
+
+
+
+To insert entities into a collection, use the [`insert()`](https://milvus.io/api-reference/node/v2.4.x/Vector/insert.md) method.
+
+
+
+
+
+```python
+# 3. Insert some data
+data=[
+ {"id": 0, "vector": [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592], "color": "pink_8682"},
+ {"id": 1, "vector": [0.19886812562848388, 0.06023560599112088, 0.6976963061752597, 0.2614474506242501, 0.838729485096104], "color": "red_7025"},
+ {"id": 2, "vector": [0.43742130801983836, -0.5597502546264526, 0.6457887650909682, 0.7894058910881185, 0.20785793220625592], "color": "orange_6781"},
+ {"id": 3, "vector": [0.3172005263489739, 0.9719044792798428, -0.36981146090600725, -0.4860894583077995, 0.95791889146345], "color": "pink_9298"},
+ {"id": 4, "vector": [0.4452349528804562, -0.8757026943054742, 0.8220779437047674, 0.46406290649483184, 0.30337481143159106], "color": "red_4794"},
+ {"id": 5, "vector": [0.985825131989184, -0.8144651566660419, 0.6299267002202009, 0.1206906911183383, -0.1446277761879955], "color": "yellow_4222"},
+ {"id": 6, "vector": [0.8371977790571115, -0.015764369584852833, -0.31062937026679327, -0.562666951622192, -0.8984947637863987], "color": "red_9392"},
+ {"id": 7, "vector": [-0.33445148015177995, -0.2567135004164067, 0.8987539745369246, 0.9402995886420709, 0.5378064918413052], "color": "grey_8510"},
+ {"id": 8, "vector": [0.39524717779832685, 0.4000257286739164, -0.5890507376891594, -0.8650502298996872, -0.6140360785406336], "color": "white_9381"},
+ {"id": 9, "vector": [0.5718280481994695, 0.24070317428066512, -0.3737913482606834, -0.06726932177492717, -0.6980531615588608], "color": "purple_4976"}
+]
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 10,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9
+# ]
+# }
+```
+
+```java
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import io.milvus.v2.service.vector.request.InsertReq;
+import io.milvus.v2.service.vector.response.InsertResp;
+
+// 3. Insert some data
+List data = Arrays.asList(
+ new JSONObject(Map.of("id", 0L, "vector", Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f), "color", "pink_8682")),
+ new JSONObject(Map.of("id", 1L, "vector", Arrays.asList(0.19886812562848388f, 0.06023560599112088f, 0.6976963061752597f, 0.2614474506242501f, 0.838729485096104f), "color", "red_7025")),
+ new JSONObject(Map.of("id", 2L, "vector", Arrays.asList(0.43742130801983836f, -0.5597502546264526f, 0.6457887650909682f, 0.7894058910881185f, 0.20785793220625592f), "color", "orange_6781")),
+ new JSONObject(Map.of("id", 3L, "vector", Arrays.asList(0.3172005263489739f, 0.9719044792798428f, -0.36981146090600725f, -0.4860894583077995f, 0.95791889146345f), "color", "pink_9298")),
+ new JSONObject(Map.of("id", 4L, "vector", Arrays.asList(0.4452349528804562f, -0.8757026943054742f, 0.8220779437047674f, 0.46406290649483184f, 0.30337481143159106f), "color", "red_4794")),
+ new JSONObject(Map.of("id", 5L, "vector", Arrays.asList(0.985825131989184f, -0.8144651566660419f, 0.6299267002202009f, 0.1206906911183383f, -0.1446277761879955f), "color", "yellow_4222")),
+ new JSONObject(Map.of("id", 6L, "vector", Arrays.asList(0.8371977790571115f, -0.015764369584852833f, -0.31062937026679327f, -0.562666951622192f, -0.8984947637863987f), "color", "red_9392")),
+ new JSONObject(Map.of("id", 7L, "vector", Arrays.asList(-0.33445148015177995f, -0.2567135004164067f, 0.8987539745369246f, 0.9402995886420709f, 0.5378064918413052f), "color", "grey_8510")),
+ new JSONObject(Map.of("id", 8L, "vector", Arrays.asList(0.39524717779832685f, 0.4000257286739164f, -0.5890507376891594f, -0.8650502298996872f, -0.6140360785406336f), "color", "white_9381")),
+ new JSONObject(Map.of("id", 9L, "vector", Arrays.asList(0.5718280481994695f, 0.24070317428066512f, -0.3737913482606834f, -0.06726932177492717f, -0.6980531615588608f), "color", "purple_4976"))
+);
+
+InsertReq insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .build();
+
+InsertResp insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 10}
+```
+
+```javascript
+// 3. Insert some data
+
+var data = [
+ {id: 0, vector: [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592], color: "pink_8682"},
+ {id: 1, vector: [0.19886812562848388, 0.06023560599112088, 0.6976963061752597, 0.2614474506242501, 0.838729485096104], color: "red_7025"},
+ {id: 2, vector: [0.43742130801983836, -0.5597502546264526, 0.6457887650909682, 0.7894058910881185, 0.20785793220625592], color: "orange_6781"},
+ {id: 3, vector: [0.3172005263489739, 0.9719044792798428, -0.36981146090600725, -0.4860894583077995, 0.95791889146345], color: "pink_9298"},
+ {id: 4, vector: [0.4452349528804562, -0.8757026943054742, 0.8220779437047674, 0.46406290649483184, 0.30337481143159106], color: "red_4794"},
+ {id: 5, vector: [0.985825131989184, -0.8144651566660419, 0.6299267002202009, 0.1206906911183383, -0.1446277761879955], color: "yellow_4222"},
+ {id: 6, vector: [0.8371977790571115, -0.015764369584852833, -0.31062937026679327, -0.562666951622192, -0.8984947637863987], color: "red_9392"},
+ {id: 7, vector: [-0.33445148015177995, -0.2567135004164067, 0.8987539745369246, 0.9402995886420709, 0.5378064918413052], color: "grey_8510"},
+ {id: 8, vector: [0.39524717779832685, 0.4000257286739164, -0.5890507376891594, -0.8650502298996872, -0.6140360785406336], color: "white_9381"},
+ {id: 9, vector: [0.5718280481994695, 0.24070317428066512, -0.3737913482606834, -0.06726932177492717, -0.6980531615588608], color: "purple_4976"}
+]
+
+var res = await client.insert({
+ collection_name: "quick_setup",
+ data: data,
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 10
+//
+```
+
+### Insert into partitions
+
+To insert data into a specific partition, you can specify the name of the partition in the insert request as follows:
+
+
+
+```python
+# 4. Insert some more data into a specific partition
+data=[
+ {"id": 10, "vector": [-0.5570353903748935, -0.8997887893201304, -0.7123782431855732, -0.6298990746450119, 0.6699215060604258], "color": "red_1202"},
+ {"id": 11, "vector": [0.6319019033373907, 0.6821488267878275, 0.8552303045704168, 0.36929791364943054, -0.14152860714878068], "color": "blue_4150"},
+ {"id": 12, "vector": [0.9483947484855766, -0.32294203351925344, 0.9759290319978025, 0.8262982148666174, -0.8351194181285713], "color": "orange_4590"},
+ {"id": 13, "vector": [-0.5449109892498731, 0.043511240563786524, -0.25105249484790804, -0.012030655265886425, -0.0010987671273892108], "color": "pink_9619"},
+ {"id": 14, "vector": [0.6603339372951424, -0.10866551787442225, -0.9435597754324891, 0.8230244263466688, -0.7986720938400362], "color": "orange_4863"},
+ {"id": 15, "vector": [-0.8825129181091456, -0.9204557711667729, -0.935350065513425, 0.5484069690287079, 0.24448151140671204], "color": "orange_7984"},
+ {"id": 16, "vector": [0.6285586391568163, 0.5389064528263487, -0.3163366239905099, 0.22036279378888013, 0.15077052220816167], "color": "blue_9010"},
+ {"id": 17, "vector": [-0.20151825016059233, -0.905239387635804, 0.6749305353372479, -0.7324272081377843, -0.33007998971889263], "color": "blue_4521"},
+ {"id": 18, "vector": [0.2432286610792349, 0.01785636564206139, -0.651356982731391, -0.35848148851027895, -0.7387383128324057], "color": "orange_2529"},
+ {"id": 19, "vector": [0.055512329053363674, 0.7100266349039421, 0.4956956543575197, 0.24541352586717702, 0.4209030729923515], "color": "red_9437"}
+]
+
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data,
+ partition_name="partitionA"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 10,
+# "ids": [
+# 10,
+# 11,
+# 12,
+# 13,
+# 14,
+# 15,
+# 16,
+# 17,
+# 18,
+# 19
+# ]
+# }
+```
+
+```java
+// 4. Insert some more data into a specific partition
+data = Arrays.asList(
+ new JSONObject(Map.of("id", 10L, "vector", Arrays.asList(-0.5570353903748935f, -0.8997887893201304f, -0.7123782431855732f, -0.6298990746450119f, 0.6699215060604258f), "color", "red_1202")),
+ new JSONObject(Map.of("id", 11L, "vector", Arrays.asList(0.6319019033373907f, 0.6821488267878275f, 0.8552303045704168f, 0.36929791364943054f, -0.14152860714878068f), "color", "blue_4150")),
+ new JSONObject(Map.of("id", 12L, "vector", Arrays.asList(0.9483947484855766f, -0.32294203351925344f, 0.9759290319978025f, 0.8262982148666174f, -0.8351194181285713f), "color", "orange_4590")),
+ new JSONObject(Map.of("id", 13L, "vector", Arrays.asList(-0.5449109892498731f, 0.043511240563786524f, -0.25105249484790804f, -0.012030655265886425f, -0.0010987671273892108f), "color", "pink_9619")),
+ new JSONObject(Map.of("id", 14L, "vector", Arrays.asList(0.6603339372951424f, -0.10866551787442225f, -0.9435597754324891f, 0.8230244263466688f, -0.7986720938400362f), "color", "orange_4863")),
+ new JSONObject(Map.of("id", 15L, "vector", Arrays.asList(-0.8825129181091456f, -0.9204557711667729f, -0.935350065513425f, 0.5484069690287079f, 0.24448151140671204f), "color", "orange_7984")),
+ new JSONObject(Map.of("id", 16L, "vector", Arrays.asList(0.6285586391568163f, 0.5389064528263487f, -0.3163366239905099f, 0.22036279378888013f, 0.15077052220816167f), "color", "blue_9010")),
+ new JSONObject(Map.of("id", 17L, "vector", Arrays.asList(-0.20151825016059233f, -0.905239387635804f, 0.6749305353372479f, -0.7324272081377843f, -0.33007998971889263f), "color", "blue_4521")),
+ new JSONObject(Map.of("id", 18L, "vector", Arrays.asList(0.2432286610792349f, 0.01785636564206139f, -0.651356982731391f, -0.35848148851027895f, -0.7387383128324057f), "color", "orange_2529")),
+ new JSONObject(Map.of("id", 19L, "vector", Arrays.asList(0.055512329053363674f, 0.7100266349039421f, 0.4956956543575197f, 0.24541352586717702f, 0.4209030729923515f), "color", "red_9437"))
+);
+
+CreatePartitionReq createPartitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+client.createPartition(createPartitionReq);
+
+insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("partitionA")
+ .build();
+
+insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 10}
+```
+
+```javascript
+// 4. Insert some more data into a specific partition
+data = [
+ {id: 10, vector: [-0.5570353903748935, -0.8997887893201304, -0.7123782431855732, -0.6298990746450119, 0.6699215060604258], color: "red_1202"},
+ {id: 11, vector: [0.6319019033373907, 0.6821488267878275, 0.8552303045704168, 0.36929791364943054, -0.14152860714878068], color: "blue_4150"},
+ {id: 12, vector: [0.9483947484855766, -0.32294203351925344, 0.9759290319978025, 0.8262982148666174, -0.8351194181285713], color: "orange_4590"},
+ {id: 13, vector: [-0.5449109892498731, 0.043511240563786524, -0.25105249484790804, -0.012030655265886425, -0.0010987671273892108], color: "pink_9619"},
+ {id: 14, vector: [0.6603339372951424, -0.10866551787442225, -0.9435597754324891, 0.8230244263466688, -0.7986720938400362], color: "orange_4863"},
+ {id: 15, vector: [-0.8825129181091456, -0.9204557711667729, -0.935350065513425, 0.5484069690287079, 0.24448151140671204], color: "orange_7984"},
+ {id: 16, vector: [0.6285586391568163, 0.5389064528263487, -0.3163366239905099, 0.22036279378888013, 0.15077052220816167], color: "blue_9010"},
+ {id: 17, vector: [-0.20151825016059233, -0.905239387635804, 0.6749305353372479, -0.7324272081377843, -0.33007998971889263], color: "blue_4521"},
+ {id: 18, vector: [0.2432286610792349, 0.01785636564206139, -0.651356982731391, -0.35848148851027895, -0.7387383128324057], color: "orange_2529"},
+ {id: 19, vector: [0.055512329053363674, 0.7100266349039421, 0.4956956543575197, 0.24541352586717702, 0.4209030729923515], color: "red_9437"}
+]
+
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: data,
+ partition_name: "partitionA"
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 10
+//
+```
+
+The output is a dictionary containing the statistics on the affected entities. For details on partition operations, refer to [Manage Partitions](manage-partitions.md).
+
+## Upsert entities
+
+Upserting data is a combination of update and insert operations. In Milvus, an upsert operation performs a data-level action to either insert or update an entity based on whether its primary key already exists in a collection. Specifically:
+
+- If the primary key of the entity already exists in the collection, the existing entity will be overwritten.
+
+- If the primary key does not exist in the collection, a new entity will be inserted.
+
+
+
+- Upsert operations will not update the primary keys.
+- Upsert operations does not support collections with autoID
enabled.
+- If you plan to use the upsert
operation instead of insert
for large-scale data ingestion (e.g. millions of vectors), be aware that this can lead to high memory consumption on Milvus data nodes.
+
+
+
+
+
+To upsert entities, use the [`upsert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/upsert.md) method.
+
+
+
+
+
+To upsert entities, use the [`upsert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) method.
+
+
+
+
+
+To upsert entities, use the [`upsert()`](https://milvus.io/api-reference/node/v2.4.x/Vector/upsert.md) method.
+
+
+
+
+
+```python
+# 5. Upsert some data
+data=[
+ {"id": 0, "vector": [-0.619954382375778, 0.4479436794798608, -0.17493894838751745, -0.4248030059917294, -0.8648452746018911], "color": "black_9898"},
+ {"id": 1, "vector": [0.4762662251462588, -0.6942502138717026, -0.4490002642657902, -0.628696575798281, 0.9660395877041965], "color": "red_7319"},
+ {"id": 2, "vector": [-0.8864122635045097, 0.9260170474445351, 0.801326976181461, 0.6383943392381306, 0.7563037341572827], "color": "white_6465"},
+ {"id": 3, "vector": [0.14594326235891586, -0.3775407299900644, -0.3765479013078812, 0.20612075380355122, 0.4902678929632145], "color": "orange_7580"},
+ {"id": 4, "vector": [0.4548498669607359, -0.887610217681605, 0.5655081329910452, 0.19220509387904117, 0.016513983433433577], "color": "red_3314"},
+ {"id": 5, "vector": [0.11755001847051827, -0.7295149788999611, 0.2608115847524266, -0.1719167007897875, 0.7417611743754855], "color": "black_9955"},
+ {"id": 6, "vector": [0.9363032158314308, 0.030699901477745373, 0.8365910312319647, 0.7823840208444011, 0.2625222076909237], "color": "yellow_2461"},
+ {"id": 7, "vector": [0.0754823906014721, -0.6390658668265143, 0.5610517334334937, -0.8986261118798251, 0.9372056764266794], "color": "white_5015"},
+ {"id": 8, "vector": [-0.3038434006935904, 0.1279149203380523, 0.503958664270957, -0.2622661156746988, 0.7407627307791929], "color": "purple_6414"},
+ {"id": 9, "vector": [-0.7125086947677588, -0.8050968321012257, -0.32608864121785786, 0.3255654958645424, 0.26227968923834233], "color": "brown_7231"}
+]
+
+res = client.upsert(
+ collection_name='quick_setup',
+ data=data
+)
+
+print(res)
+
+# Output
+#
+# {
+# "upsert_count": 10
+# }
+```
+
+```java
+// 5. Upsert some data
+data = Arrays.asList(
+ new JSONObject(Map.of("id", 0L, "vector", Arrays.asList(-0.619954382375778f, 0.4479436794798608f, -0.17493894838751745f, -0.4248030059917294f, -0.8648452746018911f), "color", "black_9898")),
+ new JSONObject(Map.of("id", 1L, "vector", Arrays.asList(0.4762662251462588f, -0.6942502138717026f, -0.4490002642657902f, -0.628696575798281f, 0.9660395877041965f), "color", "red_7319")),
+ new JSONObject(Map.of("id", 2L, "vector", Arrays.asList(-0.8864122635045097f, 0.9260170474445351f, 0.801326976181461f, 0.6383943392381306f, 0.7563037341572827f), "color", "white_6465")),
+ new JSONObject(Map.of("id", 3L, "vector", Arrays.asList(0.14594326235891586f, -0.3775407299900644f, -0.3765479013078812f, 0.20612075380355122f, 0.4902678929632145f), "color", "orange_7580")),
+ new JSONObject(Map.of("id", 4L, "vector", Arrays.asList(0.4548498669607359f, -0.887610217681605f, 0.5655081329910452f, 0.19220509387904117f, 0.016513983433433577f), "color", "red_3314")),
+ new JSONObject(Map.of("id", 5L, "vector", Arrays.asList(0.11755001847051827f, -0.7295149788999611f, 0.2608115847524266f, -0.1719167007897875f, 0.7417611743754855f), "color", "black_9955")),
+ new JSONObject(Map.of("id", 6L, "vector", Arrays.asList(0.9363032158314308f, 0.030699901477745373f, 0.8365910312319647f, 0.7823840208444011f, 0.2625222076909237f), "color", "yellow_2461")),
+ new JSONObject(Map.of("id", 7L, "vector", Arrays.asList(0.0754823906014721f, -0.6390658668265143f, 0.5610517334334937f, -0.8986261118798251f, 0.9372056764266794f), "color", "white_5015")),
+ new JSONObject(Map.of("id", 8L, "vector", Arrays.asList(-0.3038434006935904f, 0.1279149203380523f, 0.503958664270957f, -0.2622661156746988f, 0.7407627307791929f), "color", "purple_6414")),
+ new JSONObject(Map.of("id", 9L, "vector", Arrays.asList(-0.7125086947677588f, -0.8050968321012257f, -0.32608864121785786f, 0.3255654958645424f, 0.26227968923834233f), "color", "brown_7231"))
+);
+
+UpsertReq upsertReq = UpsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .build();
+
+UpsertResp upsertResp = client.upsert(upsertReq);
+
+System.out.println(JSONObject.toJSON(upsertResp));
+
+// Output:
+// {"upsertCnt": 10}
+```
+
+```javascript
+// 5. Upsert some data
+data = [
+ {id: 0, vector: [-0.619954382375778, 0.4479436794798608, -0.17493894838751745, -0.4248030059917294, -0.8648452746018911], color: "black_9898"},
+ {id: 1, vector: [0.4762662251462588, -0.6942502138717026, -0.4490002642657902, -0.628696575798281, 0.9660395877041965], color: "red_7319"},
+ {id: 2, vector: [-0.8864122635045097, 0.9260170474445351, 0.801326976181461, 0.6383943392381306, 0.7563037341572827], color: "white_6465"},
+ {id: 3, vector: [0.14594326235891586, -0.3775407299900644, -0.3765479013078812, 0.20612075380355122, 0.4902678929632145], color: "orange_7580"},
+ {id: 4, vector: [0.4548498669607359, -0.887610217681605, 0.5655081329910452, 0.19220509387904117, 0.016513983433433577], color: "red_3314"},
+ {id: 5, vector: [0.11755001847051827, -0.7295149788999611, 0.2608115847524266, -0.1719167007897875, 0.7417611743754855], color: "black_9955"},
+ {id: 6, vector: [0.9363032158314308, 0.030699901477745373, 0.8365910312319647, 0.7823840208444011, 0.2625222076909237], color: "yellow_2461"},
+ {id: 7, vector: [0.0754823906014721, -0.6390658668265143, 0.5610517334334937, -0.8986261118798251, 0.9372056764266794], color: "white_5015"},
+ {id: 8, vector: [-0.3038434006935904, 0.1279149203380523, 0.503958664270957, -0.2622661156746988, 0.7407627307791929], color: "purple_6414"},
+ {id: 9, vector: [-0.7125086947677588, -0.8050968321012257, -0.32608864121785786, 0.3255654958645424, 0.26227968923834233], color: "brown_7231"}
+]
+
+res = await client.upsert({
+ collection_name: "quick_setup",
+ data: data,
+})
+
+console.log(res.upsert_cnt)
+
+// Output
+//
+// 10
+//
+```
+
+### Upsert data in partitions
+
+To upsert data into a specific partition, you can specify the name of the partition in the insert request as follows:
+
+
+
+```python
+# 6. Upsert data in partitions
+data=[
+ {"id": 10, "vector": [0.06998888224297328, 0.8582816610326578, -0.9657938677934292, 0.6527905683627726, -0.8668460657158576], "color": "black_3651"},
+ {"id": 11, "vector": [0.6060703043917468, -0.3765080534566074, -0.7710758854987239, 0.36993888322346136, 0.5507513364206531], "color": "grey_2049"},
+ {"id": 12, "vector": [-0.9041813104515337, -0.9610546012461163, 0.20033003106083358, 0.11842506351635174, 0.8327356724591011], "color": "blue_6168"},
+ {"id": 13, "vector": [0.3202914977909075, -0.7279137773695252, -0.04747830871620273, 0.8266053056909548, 0.8277957187455489], "color": "blue_1672"},
+ {"id": 14, "vector": [0.2975811497890859, 0.2946936202691086, 0.5399463833894609, 0.8385334966677529, -0.4450543984655133], "color": "pink_1601"},
+ {"id": 15, "vector": [-0.04697464305600074, -0.08509022265734134, 0.9067184632552001, -0.2281912685064822, -0.9747503428652762], "color": "yellow_9925"},
+ {"id": 16, "vector": [-0.9363075919673911, -0.8153981031085669, 0.7943039120490902, -0.2093886809842529, 0.0771191335807897], "color": "orange_9872"},
+ {"id": 17, "vector": [-0.050451522820639916, 0.18931572752321935, 0.7522886192190488, -0.9071793089474034, 0.6032647330692296], "color": "red_6450"},
+ {"id": 18, "vector": [-0.9181544231141592, 0.6700755998126806, -0.014174674636136642, 0.6325780463623432, -0.49662222164032976], "color": "purple_7392"},
+ {"id": 19, "vector": [0.11426945899602536, 0.6089190684002581, -0.5842735738352236, 0.057050610092692855, -0.035163433018196244], "color": "pink_4996"}
+]
+
+res = client.upsert(
+ collection_name="quick_setup",
+ data=data,
+ partition_name="partitionA"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "upsert_count": 10
+# }
+```
+
+```java
+import io.milvus.v2.service.vector.request.UpsertReq;
+import io.milvus.v2.service.vector.response.UpsertResp;
+
+// 6. Upsert data in parition
+
+data = Arrays.asList(
+ new JSONObject(Map.of("id", 10L, "vector", Arrays.asList(0.06998888224297328f, 0.8582816610326578f, -0.9657938677934292f, 0.6527905683627726f, -0.8668460657158576f), "color", "black_3651")),
+ new JSONObject(Map.of("id", 11L, "vector", Arrays.asList(0.6060703043917468f, -0.3765080534566074f, -0.7710758854987239f, 0.36993888322346136f, 0.5507513364206531f), "color", "grey_2049")),
+ new JSONObject(Map.of("id", 12L, "vector", Arrays.asList(-0.9041813104515337f, -0.9610546012461163f, 0.20033003106083358f, 0.11842506351635174f, 0.8327356724591011f), "color", "blue_6168")),
+ new JSONObject(Map.of("id", 13L, "vector", Arrays.asList(0.3202914977909075f, -0.7279137773695252f, -0.04747830871620273f, 0.8266053056909548f, 0.8277957187455489f), "color", "blue_1672")),
+ new JSONObject(Map.of("id", 14L, "vector", Arrays.asList(0.2975811497890859f, 0.2946936202691086f, 0.5399463833894609f, 0.8385334966677529f, -0.4450543984655133f), "color", "pink_1601")),
+ new JSONObject(Map.of("id", 15L, "vector", Arrays.asList(-0.04697464305600074f, -0.08509022265734134f, 0.9067184632552001f, -0.2281912685064822f, -0.9747503428652762f), "color", "yellow_9925")),
+ new JSONObject(Map.of("id", 16L, "vector", Arrays.asList(-0.9363075919673911f, -0.8153981031085669f, 0.7943039120490902f, -0.2093886809842529f, 0.0771191335807897f), "color", "orange_9872")),
+ new JSONObject(Map.of("id", 17L, "vector", Arrays.asList(-0.050451522820639916f, 0.18931572752321935f, 0.7522886192190488f, -0.9071793089474034f, 0.6032647330692296f), "color", "red_6450")),
+ new JSONObject(Map.of("id", 18L, "vector", Arrays.asList(-0.9181544231141592f, 0.6700755998126806f, -0.014174674636136642f, 0.6325780463623432f, -0.49662222164032976f), "color", "purple_7392")),
+ new JSONObject(Map.of("id", 19L, "vector", Arrays.asList(0.11426945899602536f, 0.6089190684002581f, -0.5842735738352236f, 0.057050610092692855f, -0.035163433018196244f), "color", "pink_4996"))
+);
+
+upsertReq = UpsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("partitionA")
+ .build();
+
+upsertResp = client.upsert(upsertReq);
+
+System.out.println(JSONObject.toJSON(upsertResp));
+
+// Output:
+// {"upsertCnt": 10}
+```
+
+```javascript
+// 6. Upsert data in partitions
+data = [
+ {id: 10, vector: [0.06998888224297328, 0.8582816610326578, -0.9657938677934292, 0.6527905683627726, -0.8668460657158576], color: "black_3651"},
+ {id: 11, vector: [0.6060703043917468, -0.3765080534566074, -0.7710758854987239, 0.36993888322346136, 0.5507513364206531], color: "grey_2049"},
+ {id: 12, vector: [-0.9041813104515337, -0.9610546012461163, 0.20033003106083358, 0.11842506351635174, 0.8327356724591011], color: "blue_6168"},
+ {id: 13, vector: [0.3202914977909075, -0.7279137773695252, -0.04747830871620273, 0.8266053056909548, 0.8277957187455489], color: "blue_1672"},
+ {id: 14, vector: [0.2975811497890859, 0.2946936202691086, 0.5399463833894609, 0.8385334966677529, -0.4450543984655133], color: "pink_1601"},
+ {id: 15, vector: [-0.04697464305600074, -0.08509022265734134, 0.9067184632552001, -0.2281912685064822, -0.9747503428652762], color: "yellow_9925"},
+ {id: 16, vector: [-0.9363075919673911, -0.8153981031085669, 0.7943039120490902, -0.2093886809842529, 0.0771191335807897], color: "orange_9872"},
+ {id: 17, vector: [-0.050451522820639916, 0.18931572752321935, 0.7522886192190488, -0.9071793089474034, 0.6032647330692296], color: "red_6450"},
+ {id: 18, vector: [-0.9181544231141592, 0.6700755998126806, -0.014174674636136642, 0.6325780463623432, -0.49662222164032976], color: "purple_7392"},
+ {id: 19, vector: [0.11426945899602536, 0.6089190684002581, -0.5842735738352236, 0.057050610092692855, -0.035163433018196244], color: "pink_4996"}
+]
+
+res = await client.upsert({
+ collection_name: "quick_setup",
+ data: data,
+ partition_name: "partitionA"
+})
+
+console.log(res.upsert_cnt)
+
+// Output
+//
+// 10
+//
+```
+
+The output is a dictionary containing the statistics on the affected entities. For details on partition operations, refer to [Manage Partitions](manage-partitions.md).
+
+## Delete entities
+
+
+
+If an entity is no longer needed, you can delete it from the collection by using [`delete()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/delete.md).
+
+
+
+
+
+If an entity is no longer needed, you can delete it from the collection by using [`delete()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/delete.md).
+
+
+
+
+
+If an entity is no longer needed, you can delete it from the collection by using [`delete()`](https://milvus.io/api-reference/node/v2.4.x/Vector/delete.md).
+
+
+
+Milvus offers two ways for you to identify the entities to delete.
+
+- __Delete entities by filter.__
+
+
+
+ ```python
+ # 7. Delete entities
+ res = client.delete(
+ collection_name="quick_setup",
+ filter="id in [4,5,6]"
+ )
+
+ print(res)
+
+ # Output
+ #
+ # {
+ # "delete_count": 3
+ # }
+ ```
+
+ ```java
+ import io.milvus.v2.service.vector.request.DeleteReq;
+ import io.milvus.v2.service.vector.response.DeleteResp;
+
+
+ // 7. Delete entities
+
+ DeleteReq deleteReq = DeleteReq.builder()
+ .collectionName("quick_setup")
+ .filter("id in [4, 5, 6]")
+ .build();
+
+ DeleteResp deleteResp = client.delete(deleteReq);
+
+ System.out.println(JSONObject.toJSON(deleteResp));
+
+ // Output:
+ // {"deleteCnt": 3}
+ ```
+
+ ```javascript
+ // 7. Delete entities
+ res = await client.delete({
+ collection_name: "quick_setup",
+ filter: "id in [4,5,6]"
+ })
+
+ console.log(res.delete_cnt)
+
+ // Output
+ //
+ // 3
+ //
+ ```
+
+- __Delete entities by IDs.__
+
+ The following snippets demonstrate how to delete entities by IDs from a specific partition. It also works if you leave the partition name unspecified.
+
+
+
+ ```python
+ res = client.delete(
+ collection_name="quick_setup",
+ ids=[18, 19],
+ partition_name="partitionA"
+ )
+
+ print(res)
+
+ # Output
+ #
+ # {
+ # "delete_count": 2
+ # }
+ ```
+
+ ```java
+ deleteReq = DeleteReq.builder()
+ .collectionName("quick_setup")
+ .ids(Arrays.asList(18L, 19L))
+ .partitionName("partitionA")
+ .build();
+
+ deleteResp = client.delete(deleteReq);
+
+ System.out.println(JSONObject.toJSON(deleteResp));
+
+ // Output:
+ // {"deleteCnt": 2}
+ ```
+
+ ```javascript
+ res = await client.delete({
+ collection_name: "quick_setup",
+ ids: [18, 19],
+ partition_name: "partitionA"
+ })
+
+ console.log(res.delete_cnt)
+
+ // Output
+ //
+ // 2
+ //
+ ```
+
+For details on how to use filter expressions, refer to [Get & Scalar Query](get-and-scalar-query.md).
diff --git a/preview/site/en/userGuide/insert_data.md b/preview/site/en/userGuide/insert_data.md
deleted file mode 100644
index f668d5f8e..000000000
--- a/preview/site/en/userGuide/insert_data.md
+++ /dev/null
@@ -1,393 +0,0 @@
----
-id: insert_data.md
-related_key: insert
-summary: Learn how to insert data in Milvus.
----
-
-# Insert Entities
-
-This topic describes how to insert data in Milvus via client.
-
-You can also migrate data to Milvus with [MilvusDM](migrate_overview.md), an open-source tool designed specifically for importing and exporting data with Milvus.
-
-Milvus 2.1 supports VARCHAR data type on scalar field. When building indexes for VARCHAR-type scalar fields, the default index type is dictionary tree.
-
-The following example inserts 2,000 rows of randomly generated data as the example data (Milvus CLI example uses a pre-built, remote CSV file containing similar data). Real applications will likely use much higher dimensional vectors than the example. You can prepare your own data to replace the example.
-
-## Prepare data
-
-First, prepare the data to insert. Data type of the data to insert must match the schema of the collection, otherwise Milvus will raise exception.
-
-
-
-
-```python
-import random
-data = [
- [i for i in range(2000)],
- [str(i) for i in range(2000)],
- [i for i in range(10000, 12000)],
- [[random.random() for _ in range(2)] for _ in range(2000)],
-]
-```
-
-```javascript
-const data = Array.from({ length: 2000 }, (v,k) => ({
- "book_id": k,
- "word_count": k+10000,
- "book_intro": Array.from({ length: 2 }, () => Math.random()),
-}));
-```
-
-```go
-bookIDs := make([]int64, 0, 2000)
-wordCounts := make([]int64, 0, 2000)
-bookIntros := make([][]float32, 0, 2000)
-for i := 0; i < 2000; i++ {
- bookIDs = append(bookIDs, int64(i))
- wordCounts = append(wordCounts, int64(i+10000))
- v := make([]float32, 0, 2)
- for j := 0; j < 2; j++ {
- v = append(v, rand.Float32())
- }
- bookIntros = append(bookIntros, v)
-}
-idColumn := entity.NewColumnInt64("book_id", bookIDs)
-wordColumn := entity.NewColumnInt64("word_count", wordCounts)
-introColumn := entity.NewColumnFloatVector("book_intro", 2, bookIntros)
-```
-
-```java
-Random ran = new Random();
-List book_id_array = new ArrayList<>();
-List word_count_array = new ArrayList<>();
-List> book_intro_array = new ArrayList<>();
-for (long i = 0L; i < 2000; ++i) {
- book_id_array.add(i);
- word_count_array.add(i + 10000);
- List vector = new ArrayList<>();
- for (int k = 0; k < 2; ++k) {
- vector.add(ran.nextFloat());
- }
- book_intro_array.add(vector);
-}
-```
-
-```shell
-# Prepare your data in a CSV file. Milvus CLI only supports importing data from local or remote files.
-```
-
-```curl
-# See the following step.
-```
-
-## Insert data to Milvus
-
-Insert the data to the collection.
-
-By specifying `partition_name`, you can optionally decide to which partition to insert the data.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-mr = collection.insert(data)
-```
-
-```javascript
-const mr = await milvusClient.dataManager.insert({
- collection_name: "book",
- fields_data: data,
-});
-```
-
-```go
-_, err = milvusClient.Insert(
- context.Background(), // ctx
- "book", // CollectionName
- "", // partitionName
- idColumn, // columnarData
- wordColumn, // columnarData
- introColumn, // columnarData
-)
-if err != nil {
- log.Fatal("failed to insert data:", err.Error())
-}
-```
-
-```java
-List fields = new ArrayList<>();
-fields.add(new InsertParam.Field("book_id", DataType.Int64, book_id_array));
-fields.add(new InsertParam.Field("word_count", DataType.Int64, word_count_array));
-fields.add(new InsertParam.Field("book_intro", DataType.FloatVector, book_intro_array));
-
-InsertParam insertParam = InsertParam.newBuilder()
- .withCollectionName("book")
- .withPartitionName("novel")
- .withFields(fields)
- .build();
-milvusClient.insert(insertParam);
-```
-
-```shell
-import -c book 'https://raw.githubusercontent.com/milvus-io/milvus_cli/main/examples/user_guide/search.csv'
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/entities' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "fields_data": [
- {
- "field_name": "book_id",
- "type": 5,
- "field": [
- 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
- ]
- },
- {
- "field_name": "word_count",
- "type": 5,
- "field": [
- 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000,18000,19000,20000,21000,22000,23000,24000,25000,26000,27000,28000,29000,30000,31000,32000,33000,34000,35000,36000,37000,38000,39000,40000,41000,42000,43000,44000,45000,46000,47000,48000,49000,50000,51000,52000,53000,54000,55000,56000,57000,58000,59000,60000,61000,62000,63000,64000,65000,66000,67000,68000,69000,70000,71000,72000,73000,74000,75000,76000,77000,78000,79000,80000,81000,82000,83000,84000,85000,86000,87000,88000,89000,90000,91000,92000,93000,94000,95000,96000,97000,98000,99000,100000
- ]
- },
- {
- "field_name": "book_intro",
- "type": 101,
- "field": [
- [1,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[23,1],[24,1],[25,1],[26,1],[27,1],[28,1],[29,1],[30,1],[31,1],[32,1],[33,1],[34,1],[35,1],[36,1],[37,1],[38,1],[39,1],[40,1],[41,1],[42,1],[43,1],[44,1],[45,1],[46,1],[47,1],[48,1],[49,1],[50,1],[51,1],[52,1],[53,1],[54,1],[55,1],[56,1],[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,1],[66,1],[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1],[80,1],[81,1],[82,1],[83,1],[84,1],[85,1],[86,1],[87,1],[88,1],[89,1],[90,1],[91,1],[92,1],[93,1],[94,1],[95,1],[96,1],[97,1],[98,1],[99,1],[100,1]
- ]
- }
- ],
- "num_rows": 100
-}'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "IDs":{
- "IdField":{
- "IntId":{"data":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]
- }
- }
- },
- "succ_index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],
- "insert_cnt":100,
- "timestamp":434262073374408706
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- data |
- Data to insert into Milvus. |
-
-
- partition_name (optional) |
- Name of the partition to insert data into. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to insert data into. |
-
-
- partition_name (optional) |
- Name of the partition to insert data into. |
-
-
- fields_data |
- Data to insert into Milvus. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to insert data into. |
-
-
- partitionName |
- Name of the partition to insert data into. Data will be inserted in the default partition if left blank. |
-
-
- columnarData |
- Data to insert into each field. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- fieldName |
- Name of the field to insert data into. |
-
-
- DataType |
- Data type of the field to insert data into. |
-
-
- data |
- Data to insert into each field. |
-
-
- CollectionName |
- Name of the collection to insert data into. |
-
-
- PartitionName (optional) |
- Name of the partition to insert data into. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to insert data into. |
-
-
- -p (Optional) |
- Name of the partition to insert data into. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Option |
-
-
-
-
- collection_name |
- Name of the collection to insert data into. |
- N/A |
-
-
- fields_data |
- Data to insert into Milvus. |
- N/A |
-
-
- field_name |
- Name of the field to insert data into. |
- N/A |
-
-
- type |
- Data type of the field to insert data into. |
-
- Enums:
- 1: "Bool",
- 2: "Int8",
- 3: "Int16",
- 4: "Int32",
- 5: "Int64",
- 10: "Float",
- 11: "Double",
- 20: "String",
- 21: "VarChar",
- 100: "BinaryVector",
- 101: "FloatVector",
- |
-
-
- field |
- The data of one column to be inserted. |
- N/A |
-
-
- num_rows |
- Number of rows to be inserted. The number should be the same as the length of each field array. |
- N/A |
-
-
-
-
-## Limits
-
-|Feature|Maximum limit|
-|---|---|
-|Dimensions of a vector|32,768|
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/load_balance.md b/preview/site/en/userGuide/load_balance.md
index a7ff98a43..c1011e3b7 100644
--- a/preview/site/en/userGuide/load_balance.md
+++ b/preview/site/en/userGuide/load_balance.md
@@ -2,6 +2,8 @@
id: load_balance.md
related_key: Load balance
summary: Learn how to balance query load in Milvus.
+title: Balance Query Load
+deprecate: true
---
# Balance Query Load
@@ -44,7 +46,7 @@ milvusClient.getQuerySegmentInfo(
```
```javascript
-await dataManager.getQuerySegmentInfo({
+await getQuerySegmentInfo({
collectionName: "book",
});
```
@@ -151,7 +153,7 @@ milvusClient.loadBalance(
```
```javascript
-await dataManager.loadBalance({
+await loadBalance({
src_nodeID: 3,
dst_nodeIDs: [4],
sealed_segmentIDs: [431067441441538050]
@@ -257,9 +259,10 @@ load_balance -s 3 -d 4 -ss 431067441441538050
## What's next
- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
+ - [Insert, Upsert & Delete](insert-update-delete.md)
+ - [Manage Partitions](manage-partitions.md)
+ - [Index Vector Fields](index-vector-fields.md)
+ - [Index Scalar Fields](index-scalar-fields.md)
+ - [Single-vector search](single-vector-search.md)
+ - [Hybrid search](multi-vector-search.md)
diff --git a/preview/site/en/userGuide/load_collection.md b/preview/site/en/userGuide/load_collection.md
deleted file mode 100644
index 36c3e7bc5..000000000
--- a/preview/site/en/userGuide/load_collection.md
+++ /dev/null
@@ -1,226 +0,0 @@
----
-id: load_collection.md
-related_key: load collection
-summary: Learn how to load a collection into memory for CRUD operations in Milvus.
----
-
-# Load a Collection
-
-This topic describes how to load the collection to memory before a search or a query. All search and query operations within Milvus are executed in memory.
-
-Milvus 2.1 allows users to load a collection as multiple replicas to utilize the CPU and memory resources of extra query nodes. This feature boost the overall QPS and throughput without extra hardware. It is supported on PyMilvus in current release.
-
-
-
-- In current release, volume of the data to load must be under 90% of the total memory resources of all query nodes to reserve memory resources for execution engine.
-- In current release, all on-line query nodes will be divided into multiple replica groups according to the replica number specified by user. All replica groups shall have minimal memory resources to load one replica of the provided collection. Otherwise, an error will be returned.
-
-
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load(replica_number=2)
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.LoadCollection(
- context.Background(), // ctx
- "book", // CollectionName
- false // async
-)
-if err != nil {
- log.Fatal("failed to load collection:", err.Error())
-}
-```
-
-```java
-milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-load -c book
-```
-
-``` curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name (optional) |
- Name of the partition to load. |
-
-
- replica_number (optional) |
- Number of the replica to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to load. |
-
-
- async |
- Switch to control sync/async behavior. The deadline of context is not applied in sync load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to load. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to load. |
-
-
- -p (Optional/Multiple) |
- The name of the partition to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to load. |
-
-
-
-
-## Get replica information
-
-You can check the information of the loaded replicas.
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load(replica_number=2) # Load collection as 2 replicas
-result = collection.get_replicas()
-print(result)
-```
-
-Below is an example of the output.
-
-```
-Replica groups:
-- Group: , , , , , Shard: , , ]>
-- Group: , , , , , Shard: , , ]>
-```
-
-## Constraints
-
-- Error will be returned at the attempt to load partition(s) when the parent collection is already loaded. Future releases will support releasing partitions from a loaded collection, and (if needed) then loading some other partition(s).
-- "Load successfully" will be returned at the attempt to load the collection that is already loaded.
-- Error will be returned at the attempt to load the collection when the child partition(s) is/are already loaded. Future releases will support loading the collection when some of its partitions are already loaded.
-- Loading different partitions in a same collection via separate RPCs is not allowed.
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/load_partition.md b/preview/site/en/userGuide/load_partition.md
deleted file mode 100644
index 1814d2585..000000000
--- a/preview/site/en/userGuide/load_partition.md
+++ /dev/null
@@ -1,239 +0,0 @@
----
-id: load_partition.md
-related_key: load partition
-summary: Learn how to load a partition into memory for search or query in Milvus.
----
-
-# Load a Partition
-
-This topic describes how to load a partition to memory. Loading partitions instead of the whole collection to memory can significantly reduce the memory usage. All search and query operations within Milvus are executed in memory.
-
-Milvus 2.1 allows users to load a partition as multiple replicas to utilize the CPU and memory resources of extra query nodes. This feature boost the overall QPS and throughput with extra hardware. It is supported on PyMilvus in current release.
-
-
-
-- In current release, volume of the data to load must be under 90% of the total memory resources of all query nodes to reserve memory resources for execution engine.
-- In current release, all on-line query nodes will be divided into multiple replica groups according to the replica number specified by user. All replica groups shall have minimal memory resources to load one replica of the provided collection. Otherwise, an error will be returned.
-
-
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load(["novel"], replica_number=2)
-
-# Or you can load a partition with the partition as an object
-from pymilvus import Partition
-partition = Partition("novel") # Get an existing partition.
-partition.load(replica_number=2)
-```
-
-```javascript
-await milvusClient.partitionManager.loadPartitions({
- collection_name: "book",
- partition_names: ["novel"],
-});
-```
-
-```go
-err := milvusClient.LoadPartitions(
- context.Background(), // ctx
- "book", // CollectionName
- []string{"novel"}, // partitionNames
- false // async
-)
-if err != nil {
- log.Fatal("failed to load partitions:", err.Error())
-}
-```
-
-```java
-milvusClient.loadPartitions(
- LoadPartitionsParam.newBuilder()
- .withCollectionName("book")
- .withPartitionNames(["novel"])
- .build()
-);
-```
-
-```shell
-load -c book -p novel
-```
-
-``` curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/partitions/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "partition_names": ["novel"],
- "replica_number": 1
- }'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name |
- Name of the partition. |
-
-
- replica_number (optional) |
- Number of the replica to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to load partitions from. |
-
-
- partition_names |
- List of names of the partitions to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to load partitions from. |
-
-
- partitionNames |
- List of names of the partitions to load. |
-
-
- async |
- Switch to control sync/async behavior. The deadline of context is not applied in sync load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to load partitions from. |
-
-
- PartitionNames |
- List of names of the partitions to load. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to load partitions from. |
-
-
- -p (Multiple) |
- The name of the partition to load. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to load partitions from. |
-
-
- partition_names |
- List of names of the partitions to load. |
-
-
- replica_number (optional) |
- Number of the replica to load. |
-
-
-
-
-## Get replica information
-
-You can check the information of the loaded replicas.
-
-```python
-from pymilvus import Partition
-partition = Partition("novel") # Get an existing partition.
-partition.load(replica_number=2) # Load partition as 2 replicas
-result = partition.get_replicas()
-print(result)
-```
-
-
-## Constraints
-
-- Error will be returned at the attempt to load partition(s) when the parent collection is already loaded. Future releases will support releasing partitions from a loaded collection, and (if needed) then loading some other partition(s).
-- "Load successfully" will be returned at the attempt to load the collection that is already loaded.
-- Error will be returned at the attempt to load the collection when the child partition(s) is/are already loaded. Future releases will support loading the collection when some of its partitions are already loaded.
-- Loading different partitions in a same collection via separate RPCs is not allowed.
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/manage-collections.md b/preview/site/en/userGuide/manage-collections.md
new file mode 100644
index 000000000..2d0d68f35
--- /dev/null
+++ b/preview/site/en/userGuide/manage-collections.md
@@ -0,0 +1,2812 @@
+---
+id: manage-collections.md
+title: Manage Collections
+---
+
+# Manage Collections
+
+This guide walks you through creating and managing collections using the SDK of your choice.
+
+## Before you start
+
+- You have installed [Milvus standalone](https://milvus.io/docs/install_standalone-docker.md) or [Milvus cluster](https://milvus.io/docs/install_cluster-milvusoperator.md).
+
+- You have installed preferred SDKs. You can choose among various languages, including [Python](https://milvus.io/docs/install-pymilvus.md), [Java](https://milvus.io/docs/install-java.md), [Go](https://milvus.io/docs/install-go.md), and [Node.js](https://milvus.io/docs/install-node.md).
+
+## Overview
+
+In Milvus, you store your vector embeddings in collections. All vector embeddings within a collection share the same dimensionality and distance metric for measuring similarity.
+
+Milvus collections support dynamic fields (i.e., fields not pre-defined in the schema) and automatic incrementation of primary keys.
+
+To accommodate different preferences, Milvus offers two methods for creating a collection. One provides a quick setup, while the other allows for detailed customization of the collection schema and index parameters.
+
+Additionally, you can view, load, release, and drop a collection when necessary.
+
+## Create Collection
+
+You can create a collection in either of the following manners:
+
+- __Quick setup__
+
+ In this manner, you can create a collection by simply giving it a name and specifying the number of dimensions of the vector embeddings to be stored in this collection. For details, refer to [Quick setup](manage-collections.md).
+
+- __Customized setup__
+
+ Instead of letting In Milvus decide almost everything for your collection, you can determine the __schema__ and __index parameters__ of the collection on your own. For details, refer to [Customized setup](manage-collections.md).
+
+### Quick setup
+
+Against the backdrop of the great leap in the AI industry, most developers just need a simple yet dynamic collection to start with. Milvus allows a quick setup of such a collection with just three arguments:
+
+- Name of the collection to create,
+
+- Dimension of the vector embeddings to insert, and
+
+- Metric type used to measure similarities between vector embeddings.
+
+
+
+For quick setup, use the [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) method of the [`MilvusClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) class to create a collection with the specified name and dimension.
+
+
+
+
+
+For quick setup, use the [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) method of the [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) class to create a collection with the specified name and dimension.
+
+
+
+
+
+For quick setup, use the [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) method of the [`MilvusClient`](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) class to create a collection with the specified name and dimension.
+
+
+
+
+
+For quick setup, use the [`POST /v2/vectordb/collections/create`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md) API endpoint to create a collection with the specified name and dimension.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient, DataType
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create a collection in quick setup mode
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5
+)
+
+res = client.get_load_state(
+ collection_name="quick_setup"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.service.collection.request.GetLoadStateReq;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in quick setup mode
+CreateCollectionReq quickSetupReq = CreateCollectionReq.builder()
+ .collectionName("quick_setup")
+ .dimension(5)
+ .build();
+
+client.createCollection(quickSetupReq);
+
+// Thread.sleep(5000);
+
+GetLoadStateReq quickSetupLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+Boolean res = client.getLoadState(quickSetupLoadStateReq);
+
+System.out.println(res);
+
+// Output:
+// true
+```
+
+```javascript
+address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection in quick setup mode
+let res = await client.createCollection({
+ collection_name: "quick_setup",
+ dimension: 5,
+});
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.getLoadState({
+ collection_name: "quick_setup"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+```shell
+$ export MILVUS_URI="localhost:19530"
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/create" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "quick_setup",
+ "dimension": 5
+}'
+
+# Output
+#
+# {
+# "code": 0,
+# "data": {},
+# }
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "quick_setup"
+}'
+
+# {
+# "code": 0,
+# "data": {
+# "loadProgress": 100,
+# "loadState": "LoadStateLoaded"
+# }
+# }
+```
+
+The collection generated in the above code contains only two fields: `id` (as the primary key) and `vector` (as the vector field), with `auto_id` and `enable_dynamic_field` settings enabled by default.
+
+- `auto_id`
+
+ Enabling this setting ensures that the primary key increments automatically. There's no need for manual provision of primary keys during data insertion.
+
+- `enable_dynamic_field`
+
+ When enabled, all fields, excluding `id` and `vector` in the data to be inserted, are treated as dynamic fields. These additional fields are saved as key-value pairs within a special field named `$meta`. This feature allows the inclusion of extra fields during data insertion.
+
+The automatically indexed and loaded collection from the provided code is ready for immediate data insertions.
+
+### Customized setup
+
+Instead of letting Milvus decide almost everything for your collection, you can determine the __schema__ and __index parameters__ of the collection on your own.
+
+#### Step 1: Set up schema
+
+A schema defines the structure of a collection. Within the schema, you have the option to enable or disable `enable_dynamic_field`, add pre-defined fields, and set attributes for each field. For a detailed explanation of the concept and available data types, refer to [Schema Explained](schema.md).
+
+
+
+To set up a schema, use [`create_schema()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_schema.md) to create a schema object and [`add_field()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/CollectionSchema/add_field.md) to add fields to the schema.
+
+
+
+
+
+To set up a schema, use [`createSchema()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createSchema.md) to create a schema object and [`addField()`](https://milvus.io/api-reference/java/v2.4.x/v2/CollectionSchema/addField.md) to add fields to the schema.
+
+
+
+
+
+To set up a schema, use [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md).
+
+
+
+
+
+To set up a schema, you need to define a JSON object that follows the schema format as displayed on the [`POST /v2/vectordb/collections/create`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md) API endpoint reference page.
+
+
+
+
+
+```python
+# 3. Create a collection in customized setup mode
+
+# 3.1. Create schema
+schema = MilvusClient.create_schema(
+ auto_id=False,
+ enable_dynamic_field=True,
+)
+
+# 3.2. Add fields to schema
+schema.add_field(field_name="my_id", datatype=DataType.INT64, is_primary=True)
+schema.add_field(field_name="my_vector", datatype=DataType.FLOAT_VECTOR, dim=5)
+```
+
+```java
+import io.milvus.v2.common.DataType;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+
+// 3. Create a collection in customized setup mode
+
+// 3.1 Create schema
+CreateCollectionReq.CollectionSchema schema = client.createSchema();
+
+// 3.2 Add fields to schema
+schema.addField(AddFieldReq.builder()
+ .fieldName("my_id")
+ .dataType(DataType.Int64)
+ .isPrimaryKey(true)
+ .autoID(false)
+ .build());
+
+schema.addField(AddFieldReq.builder()
+ .fieldName("my_vector")
+ .dataType(DataType.FloatVector)
+ .dimension(5)
+ .build());
+```
+
+```javascript
+// 3. Create a collection in customized setup mode
+// 3.1 Define fields
+const fields = [
+ {
+ name: "my_id",
+ data_type: DataType.Int64,
+ is_primary_key: true,
+ auto_id: false
+ },
+ {
+ name: "my_vector",
+ data_type: DataType.FloatVector,
+ dim: 5
+ },
+]
+```
+
+```shell
+export fields='[{ \
+ "fieldName": "my_id", \
+ "dataType": "Int64", \
+ "isPrimary": true \
+}, \
+{ \
+ "fieldName": "my_vector", \
+ "dataType": "FloatVector", \
+ "elementTypeParams": { \
+ "dim": 5 \
+ } \
+}]'
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ auto_id |
+ Whether allows the primary field to automatically increment. Setting this to True makes the primary field automatically increment. In this case, the primary field should not be included in the data to insert to avoid errors. |
+
+
+ enable_dynamic_field |
+ Whether allows Milvus saves the values of undefined fields in a dynamic field if the data being inserted into the target collection includes fields that are not defined in the collection's schema. When you set this to True, Milvus will create a field called $meta to store any undefined fields and their values from the data that is inserted. |
+
+
+ field_name |
+ The name of the field. |
+
+
+ datatype |
+ The data type of the field. For a list of available data types, refer to DataType. |
+
+
+ is_primary |
+ Whether the current field is the primary field in a collection. Each collection has only one primary field. A primary field should be of either the DataType.INT64 type or the DataType.VARCHAR type. |
+
+
+ dim |
+ The dimension of the vector embeddings. This is mandatory for a field of the DataType.FLOAT_VECTOR, DataType.BINARY_VECTOR, DataType.FLOAT16_VECTOR, or DataType.BFLOAT16_VECTOR type. If you use DataType.SPARSE_FLOAT_VECTOR, omit this parameter. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ fieldName |
+ The name of the field. |
+
+
+ dataType |
+ The data type of the field. For a list of available data types, refer to DataType. |
+
+
+ isPrimaryKey |
+ Whether the current field is the primary field in a collection. Each collection has only one primary field. A primary field should be of either the DataType.Int64 type or the DataType.VarChar type. |
+
+
+ autoID |
+ Whether allows the primary field to automatically increment. Setting this to true makes the primary field automatically increment. In this case, the primary field should not be included in the data to insert to avoid errors. |
+
+
+ dimension |
+ The dimension of the vector embeddings. This is mandatory for a field of the DataType.FloatVector, DataType.BinaryVector, DataType.Float16Vector, or DataType.BFloat16Vector type. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ name |
+ The name of the field. |
+
+
+ data_type |
+ The data type of the field. For an enumeration of all available data types, refer to DataType. |
+
+
+ is_primary_key |
+ Whether the current field is the primary field in a collection. Each collection has only one primary field. A primary field should be of either the DataType.INT64 type or the DataType.VARCHAR type. |
+
+
+ auto_id |
+ Whether the primary field automatically increments upon data insertions into this collection. The value defaults to False. Setting this to True makes the primary field automatically increment. Skip this parameter if you need to set up a collection with a customized schema. |
+
+
+ dim |
+ The dimensionality of the collection field that holds vector embeddings. The value should be an integer greater than 1 and is usually determined by the model you use to generate vector embeddings. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ fieldName |
+ The name of the field to create in the target collection. |
+
+
+ dataType |
+ The data type of the field values. |
+
+
+ isPrimary |
+ Whether the current field is the primary field. Setting this to True makes the current field the primary field. |
+
+
+ elementTypeParams |
+ Extra field parameters. |
+
+
+ dim |
+ An optional parameter for FloatVector or BinaryVector fields that determines the vector dimension. |
+
+
+
+
+#### Step 2: Set up index parameters
+
+Index parameters dictate how Milvus organizes your data within a collection. You can tailor the indexing process for specific fields by adjusting their `metric_type` and `index_type`. For the vector field, you have the flexibility to select `COSINE`, `L2`, `IP`, `HAMMING`, or `JACCARD` as the `metric_type`, depending on the type of vectors you are working with. For more information, refer to [Similarity Metrics](metric.md).
+
+
+
+To set up index parameters, use [`prepare_index_params()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/prepare_index_params.md) to prepare index parameters and [`add_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/add_index.md) to add the index.
+
+
+
+
+
+To set up index parameters, use [IndexParam](https://milvus.io/api-reference/java/v2.4.x/v2/Management/IndexParam.md).
+
+
+
+
+
+To set up index parameters, use [`createIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/createIndex.md).
+
+
+
+
+
+To set up index parameters, you need to define a JSON object that follows the index parameters format as displayed on the [`POST /v2/vectordb/collections/create`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md) API endpoint reference page.
+
+
+
+
+
+```python
+# 3.3. Prepare index parameters
+index_params = client.prepare_index_params()
+
+# 3.4. Add indexes
+index_params.add_index(
+ field_name="my_id",
+ index_type="STL_SORT"
+)
+
+index_params.add_index(
+ field_name="my_vector",
+ index_type="IVF_FLAT",
+ metric_type="IP",
+ params={ "nlist": 128 }
+)
+```
+
+```java
+import io.milvus.v2.common.IndexParam;
+
+// 3.3 Prepare index parameters
+IndexParam indexParamForIdField = IndexParam.builder()
+ .fieldName("my_id")
+ .indexType(IndexParam.IndexType.STL_SORT)
+ .build();
+
+IndexParam indexParamForVectorField = IndexParam.builder()
+ .fieldName("my_vector")
+ .indexType(IndexParam.IndexType.IVF_FLAT)
+ .metricType(IndexParam.MetricType.L2)
+ .extraParams(Map.of("nlist", 1024))
+ .build();
+
+List indexParams = new ArrayList<>();
+indexParams.add(indexParamForIdField);
+indexParams.add(indexParamForVectorField);
+```
+
+```javascript
+// 3.2 Prepare index parameters
+const index_params = [{
+ field_name: "my_id",
+ index_type: "STL_SORT"
+},{
+ field_name: "my_vector",
+ index_type: "IVF_FLAT",
+ metric_type: "IP",
+ params: { nlist: 1024}
+}]
+```
+
+```shell
+export indexParams='[{ \
+ "fieldName": "my_id", \
+ "indexName": "my_id", \
+ "params": { \
+ "index_type": "SLT_SORT" \
+ } \
+}, { \
+ "fieldName": "my_vector", \
+ "metricType": "COSINE", \
+ "indexName": "my_vector", \
+ "params": { \
+ "index_type": "IVF_FLAT", \
+ "nlist": 1024 \
+ } \
+}]'
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ field_name |
+ The name of the target file to apply this object applies. |
+
+
+ index_type |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ metric_type |
+ The algorithm that is used to measure similarity between vectors. Possible values are IP, L2, COSINE, JACCARD, HAMMING. This is available only when the specified field is a vector field. For more information, refer to Indexes supported in Milvus. |
+
+
+ params |
+ The fine-tuning parameters for the specified index type. For details on possible keys and value ranges, refer to In-memory Index. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ fieldName |
+ The name of the target field to apply this IndexParam object applies. |
+
+
+ indexType |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ metricType |
+ The distance metric to use for the index. Possible values are IP, L2, COSINE, JACCARD, HAMMING. |
+
+
+ extraParams |
+ Extra index parameters. For details, refer to In-memory Index and On-disk Index. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ field_name |
+ The name of the target field on which an index is to be created. |
+
+
+ index_type |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ metric_type |
+ The algorithm that is used to measure similarity between vectors. Possible values are IP, L2, COSINE, JACCARD, HAMMING. This is available only when the specified field is a vector field. For more information, refer to Indexes supported in Milvus. |
+
+
+ params |
+ The fine-tuning parameters for the specified index type. For details on possible keys and value ranges, refer to In-memory Index. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ fieldName |
+ The name of the target field on which an index is to be created. |
+
+
+ indexName |
+ The name of the index to create. The value defaults to the target field name. |
+
+
+ metricType |
+ The algorithm that is used to measure similarity between vectors. Possible values are IP, L2, COSINE, JACCARD, HAMMING. This is available only when the specified field is a vector field. For more information, refer to Indexes supported in Milvus. |
+
+
+ params |
+ The index type and related settings. For details, refer to In-memory Index. |
+
+
+ params.index_type |
+ The type of the index to create. |
+
+
+ params.nlist |
+ The number of cluster units. This applies to IVF-related index types. |
+
+
+
+
+The code snippet above demonstrates how to set up index parameters for the vector field and a scalar field, respectively. For the vector field, set both the metric type and the index type. For a scalar field, set only the index type. It is recommended to create an index for the vector field and any scalar fields that are frequently used for filtering.
+
+#### Step 3: Create the collection
+
+You have the option to create a collection and an index file separately or to create a collection with the index loaded simultaneously upon creation.
+
+
+
+Use [create_collection()](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) to create a collection with the specified schema and index parameters and [get_load_state()](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/get_load_state.md) to check the load state of the collection.
+
+
+
+
+
+Use [createCollection()](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) to create a collection with the specified schema and index parameters and [getLoadState()](https://milvus.io/api-reference/java/v2.4.x/v2/Management/getLoadState.md) to check the load state of the collection.
+
+
+
+
+
+Use [createCollection()](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) to create a collection with the specified schema and index parameters and [getLoadState()](https://milvus.io/api-reference/node/v2.4.x/Management/getLoadState.md) to check the load state of the collection.
+
+
+
+- __Create a collection with the index loaded simultaneously upon creation.__
+
+
+
+ ```python
+ # 3.5. Create a collection with the index loaded simultaneously
+ client.create_collection(
+ collection_name="customized_setup_1",
+ schema=schema,
+ index_params=index_params
+ )
+
+ time.sleep(5)
+
+ res = client.get_load_state(
+ collection_name="customized_setup_1"
+ )
+
+ print(res)
+
+ # Output
+ #
+ # {
+ # "state": ""
+ # }
+ ```
+
+ ```java
+ import io.milvus.v2.service.collection.request.CreateCollectionReq;
+ import io.milvus.v2.service.collection.request.GetLoadStateReq;
+
+ // 3.4 Create a collection with schema and index parameters
+ CreateCollectionReq customizedSetupReq1 = CreateCollectionReq.builder()
+ .collectionName("customized_setup_1")
+ .collectionSchema(schema)
+ .indexParams(indexParams)
+ .build();
+
+ client.createCollection(customizedSetupReq1);
+
+ // Thread.sleep(5000);
+
+ // 3.5 Get load state of the collection
+ GetLoadStateReq customSetupLoadStateReq1 = GetLoadStateReq.builder()
+ .collectionName("customized_setup_1")
+ .build();
+
+ res = client.getLoadState(customSetupLoadStateReq1);
+
+ System.out.println(res);
+
+ // Output:
+ // true
+ ```
+
+ ```javascript
+ // 3.3 Create a collection with fields and index parameters
+ res = await client.createCollection({
+ collection_name: "customized_setup_1",
+ fields: fields,
+ index_params: index_params,
+ })
+
+ console.log(res.error_code)
+
+ // Output
+ //
+ // Success
+ //
+
+ res = await client.getLoadState({
+ collection_name: "customized_setup_1"
+ })
+
+ console.log(res.state)
+
+ // Output
+ //
+ // LoadStateLoaded
+ //
+ ```
+
+ ```shell
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/create" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_1",
+ "schema": {
+ "autoId": false,
+ "enabledDynamicField": false,
+ "fields": [
+ {
+ "fieldName": "my_id",
+ "dataType": "Int64",
+ "isPrimary": true
+ },
+ {
+ "fieldName": "my_vector",
+ "dataType": "FloatVector",
+ "elementTypeParams": {
+ "dim": "5"
+ }
+ }
+ ]
+ },
+ "indexParams": [
+ {
+ "fieldName": "my_vector",
+ "metricType": "COSINE",
+ "indexName": "my_vector",
+ "params": {
+ "index_type": "IVF_FLAT",
+ "nlist": "1024"
+ }
+ },
+ {
+ "fieldName": "my_id",
+ "indexName": "my_id",
+ "params": {
+ "index_type": "STL_SORT"
+ }
+ }
+ ]
+ }'
+
+ # Output
+ #
+ # {
+ # "code": 0,
+ # "data": {},
+ # }
+
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_1"
+ }'
+
+ # {
+ # "code": 0,
+ # "data": {
+ # "loadProgress": 100,
+ # "loadState": "LoadStateLoaded"
+ # }
+ # }
+ ```
+
+ The collection created above is loaded automatically. To learn more about loading and releasing a collection, refer to [Load & Release Collection](manage-collections.md#Load--Release-Collection).
+
+- __Create a collection and an index file separately.__
+
+
+
+ ```python
+ # 3.6. Create a collection and index it separately
+ client.create_collection(
+ collection_name="customized_setup_2",
+ schema=schema,
+ )
+
+ res = client.get_load_state(
+ collection_name="customized_setup_2"
+ )
+
+ print(res)
+
+ # Output
+ #
+ # {
+ # "state": ""
+ # }
+ ```
+
+ ```java
+ // 3.6 Create a collection and index it separately
+ CreateCollectionReq customizedSetupReq2 = CreateCollectionReq.builder()
+ .collectionName("customized_setup_2")
+ .collectionSchema(schema)
+ .build();
+
+ client.createCollection(customizedSetupReq2);
+ ```
+
+ ```javascript
+ // 3.4 Create a collection and index it seperately
+ res = await client.createCollection({
+ collection_name: "customized_setup_2",
+ fields: fields,
+ })
+
+ console.log(res.error_code)
+
+ // Output
+ //
+ // Success
+ //
+
+ res = await client.getLoadState({
+ collection_name: "customized_setup_2"
+ })
+
+ console.log(res.state)
+
+ // Output
+ //
+ // LoadStateNotLoad
+ //
+ ```
+
+ ```shell
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/create" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_2",
+ "schema": {
+ "autoId": false,
+ "enabledDynamicField": false,
+ "fields": [
+ {
+ "fieldName": "my_id",
+ "dataType": "Int64",
+ "isPrimary": true
+ },
+ {
+ "fieldName": "my_vector",
+ "dataType": "FloatVector",
+ "elementTypeParams": {
+ "dim": "5"
+ }
+ }
+ ]
+
+ }
+ }'
+
+ # Output
+ #
+ # {
+ # "code": 0,
+ # "data": {},
+ # }
+
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_2"
+ }'
+
+ # {
+ # "code": 0,
+ # "data": {
+ # "loadState": "LoadStateNotLoaded"
+ # }
+ # }
+ ```
+
+ The collection created above is not loaded automatically. You can create an index for the collection as follows. Creating an index for the collection in a separate manner does not automatically load the collection. For details, refer to [Load & Release Collection](manage-collections.md#Load--Release-Collection).
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection. |
+
+
+ schema |
+ The schema of this collection. Setting this to None indicates this collection will be created with default settings. To set up a collection with a customized schema, you need to create a CollectionSchema object and reference it here. In this case, Milvus ignores all other schema-related settings carried in the request. |
+
+
+ index_params |
+ The parameters for building the index on the vector field in this collection. To set up a collection with a customized schema and automatically load the collection to memory, you need to create an IndexParams object and reference it here. You should at least add an index for the vector field in this collection. You can also skip this parameter if you prefer to set up the index parameters later on. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection. |
+
+
+ collectionSchema |
+ The schema of this collection. Leaving it empty indicates this collection will be created with default settings. To set up a collection with a customized schema, you need to create a CollectionSchema object and reference it here. |
+
+
+ indexParams |
+ The parameters for building the index on the vector field in this collection. To set up a collection with a customized schema and automatically load the collection to memory, create an IndexParams object with a list of IndexParam objects and reference it here. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection. |
+
+
+ fields |
+ The fields in the collection. |
+
+
+ index_params |
+ The index parameters for the collection to create. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection. |
+
+
+ schema |
+ The schema is responsible for organizing data in the target collection. A valid schema should have multiple fields, which must include a primary key, a vector field, and several scalar fields. |
+
+
+ schema.autoID |
+ Whether allows the primary field to automatically increment. Setting this to True makes the primary field automatically increment. In this case, the primary field should not be included in the data to insert to avoid errors. Set this parameter in the field with is_primary set to True. |
+
+
+ schema.enableDynamicField |
+ Whether allows to use the reserved $meta field to hold non-schema-defined fields in key-value pairs. |
+
+
+ fields |
+ A list of field objects. |
+
+
+ fields.fieldName |
+ The name of the field to create in the target collection. |
+
+
+ fields.dataType |
+ The data type of the field values. |
+
+
+ fields.isPrimary |
+ Whether the current field is the primary field. Setting this to True makes the current field the primary field. |
+
+
+ fields.elementTypeParams |
+ Extra field parameters. |
+
+
+ fields.elementTypeParams.dim |
+ An optional parameter for FloatVector or BinaryVector fields that determines the vector dimension. |
+
+
+
+
+ The collection created above is not loaded automatically. You can create an index for the collection as follows. Creating an index for the collection in a separate manner does not automatically load the collection. For details, refer to [Load & Release Collection](manage-collections.md).
+
+
+
+ ```python
+ # 3.6 Create index
+ client.create_index(
+ collection_name="customized_setup_2",
+ index_params=index_params
+ )
+
+ res = client.get_load_state(
+ collection_name="customized_setup_2"
+ )
+
+ print(res)
+
+ # Output
+ #
+ # {
+ # "state": ""
+ # }
+ ```
+
+ ```java
+ CreateIndexReq createIndexReq = CreateIndexReq.builder()
+ .collectionName("customized_setup_2")
+ .indexParams(indexParams)
+ .build();
+
+ client.createIndex(createIndexReq);
+
+ // Thread.sleep(1000);
+
+ // 3.7 Get load state of the collection
+ GetLoadStateReq customSetupLoadStateReq2 = GetLoadStateReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+ res = client.getLoadState(customSetupLoadStateReq2);
+
+ System.out.println(res);
+
+ // Output:
+ // false
+ ```
+
+ ```javascript
+ // 3.5 Create index
+ res = await client.createIndex({
+ collection_name: "customized_setup_2",
+ field_name: "my_vector",
+ index_type: "IVF_FLAT",
+ metric_type: "IP",
+ params: { nlist: 1024}
+ })
+
+ res = await client.getLoadState({
+ collection_name: "customized_setup_2"
+ })
+
+ console.log(res.state)
+
+ // Output
+ //
+ // LoadStateNotLoad
+ //
+ ```
+
+ ```shell
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/indexes/create" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_2",
+ "indexParams": [
+ {
+ "metricType": "L2",
+ "fieldName": "my_vector",
+ "indexName": "my_vector",
+ "indexConfig": {
+ "index_type": "IVF_FLAT",
+ "nlist": "1024"
+ }
+ }
+ ]
+ }'
+
+ # Output
+ #
+ # {
+ # "code": 0,
+ # "data": {},
+ # }
+
+ $ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "collectionName": "customized_setup_2"
+ }'
+
+ # {
+ # "code": 0,
+ # "data": {
+ # "loadState": "LoadStateNotLoaded"
+ # }
+ # }
+ ```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection. |
+
+
+ index_params |
+ An IndexParams object containing a list of IndexParam objects. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection. |
+
+
+ indexParams |
+ A list of IndexParam objects. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection. |
+
+
+ field_name |
+ The name of the field in which to create an index. |
+
+
+ index_type |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ metric_type |
+ The algorithm that is used to measure similarity between vectors. Possible values are IP, L2, COSINE, JACCARD, HAMMING. This is available only when the specified field is a vector field. For more information, refer to Indexes supported in Milvus. |
+
+
+ params |
+ The fine-tuning parameters for the specified index type. For details on possible keys and value ranges, refer to In-memory Index. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection. |
+
+
+ indexParams |
+ The index parameters for the collection to create. |
+
+
+ indexParams.metricType |
+ The similarity metric type used to build the index. The value defaults to COSINE. |
+
+
+ indexParams.fieldName |
+ The name of the target field on which an index is to be created. |
+
+
+ indexParams.indexName |
+ The name of the index to create, the value defaults to the target field name. |
+
+
+ indexParams.indexConfig.index_type |
+ The type of the index to create. |
+
+
+ indexParams.indexConfig.nlist |
+ The number of cluster units. This applies to IVF-related index types. |
+
+
+
+
+## View Collections
+
+
+
+To check the details of an existing collection, use [describe_collection()](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/describe_collection.md).
+
+
+
+
+
+To check the details of an existing collection, use [describeCollection()](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/describeCollection.md).
+
+
+
+
+
+To check the details of an existing collection, use [describeCollection()](https://milvus.io/api-reference/node/v2.4.x/Collections/describeCollection.md).
+
+
+
+
+
+To view the definition of a collection, you can use the [`POST /v2/vectordb/collections/describe`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Describe.md) and the [`POST /v2/vectordb/collections/list`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/List.md) API endpoints.
+
+
+
+
+
+```python
+# 5. View Collections
+res = client.describe_collection(
+ collection_name="customized_setup_2"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "collection_name": "customized_setup_2",
+# "auto_id": false,
+# "num_shards": 1,
+# "description": "",
+# "fields": [
+# {
+# "field_id": 100,
+# "name": "my_id",
+# "description": "",
+# "type": 5,
+# "params": {},
+# "element_type": 0,
+# "is_primary": true
+# },
+# {
+# "field_id": 101,
+# "name": "my_vector",
+# "description": "",
+# "type": 101,
+# "params": {
+# "dim": 5
+# },
+# "element_type": 0
+# }
+# ],
+# "aliases": [],
+# "collection_id": 448143479230158446,
+# "consistency_level": 2,
+# "properties": {},
+# "num_partitions": 1,
+# "enable_dynamic_field": true
+# }
+
+```
+
+```java
+import io.milvus.v2.service.collection.request.DescribeCollectionReq;
+import io.milvus.v2.service.collection.response.DescribeCollectionResp;
+
+// 4. View collections
+DescribeCollectionReq describeCollectionReq = DescribeCollectionReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+DescribeCollectionResp describeCollectionRes = client.describeCollection(describeCollectionReq);
+
+System.out.println(JSONObject.toJSON(describeCollectionRes));
+
+// Output:
+// {
+// "createTime": 449005822816026627,
+// "collectionSchema": {"fieldSchemaList": [
+// {
+// "autoID": false,
+// "dataType": "Int64",
+// "name": "my_id",
+// "description": "",
+// "isPrimaryKey": true,
+// "maxLength": 65535,
+// "isPartitionKey": false
+// },
+// {
+// "autoID": false,
+// "dataType": "FloatVector",
+// "name": "my_vector",
+// "description": "",
+// "isPrimaryKey": false,
+// "dimension": 5,
+// "maxLength": 65535,
+// "isPartitionKey": false
+// }
+// ]},
+// "vectorFieldName": ["my_vector"],
+// "autoID": false,
+// "fieldNames": [
+// "my_id",
+// "my_vector"
+// ],
+// "description": "",
+// "numOfPartitions": 1,
+// "primaryFieldName": "my_id",
+// "enableDynamicField": true,
+// "collectionName": "customized_setup_2"
+// }
+```
+
+```javascript
+// 5. View Collections
+res = await client.describeCollection({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res)
+
+// Output
+//
+// {
+// virtual_channel_names: [ 'by-dev-rootcoord-dml_13_449007919953017716v0' ],
+// physical_channel_names: [ 'by-dev-rootcoord-dml_13' ],
+// aliases: [],
+// start_positions: [],
+// properties: [],
+// status: {
+// extra_info: {},
+// error_code: 'Success',
+// reason: '',
+// code: 0,
+// retriable: false,
+// detail: ''
+// },
+// schema: {
+// fields: [ [Object], [Object] ],
+// properties: [],
+// name: 'customized_setup_2',
+// description: '',
+// autoID: false,
+// enable_dynamic_field: false
+// },
+// collectionID: '449007919953017716',
+// created_timestamp: '449024569603784707',
+// created_utc_timestamp: '1712892797866',
+// shards_num: 1,
+// consistency_level: 'Bounded',
+// collection_name: 'customized_setup_2',
+// db_name: 'default',
+// num_partitions: '1'
+// }
+//
+```
+
+```shell
+curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/describe" \
+-H "Content-Type: application/json" \
+-d '{
+ "dbName": "default",
+ "collectionName": "test_collection"
+}'
+
+# {
+# "code": 0,
+# "data": {
+# "aliases": [],
+# "autoId": false,
+# "collectionID": 448707763883002014,
+# "collectionName": "test_collection",
+# "consistencyLevel": "Bounded",
+# "description": "",
+# "enableDynamicField": true,
+# "fields": [
+# {
+# "autoId": false,
+# "description": "",
+# "id": 100,
+# "name": "id",
+# "partitionKey": false,
+# "primaryKey": true,
+# "type": "Int64"
+# },
+# {
+# "autoId": false,
+# "description": "",
+# "id": 101,
+# "name": "vector",
+# "params": [
+# {
+# "key": "dim",
+# "value": "5"
+# }
+# ],
+# "partitionKey": false,
+# "primaryKey": false,
+# "type": "FloatVector"
+# }
+# ],
+# "indexes": [
+# {
+# "fieldName": "vector",
+# "indexName": "vector",
+# "metricType": "COSINE"
+# }
+# ],
+# "load": "LoadStateLoaded",
+# "partitionsNum": 1,
+# "properties": [],
+# "shardsNum": 1
+# }
+# }
+```
+
+To list all existing collections, you can do as follows:
+
+
+
+```python
+# 6. List all collection names
+res = client.list_collections()
+
+print(res)
+
+# Output
+#
+# [
+# "customized_setup_2",
+# "quick_setup",
+# "customized_setup_1"
+# ]
+```
+
+```java
+import io.milvus.v2.service.collection.response.ListCollectionsResp;
+
+// 5. List all collection names
+ListCollectionsResp listCollectionsRes = client.listCollections();
+
+System.out.println(listCollectionsRes.getCollectionNames());
+
+// Output:
+// [
+// "customized_setup_2",
+// "quick_setup",
+// "customized_setup_1"
+// ]
+```
+
+```javascript
+// 5. List all collection names
+ListCollectionsResp listCollectionsRes = client.listCollections();
+
+System.out.println(listCollectionsRes.getCollectionNames());
+
+// Output:
+// [
+// "customized_setup_1",
+// "quick_setup",
+// "customized_setup_2"
+// ]
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/list" \
+-H "Content-Type: application/json" \
+-d '{
+ "dbName": "default"
+}'
+
+# {
+# "code": 0,
+# "data": [
+# "quick_setup",
+# "customized_setup_1",
+# "customized_setup_2"
+# ]
+# }
+```
+
+## Load & Release Collection
+
+During the loading process of a collection, Milvus loads the collection's index file into memory. Conversely, when releasing a collection, Milvus unloads the index file from memory. Before conducting searches in a collection, ensure that the collection is loaded.
+
+### Load a collection
+
+
+
+To load a collection, use the [`load_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/load_collection.md) method, specifying the collection name. You can also set `replica_number` to determine how many in-memory replicas of data segments to create on query nodes when the collection is loaded.
+
+- Milvus Standalone: The maximum allowed value for `replica_number` is 1.
+- Milvus Cluster: The maximum value should not exceed the `queryNode.replicas` set in your Milvus configurations. For additional details, refer to [Query Node-related Configurations](https://milvus.io/docs/configure_querynode.md#Query-Node-related-Configurations).
+
+
+
+
+
+To load a collection, use the [`loadCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/loadCollection.md) method, specifying the collection name.
+
+
+
+
+
+To load a collection, use the [`loadCollection()`](https://milvus.io/api-reference/node/v2.4.x/Management/loadCollection.md) method, specifying the collection name.
+
+
+
+
+
+To load a collection, you can use the [`POST /v2/vectordb/collections/load`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Load.md) and the [`POST /v2/vectordb/collections/get_load_state`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/GetLoadState.md) API endpoints.
+
+
+
+
+
+```python
+# 7. Load the collection
+client.load_collection(
+ collection_name="customized_setup_2",
+ replica_number=1 # Number of replicas to create on query nodes. Max value is 1 for Milvus Standalone, and no greater than `queryNode.replicas` for Milvus Cluster.
+)
+
+res = client.get_load_state(
+ collection_name="customized_setup_2"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+import io.milvus.v2.service.collection.request.LoadCollectionReq;
+
+// 6. Load the collection
+LoadCollectionReq loadCollectionReq = LoadCollectionReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+client.loadCollection(loadCollectionReq);
+
+// Thread.sleep(5000);
+
+// 7. Get load state of the collection
+GetLoadStateReq loadStateReq = GetLoadStateReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+res = client.getLoadState(loadStateReq);
+
+System.out.println(res);
+
+// Output:
+// true
+```
+
+```javascript
+// 7. Load the collection
+res = await client.loadCollection({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+await sleep(3000)
+
+res = await client.getLoadState({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/load" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+# Output
+#
+# {
+# "code": 0,
+# "data": {},
+# }
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+# {
+# "code": 0,
+# "data": {
+# "loadProgress": 100,
+# "loadState": "LoadStateLoaded"
+# }
+# }
+```
+
+### Release a collection
+
+
+
+To release a collection, use the [`release_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/release_collection.md) method, specifying the collection name.
+
+
+
+
+
+To release a collection, use the [`releaseCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/releaseCollection.md) method, specifying the collection name.
+
+
+
+
+
+To release a collection, use the [`releaseCollection()`](https://milvus.io/api-reference/node/v2.4.x/Management/releaseCollection.md) method, specifying the collection name.
+
+
+
+
+
+To release a collection, you can use the [`POST /v2/vectordb/collections/release`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Release.md) and the [`POST /v2/vectordb/collections/get_load_state`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/GetLoadState.md) API endpoints.
+
+
+
+
+
+```python
+# 8. Release the collection
+client.release_collection(
+ collection_name="customized_setup_2"
+)
+
+res = client.get_load_state(
+ collection_name="customized_setup_2"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+import io.milvus.v2.service.collection.request.ReleaseCollectionReq;
+
+// 8. Release the collection
+ReleaseCollectionReq releaseCollectionReq = ReleaseCollectionReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+client.releaseCollection(releaseCollectionReq);
+
+// Thread.sleep(1000);
+
+res = client.getLoadState(loadStateReq);
+
+System.out.println(res);
+
+// Output:
+// false
+```
+
+```javascript
+// 8. Release the collection
+res = await client.releaseCollection({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.getLoadState({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateNotLoad
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/release" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+# Output
+#
+# {
+# "code": 0,
+# "data": {},
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/get_load_state" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+
+# {
+# "code": 0,
+# "data": {
+# "loadState": "LoadStateNotLoad"
+# }
+# }
+```
+
+## Set up aliases
+
+You can assign aliases for collections to make them more meaningful in a specific context. You can assign multiple aliases for a collection, but multiple collections cannot share an alias.
+
+### Create aliases
+
+
+
+To create aliases, use the [`create_alias()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_alias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To create aliases, use the [`createAlias()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createAlias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To create aliases, use the [`createAlias()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createAlias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To create aliases for a collection, you can use the [`POST /v2/vectordb/aliases/create`](https://milvus.io/api-reference/restful/v2.4.x/v2/Alias%20(v2)/Create.md) API endpoint.
+
+
+
+
+
+```python
+# 9.1. Create aliases
+client.create_alias(
+ collection_name="customized_setup_2",
+ alias="bob"
+)
+
+client.create_alias(
+ collection_name="customized_setup_2",
+ alias="alice"
+)
+```
+
+```java
+import io.milvus.v2.service.utility.request.CreateAliasReq;
+
+// 9. Manage aliases
+
+// 9.1 Create alias
+CreateAliasReq createAliasReq = CreateAliasReq.builder()
+ .collectionName("customized_setup_2")
+ .alias("bob")
+ .build();
+
+client.createAlias(createAliasReq);
+
+createAliasReq = CreateAliasReq.builder()
+ .collectionName("customized_setup_2")
+ .alias("alice")
+ .build();
+
+client.createAlias(createAliasReq);
+```
+
+```javascript
+// 9. Manage aliases
+// 9.1 Create aliases
+res = await client.createAlias({
+ collection_name: "customized_setup_2",
+ alias: "bob"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.createAlias({
+ collection_name: "customized_setup_2",
+ alias: "alice"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/create" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2",
+ "aliasName": "bob"
+}'
+
+# Output
+#
+# {
+# "code": 0,
+# "data": {}
+# }
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/create" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2",
+ "aliasName": "alice"
+}'
+
+# Output
+#
+# {
+# "code": 0,
+# "data": {}
+# }
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection to create an alias for. |
+
+
+ alias |
+ The alias of the collection. Before this operation, ensure that the alias does not already exist. If it does, exceptions will occur. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection to create an alias for. |
+
+
+ alias |
+ The alias of the collection. Before this operation, ensure that the alias does not already exist. If it does, exceptions will occur. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of the collection to create an alias for. |
+
+
+ alias |
+ The alias of the collection. Before this operation, ensure that the alias does not already exist. If it does, exceptions will occur. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of the collection to create an alias for. |
+
+
+ aliasName |
+ The alias of the collection. Before this operation, ensure that the alias does not already exist. If it does, exceptions will occur. |
+
+
+
+
+### List aliases
+
+
+
+To list aliases, use the [`list_aliases()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/list_aliases.md) method, specifying the collection name.
+
+
+
+
+
+To list aliases, use the [`listAliases()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/listAliases.md) method, specifying the collection name.
+
+
+
+
+
+To list aliases, use the [`listAliases()`](https://milvus.io/api-reference/node/v2.4.x/Collections/listAliases.md) method, specifying the collection name.
+
+
+
+
+
+To list aliases for a collection, you can use the [`POST /v2/vectordb/aliases/list`](https://milvus.io/api-reference/restful/v2.4.x/v2/Alias%20(v2)/List.md) API endpoint.
+
+
+
+
+
+```python
+# 9.2. List aliases
+res = client.list_aliases(
+ collection_name="customized_setup_2"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "aliases": [
+# "bob",
+# "alice"
+# ],
+# "collection_name": "customized_setup_2",
+# "db_name": "default"
+# }
+```
+
+```java
+import io.milvus.v2.service.utility.request.ListAliasesReq;
+import io.milvus.v2.service.utility.response.ListAliasResp;
+
+// 9.2 List alises
+ListAliasesReq listAliasesReq = ListAliasesReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+ListAliasResp listAliasRes = client.listAliases(listAliasesReq);
+
+System.out.println(listAliasRes.getAlias());
+
+// Output:
+// [
+// "bob",
+// "alice"
+// ]
+```
+
+```javascript
+// 9.2 List aliases
+res = await client.listAliases({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.aliases)
+
+// Output
+//
+// [ 'bob', 'alice' ]
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/list" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+# {
+# "code": 0,
+# "data": [
+# "bob",
+# "alice"
+# ]
+# }
+```
+
+### Describe aliases
+
+
+
+To describe aliases, use the [`describe_alias()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/describe_alias.md) method, specifying the alias.
+
+
+
+
+
+To describe aliases, use the [`describeAlias()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/describeAlias.md) method, specifying the alias.
+
+
+
+
+
+To describe aliases, use the [`describeAlias()`](https://milvus.io/api-reference/node/v2.4.x/Collections/describeAlias.md) method, specifying the alias.
+
+
+
+
+
+To describe aliases for a collection, you can use the [`POST /v2/vectordb/aliases/describe`](https://milvus.io/api-reference/restful/v2.4.x/v2/Alias%20(v2)/Describe.md) API endpoint.
+
+
+
+
+
+```python
+# 9.3. Describe aliases
+res = client.describe_alias(
+ alias="bob"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "alias": "bob",
+# "collection_name": "customized_setup_2",
+# "db_name": "default"
+# }
+```
+
+```java
+import io.milvus.v2.service.utility.request.DescribeAliasReq;
+import io.milvus.v2.service.utility.response.DescribeAliasResp;
+
+// 9.3 Describe alias
+DescribeAliasReq describeAliasReq = DescribeAliasReq.builder()
+ .alias("bob")
+ .build();
+
+DescribeAliasResp describeAliasRes = client.describeAlias(describeAliasReq);
+
+System.out.println(JSONObject.toJSON(describeAliasRes));
+
+// Output:
+// {
+// "alias": "bob",
+// "collectionName": "customized_setup_2"
+// }
+```
+
+```javascript
+// 9.3 Describe aliases
+res = await client.describeAlias({
+ collection_name: "customized_setup_2",
+ alias: "bob"
+})
+
+console.log(res)
+
+// Output
+//
+// {
+// status: {
+// extra_info: {},
+// error_code: 'Success',
+// reason: '',
+// code: 0,
+// retriable: false,
+// detail: ''
+// },
+// db_name: 'default',
+// alias: 'bob',
+// collection: 'customized_setup_2'
+// }
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/describe" \
+-H "Content-Type: application/json" \
+-d '{
+ "aliasName": "bob"
+}'
+
+# {
+# "code": 0,
+# "data": {
+# "aliasName": "bob",
+# "collectionName": "quick_setup",
+# "dbName": "default"
+# }
+# }
+```
+
+### Reassign aliases
+
+
+
+To reassign aliases to other collections, use the [`alter_alias()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/alter_alias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To reassign aliases to other collections, use the [`alterAlias()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/alterAlias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To reassign aliases to other collections, use the [`alterAlias()`](https://milvus.io/api-reference/node/v2.4.x/Collections/alterAlias.md) method, specifying the collection name and the alias.
+
+
+
+
+
+To reassign aliases to other collections, you can use the [`POST /v2/vectordb/aliases/alter`](https://milvus.io/api-reference/restful/v2.4.x/v2/Alias%20(v2)/Alter.md) API endpoint.
+
+
+
+
+
+```python
+# 9.4 Reassign aliases to other collections
+client.alter_alias(
+ collection_name="customized_setup_1",
+ alias="alice"
+)
+
+res = client.list_aliases(
+ collection_name="customized_setup_1"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "aliases": [
+# "alice"
+# ],
+# "collection_name": "customized_setup_1",
+# "db_name": "default"
+# }
+
+res = client.list_aliases(
+ collection_name="customized_setup_2"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "aliases": [
+# "bob"
+# ],
+# "collection_name": "customized_setup_2",
+# "db_name": "default"
+# }
+```
+
+```java
+import io.milvus.v2.service.utility.request.AlterAliasReq;
+
+// 9.4 Reassign alias to other collections
+AlterAliasReq alterAliasReq = AlterAliasReq.builder()
+ .collectionName("customized_setup_1")
+ .alias("alice")
+ .build();
+
+client.alterAlias(alterAliasReq);
+
+listAliasesReq = ListAliasesReq.builder()
+ .collectionName("customized_setup_1")
+ .build();
+
+listAliasRes = client.listAliases(listAliasesReq);
+
+System.out.println(listAliasRes.getAlias());
+
+// Output:
+// ["alice"]
+
+listAliasesReq = ListAliasesReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+listAliasRes = client.listAliases(listAliasesReq);
+
+System.out.println(listAliasRes.getAlias());
+
+// Output:
+// ["bob"]
+```
+
+```javascript
+// 9.4 Reassign aliases to other collections
+res = await client.alterAlias({
+ collection_name: "customized_setup_1",
+ alias: "alice"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.listAliases({
+ collection_name: "customized_setup_1"
+})
+
+console.log(res.aliases)
+
+// Output
+//
+// [ 'alice' ]
+//
+
+res = await client.listAliases({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.aliases)
+
+// Output
+//
+// [ 'bob' ]
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/alter" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_1",
+ "aliasName": "alice"
+}'
+
+# {
+# "code": 0,
+# "data": {}
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/list" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_1"
+}'
+
+
+# {
+# "code": 0,
+# "data": [
+# "alice"
+# ]
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/list" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+
+# {
+# "code": 0,
+# "data": [
+# "bob"
+# ]
+# }
+```
+
+### Drop aliases
+
+
+
+To drop aliases, use the [`drop_alias()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/drop_alias.md) method, specifying the alias.
+
+
+
+
+
+To drop aliases, use the [`dropAlias()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/dropAlias.md) method, specifying the alias.
+
+
+
+
+
+To drop aliases, use the [`dropAlias()`](https://milvus.io/api-reference/node/v2.4.x/Collections/dropAlias.md) method, specifying the alias.
+
+
+
+
+
+To drop aliases for a collection, you can use the [`POST /v2/vectordb/aliases/drop`](https://milvus.io/api-reference/restful/v2.4.x/v2/Alias%20(v2)/Drop.md) API endpoint.
+
+
+
+
+
+```python
+# 9.5 Drop aliases
+client.drop_alias(
+ alias="bob"
+)
+
+client.drop_alias(
+ alias="alice"
+)
+```
+
+```java
+import io.milvus.v2.service.utility.request.DropAliasReq;
+
+// 9.5 Drop alias
+DropAliasReq dropAliasReq = DropAliasReq.builder()
+ .alias("bob")
+ .build();
+
+client.dropAlias(dropAliasReq);
+
+dropAliasReq = DropAliasReq.builder()
+ .alias("alice")
+ .build();
+
+client.dropAlias(dropAliasReq);
+```
+
+```javascript
+// 9.5 Drop aliases
+res = await client.dropAlias({
+ alias: "bob"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.dropAlias({
+ alias: "alice"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/drop" \
+-H "Content-Type: application/json" \
+-d '{
+ "aliasName": "bob"
+}'
+
+# {
+# "code": 0,
+# "data": {}
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/aliases/drop" \
+-H "Content-Type: application/json" \
+-d '{
+ "aliasName": "alice"
+}'
+
+
+# {
+# "code": 0,
+# "data": {}
+# }
+```
+
+## Set Properties
+
+You can set properties for a collection, such as `ttl.seconds` and `mmap.enabled`. For more information, refer to [set_properties()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/set_properties.md).
+
+
+
+### Set TTL
+
+Set the Time-To-Live (TTL) for the data in the collection, which specifies how long the data should be retained before it is automatically deleted.
+
+```python
+from pymilvus import Collection, connections
+
+# Connect to Milvus server
+connections.connect(host="localhost", port="19530") # Change to your Milvus server IP and port
+
+# Get existing collection
+collection = Collection("quick_setup")
+
+# Set the TTL for the data in the collection
+collection.set_properties(
+ properties={
+ "collection.ttl.seconds": 60
+ }
+)
+```
+
+### Set MMAP
+
+Configure the memory mapping (MMAP) property for the collection, which determines whether data is mapped into memory to improve query performance. For more information, refer to [Configure memory mapping
+](https://milvus.io/docs/mmap.md#Configure-memory-mapping).
+
+
+
+Before setting the MMAP property, release the collection first. Otherwise, an error will occur.
+
+
+
+```python
+from pymilvus import Collection, connections
+
+# Connect to Milvus server
+connections.connect(host="localhost", port="19530") # Change to your Milvus server IP and port
+
+# Get existing collection
+collection = Collection("quick_setup")
+
+# Before setting memory mapping property, we need to release the collection first.
+collection.release()
+
+# Set memory mapping property to True or Flase
+collection.set_properties(
+ properties={
+ "mmap.enabled": True
+ }
+)
+```
+
+## Drop a Collection
+
+If a collection is no longer needed, you can drop the collection.
+
+
+
+To drop a collection, use the [`drop_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/drop_collection.md) method, specifying the collection name.
+
+
+
+
+
+To drop a collection, use the [`dropCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/dropCollection.md) method, specifying the collection name.
+
+
+
+
+
+To drop a collection, use the [`dropCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/dropCollection.md) method, specifying the collection name.
+
+
+
+
+
+To drop a collection, you can use the [`POST /v2/vectordb/collections/drop`](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Drop.md) API endpoint.
+
+
+
+
+
+```python
+# 10. Drop the collections
+client.drop_collection(
+ collection_name="quick_setup"
+)
+
+client.drop_collection(
+ collection_name="customized_setup_1"
+)
+
+client.drop_collection(
+ collection_name="customized_setup_2"
+)
+```
+
+```java
+import io.milvus.v2.service.collection.request.DropCollectionReq;
+
+// 10. Drop collections
+
+DropCollectionReq dropQuickSetupParam = DropCollectionReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+client.dropCollection(dropQuickSetupParam);
+
+DropCollectionReq dropCustomizedSetupParam = DropCollectionReq.builder()
+ .collectionName("customized_setup_1")
+ .build();
+
+client.dropCollection(dropCustomizedSetupParam);
+
+dropCustomizedSetupParam = DropCollectionReq.builder()
+ .collectionName("customized_setup_2")
+ .build();
+
+client.dropCollection(dropCustomizedSetupParam);
+```
+
+```javascript
+// 10. Drop the collection
+res = await client.dropCollection({
+ collection_name: "customized_setup_2"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.dropCollection({
+ collection_name: "customized_setup_1"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+
+res = await client.dropCollection({
+ collection_name: "quick_setup"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
+
+```shell
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/drop" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "quick_setup"
+}'
+
+# {
+# "code": 0,
+# "data": {}
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/drop" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_1"
+}'
+
+
+# {
+# "code": 0,
+# "data": {}
+# }
+
+
+$ curl -X POST "http://${MILVUS_URI}/v2/vectordb/collections/drop" \
+-H "Content-Type: application/json" \
+-d '{
+ "collectionName": "customized_setup_2"
+}'
+
+
+# {
+# "code": 0,
+# "data": {}
+# }
+```
+
diff --git a/preview/site/en/userGuide/manage-indexes/index-scalar-fields.md b/preview/site/en/userGuide/manage-indexes/index-scalar-fields.md
new file mode 100644
index 000000000..6de0c94eb
--- /dev/null
+++ b/preview/site/en/userGuide/manage-indexes/index-scalar-fields.md
@@ -0,0 +1,330 @@
+---
+id: index-scalar-fields.md
+order: 2
+summary: This guide will walk you through creating and configuring scalar indexes for fields such as integers, strings, etc.
+title: Index Scalar Fields
+---
+
+# Index Scalar Fields
+
+In Milvus, a scalar index is used to speed up metafiltering by a specific non-vector field value, similar to a traditional database index. This guide will walk you through creating and configuring scalar indexes for fields such as integers, strings, etc.
+
+## Types of scalar indexing
+
+- __[Auto indexing](https://milvus.io/docs/index-scalar-fields.md#Auto-indexing)__: Milvus automatically decides the index type based on the data type of the scalar field. This is suitable when you do not need to control the specific index type.
+
+- __[Custom indexing](https://milvus.io/docs/index-scalar-fields.md#Custom-indexing)__: You specify the exact index type, such as an inverted index. This provides more control over the index type selection.
+
+## Auto indexing
+
+
+
+To use auto indexing, omit the __index_type__ parameter in [`add_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/add_index.md), so that Milvus can infer the index type based on the scalar field type.
+
+
+
+
+
+To use auto indexing, omit the __indexType__ parameter in [`IndexParam`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/IndexParam.md), so that Milvus can infer the index type based on the scalar field type.
+
+
+
+
+
+To use auto indexing, omit the __index_type__ parameter in [`createIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/createIndex.md), so that Milvus can infer the index type based on the scalar field type.
+
+
+
+For mappings between scalar data types and default indexing algorithms, refer to [Scalar field indexing algorithms](https://milvus.io/docs/scalar_index.md#Scalar-field-indexing-algorithms).
+
+
+
+```python
+# Auto indexing
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+index_params = client.create_index_params() # Prepare an empty IndexParams object, without having to specify any index parameters
+
+index_params.add_index(
+ field_name="scalar_1", # Name of the scalar field to be indexed
+ index_type="", # Type of index to be created. For auto indexing, leave it empty or omit this parameter.
+ index_name="default_index" # Name of the index to be created
+)
+
+client.create_index(
+ collection_name="test_scalar_index", # Specify the collection name
+ index_params=index_params
+)
+```
+
+```java
+import io.milvus.v2.common.IndexParam;
+import io.milvus.v2.service.index.request.CreateIndexReq;
+
+IndexParam indexParamForScalarField = IndexParam.builder()
+ .fieldName("scalar_1") // Name of the scalar field to be indexed
+ .indexName("default_index") // Name of the index to be created
+ .indexType("") // Type of index to be created. For auto indexing, leave it empty or omit this parameter.
+ .build();
+
+List indexParams = new ArrayList<>();
+indexParams.add(indexParamForVectorField);
+
+CreateIndexReq createIndexReq = CreateIndexReq.builder()
+ .collectionName("test_scalar_index") // Specify the collection name
+ .indexParams(indexParams)
+ .build();
+
+client.createIndex(createIndexReq);
+```
+
+```javascript
+await client.createIndex({
+ collection_name: "test_scalar_index", // Specify the collection name
+ field_name: "scalar_1", // Name of the scalar field to be indexed
+ index_name: "default_index", // Name of the index to be created
+ index_type: "" // Type of index to be created. For auto indexing, leave it empty or omit this parameter.
+})
+```
+
+## Custom indexing
+
+
+
+To use custom indexing, specify a particular index type using the __index_type__ parameter in [`add_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/add_index.md).
+
+
+
+
+
+To use custom indexing, specify a particular index type using the __indexType__ parameter in [`IndexParam`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/IndexParam.md).
+
+
+
+
+
+To use custom indexing, specify a particular index type using the __index_type__ parameter in [`createIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/createIndex.md).
+
+
+
+
+
+```python
+index_params = client.create_index_params() # Prepare an IndexParams object
+
+index_params.add_index(
+ field_name="scalar_2", # Name of the scalar field to be indexed
+ index_type="INVERTED", # Type of index to be created
+ index_name="inverted_index" # Name of the index to be created
+)
+
+client.create_index(
+ collection_name="test_scalar_index", # Specify the collection name
+ index_params=index_params
+)
+```
+
+```java
+import io.milvus.v2.common.IndexParam;
+import io.milvus.v2.service.index.request.CreateIndexReq;
+
+IndexParam indexParamForScalarField = IndexParam.builder()
+ .fieldName("scalar_1") // Name of the scalar field to be indexed
+ .indexName("inverted_index") // Name of the index to be created
+ .indexType("INVERTED") // Type of index to be created
+ .build();
+
+List indexParams = new ArrayList<>();
+indexParams.add(indexParamForVectorField);
+
+CreateIndexReq createIndexReq = CreateIndexReq.builder()
+ .collectionName("test_scalar_index") // Specify the collection name
+ .indexParams(indexParams)
+ .build();
+
+client.createIndex(createIndexReq);
+```
+
+```javascript
+await client.createIndex({
+ collection_name: "test_scalar_index", // Specify the collection name
+ field_name: "scalar_1", // Name of the scalar field to be indexed
+ index_name: "inverted_index", // Name of the index to be created
+ index_type: "INVERTED" // Type of index to be created
+})
+```
+
+
+
+__Methods and Parameters__
+
+- __create_index_params()__
+
+ Prepares an __IndexParams__ object.
+
+- __add_index()__
+
+ Adds index configurations to the __IndexParams__ object.
+
+ - __field_name__ (_string_)
+
+ The name of the scalar field to index.
+
+ - __index_type__ (_string_):
+
+ The type of the scalar index to create. For implicit indexing, leave it empty or omit this parameter.
+
+ For custom indexing, valid values are:
+
+ - __INVERTED__: (Recommended) An inverted index consists of a term dictionary containing all tokenized words sorted alphabetically. For details, refer to Scalar Index.
+
+ - __STL_SORT__: Sorts scalar fields using the standard template library sort algorithm. Supports Boolean and numeric fields (e.g., INT8, INT16, INT32, INT64, FLOAT, DOUBLE).
+
+ - __Trie__: A tree data structure for fast prefix searches and retrievals. Supports VARCHAR fields.
+
+ - __index_name__ (_string_)
+
+ The name of the scalar index to create. Each scalar field supports one index.
+
+- __create_index()__
+
+ Creates the index in the specified collection.
+
+ - __collection_name__ (_string_)
+
+ The name of the collection for which the index is created.
+
+ - __index_params__
+
+ The __IndexParams__ object that contains index configurations.
+
+
+
+
+
+__Methods and Parameters__
+
+- __IndexParam__
+ Prepares an IndexParam object.
+ - __fieldName__ (_String_)
+ The name of the scalar field to index.
+ - __indexName__ (_String_)
+ The name of the scalar index to create. Each scalar field supports one index.
+ - __indexType__ (_String_)
+ The type of the scalar index to create. For implicit indexing, leave it empty or omit this parameter.
+ For custom indexing, valid values are:
+ - __INVERTED__: (Recommended) An inverted index consists of a term dictionary containing all tokenized words sorted alphabetically. For details, refer to Scalar Index.
+ - __STL_SORT__: Sorts scalar fields using the standard template library sort algorithm. Supports Boolean and numeric fields (e.g., INT8, INT16, INT32, INT64, FLOAT, DOUBLE).
+ - __Trie__: A tree data structure for fast prefix searches and retrievals. Supports VARCHAR fields.
+- __CreateIndexReq__
+ Creates the index in the specified collection.
+ - __collectionName__ (_String_)
+ The name of the collection for which the index is created.
+ - __indexParams__ (_List_)
+ A list of IndexParam objects that contain index configurations.
+
+
+
+
+
+__Methods and Parameters__
+- __createIndex__
+
+ Creates the index in the specified collection.
+ - __collection_name__ (_string_)
+ The name of the collection for which the index is created.
+ - __field_name__ (_string_)
+ The name of the scalar field to index.
+ - __index_name__ (_string_)
+ The name of the scalar index to create. Each scalar field supports one index.
+ - __index_type__ (_string_)
+ The type of the scalar index to create. For implicit indexing, leave it empty or omit this parameter.
+ For custom indexing, valid values are:
+ - __INVERTED__: (Recommended) An inverted index consists of a term dictionary containing all tokenized words sorted alphabetically. For details, refer to [Scalar Index](scalar_index.md).
+ - __STL_SORT__: Sorts scalar fields using the standard template library sort algorithm. Supports Boolean and numeric fields (e.g., INT8, INT16, INT32, INT64, FLOAT, DOUBLE).
+ - __Trie__: A tree data structure for fast prefix searches and retrievals. Supports VARCHAR fields.
+
+
+
+## Verifying the result
+
+
+
+Use the [`list_indexes()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/list_indexes.md) method to verify the creation of scalar indexes:
+
+
+
+
+
+Use the `listIndexes()` method to verify the creation of scalar indexes:
+
+
+
+
+
+Use the `listIndexes()` method to verify the creation of scalar indexes:
+
+
+
+
+
+```python
+client.list_indexes(
+ collection_name="test_scalar_index" # Specify the collection name
+)
+
+# Output:
+# ['default_index','inverted_index']
+```
+
+```java
+import java.util.List;
+import io.milvus.v2.service.index.request.ListIndexesReq;
+
+ListIndexesReq listIndexesReq = ListIndexesReq.builder()
+ .collectionName("test_scalar_index") // Specify the collection name
+ .build();
+
+List indexNames = client.listIndexes(listIndexesReq);
+
+System.out.println(indexNames);
+
+// Output:
+// [
+// "default_index",
+// "inverted_index"
+// ]
+```
+
+```javascript
+res = await client.listIndexes({
+ collection_name: 'test_scalar_index'
+})
+
+console.log(res.indexes)
+
+// Output:
+// [
+// "default_index",
+// "inverted_index"
+// ]
+```
+
+## Limits
+
+- Currently, scalar indexing supports INT8, INT16, INT32, INT64, FLOAT, DOUBLE, BOOL, and VARCHAR data types, but not JSON and ARRAY types.
+
diff --git a/preview/site/en/userGuide/manage-indexes/index-vector-fields.md b/preview/site/en/userGuide/manage-indexes/index-vector-fields.md
new file mode 100644
index 000000000..df4b4782b
--- /dev/null
+++ b/preview/site/en/userGuide/manage-indexes/index-vector-fields.md
@@ -0,0 +1,616 @@
+---
+id: index-vector-fields.md
+order: 1
+summary: This guide walks you through the basic operations on creating and managing indexes on vector fields in a collection.
+title: Index Vector Fields
+---
+
+# Index Vector Fields
+
+This guide walks you through the basic operations on creating and managing indexes on vector fields in a collection.
+
+## Overview
+
+Leveraging the metadata stored in an index file, Milvus organizes your data in a specialized structure, facilitating rapid retrieval of requested information during searches or queries.
+
+Milvus provides several index types and metrics to sort field values for efficient similarity searches. The following table lists the supported index types and metrics for different vector field types. For details, refer to [In-memory Index](index.md) and [Similarity Metrics](metric.md).
+
+
+
+
+
+
+
+
+ Metric Types |
+ Index Types |
+
+
+
+
+ - Euclidean distance (L2)
- Inner product (IP)
- Cosine similarity (COSINE)
|
+ - FLAT
- IVF_FLAT
- IVF_SQ8
- IVF_PQ
- GPU_IVF_FLAT
- GPU_IVF_PQ
- HNSW
- DISKANN
|
+
+
+
+
+
+
+
+
+
+
+
+ Metric Types |
+ Index Types |
+
+
+
+
+ - Jaccard (JACCARD)
- Hamming (HAMMING)
|
+ |
+
+
+
+
+
+
+
+
+
+
+
+ Metric Types |
+ Index Types |
+
+
+
+
+ IP |
+ - SPARSE_INVERTED_INDEX
- SPARSE_WAND
|
+
+
+
+
+
+
+It is recommended to create indexes for both the vector field and scalar fields that are frequently accessed.
+
+## Preparations
+
+As explained in [Manage Collections](manage-collections.md), Milvus automatically generates an index and loads it into memory when creating a collection if any of the following conditions are specified in the collection creation request:
+
+- The dimensionality of the vector field and the metric type, or
+
+- The schema and the index parameters.
+
+The code snippet below repurposes the existing code to establish a connection to a Milvus instance and create a collection without specifying its index parameters. In this case, the collection lacks an index and remains unloaded.
+
+
+
+To prepare for indexing, use [`MilvusClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) to connect to the Milvus server and set up a collection by using [`create_schema()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_schema.md), [`add_field()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/CollectionSchema/add_field.md), and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md).
+
+
+
+
+
+To prepare for indexing, use [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) to connect to the Milvus server and set up a collection by using [`createSchema()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createSchema.md), [`addField()`](https://milvus.io/api-reference/java/v2.4.x/v2/CollectionSchema/addField.md), and [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md).
+
+
+
+
+
+To prepare for indexing, use [`MilvusClient`](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) to connect to the Milvus server and set up a collection by using [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md).
+
+
+
+
+
+```python
+from pymilvus import MilvusClient, DataType
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create schema
+# 2.1. Create schema
+schema = MilvusClient.create_schema(
+ auto_id=False,
+ enable_dynamic_field=True,
+)
+
+# 2.2. Add fields to schema
+schema.add_field(field_name="id", datatype=DataType.INT64, is_primary=True)
+schema.add_field(field_name="vector", datatype=DataType.FLOAT_VECTOR, dim=5)
+
+# 3. Create collection
+client.create_collection(
+ collection_name="customized_setup",
+ schema=schema,
+)
+```
+
+```java
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.common.DataType;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection
+
+// 2.1 Create schema
+CreateCollectionReq.CollectionSchema schema = client.createSchema();
+
+// 2.2 Add fields to schema
+schema.addField(AddFieldReq.builder().fieldName("id").dataType(DataType.Int64).isPrimaryKey(true).autoID(false).build());
+schema.addField(AddFieldReq.builder().fieldName("vector").dataType(DataType.FloatVector).dimension(5).build());
+
+// 3 Create a collection without schema and index parameters
+CreateCollectionReq customizedSetupReq = CreateCollectionReq.builder()
+.collectionName("customized_setup")
+.collectionSchema(schema)
+.build();
+
+client.createCollection(customizedSetupReq);
+```
+
+```javascript
+// 1. Set up a Milvus Client
+client = new MilvusClient({address, token});
+
+// 2. Define fields for the collection
+const fields = [
+ {
+ name: "id",
+ data_type: DataType.Int64,
+ is_primary_key: true,
+ autoID: false
+ },
+ {
+ name: "vector",
+ data_type: DataType.FloatVector,
+ dim: 5
+ },
+]
+
+// 3. Create a collection
+res = await client.createCollection({
+ collection_name: "customized_setup",
+ fields: fields,
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
+
+## Index a Collection
+
+
+
+To create an index for a collection or index a collection, use [`prepare_index_params()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/prepare_index_params.md) to prepare index parameters and [`create_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/create_index.md) to create the index.
+
+
+
+
+
+To create an index for a collection or index a collection, use [`IndexParam`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/IndexParam.md) to prepare index parameters and [`createIndex()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/createIndex.md) to create the index.
+
+
+
+
+
+To create an index for a collection or index a collection, use [`createIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/createIndex.md).
+
+
+
+
+
+```python
+# 4.1. Set up the index parameters
+index_params = MilvusClient.prepare_index_params()
+
+# 4.2. Add an index on the vector field.
+index_params.add_index(
+ field_name="vector",
+ metric_type="COSINE",
+ index_type="IVF_FLAT",
+ index_name="vector_index",
+ params={ "nlist": 128 }
+)
+
+# 4.3. Create an index file
+client.create_index(
+ collection_name="customized_setup",
+ index_params=index_params
+)
+```
+
+```java
+import io.milvus.v2.common.IndexParam;
+import io.milvus.v2.service.index.request.CreateIndexReq;
+
+// 4 Prepare index parameters
+
+// 4.2 Add an index for the vector field "vector"
+IndexParam indexParamForVectorField = IndexParam.builder()
+ .fieldName("vector")
+ .indexName("vector_index")
+ .indexType(IndexParam.IndexType.IVF_FLAT)
+ .metricType(IndexParam.MetricType.COSINE)
+ .extraParams(Map.of("nlist", 128))
+ .build();
+
+List indexParams = new ArrayList<>();
+indexParams.add(indexParamForVectorField);
+
+// 4.3 Crate an index file
+CreateIndexReq createIndexReq = CreateIndexReq.builder()
+ .collectionName("customized_setup")
+ .indexParams(indexParams)
+ .build();
+
+client.createIndex(createIndexReq);
+```
+
+```javascript
+// 4. Set up index for the collection
+// 4.1. Set up the index parameters
+res = await client.createIndex({
+ collection_name: "customized_setup",
+ field_name: "vector",
+ index_type: "AUTOINDEX",
+ metric_type: "COSINE",
+ index_name: "vector_index",
+ params: { "nlist": 128 }
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ field_name |
+ The name of the target file to apply this object applies. |
+
+
+ metric_type |
+ The algorithm that is used to measure similarity between vectors. Possible values are IP, L2, COSINE, JACCARD, HAMMING. This is available only when the specified field is a vector field. For more information, refer to Indexes supported in Milvus. |
+
+
+ index_type |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ index_name |
+ The name of the index file generated after this object has been applied. |
+
+
+ params |
+ The fine-tuning parameters for the specified index type. For details on possible keys and value ranges, refer to In-memory Index. |
+
+
+ collection_name |
+ The name of an existing collection. |
+
+
+ index_params |
+ An IndexParams object containing a list of IndexParam objects. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ fieldName |
+ The name of the target field to apply this IndexParam object applies. |
+
+
+ indexName |
+ The name of the index file generated after this object has been applied. |
+
+
+ indexType |
+ The name of the algorithm used to arrange data in the specific field. For applicable algorithms, refer to In-memory Index and On-disk Index. |
+
+
+ metricType |
+ The distance metric to use for the index. Possible values are IP, L2, COSINE, JACCARD, HAMMING. |
+
+
+ extraParams |
+ Extra index parameters. For details, refer to In-memory Index and On-disk Index. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of an existing collection. |
+
+
+ field_name |
+ The name of the field in which to create an index. |
+
+
+ index_type |
+ The type of the index to create. |
+
+
+ metric_type |
+ The metric type used to measure vector distance. |
+
+
+ index_name |
+ The name of the index to create. |
+
+
+ params |
+ Other index-specific parameters. |
+
+
+
+
+
+
+
notes
+
+
Currently, you can create only one index file for each field in a collection.
+
+
+
+## Check Index Details
+
+Once you have created an index, you can check its details.
+
+
+
+To check the index details, use [`list_indexes()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/list_indexes.md) to list the index names and [`describe_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/describe_index.md) to get the index details.
+
+
+
+
+
+To check the index details, use [`describeIndex()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/describeIndex.md) to get the index details.
+
+
+
+
+
+To check the index details, use [`describeIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/describeIndex.md) to get the index details.
+
+
+
+
+
+```python
+# 5. Describe index
+res = client.list_indexes(
+ collection_name="customized_setup"
+)
+
+print(res)
+
+# Output
+#
+# [
+# "vector_index",
+# ]
+
+res = client.describe_index(
+ collection_name="customized_setup",
+ index_name="vector_index"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "index_type": ,
+# "metric_type": "COSINE",
+# "field_name": "vector",
+# "index_name": "vector_index"
+# }
+```
+
+```java
+import io.milvus.v2.service.index.request.DescribeIndexReq;
+import io.milvus.v2.service.index.response.DescribeIndexResp;
+
+// 5. Describe index
+// 5.1 List the index names
+ListIndexesReq listIndexesReq = ListIndexesReq.builder()
+ .collectionName("customized_setup")
+ .build();
+
+List indexNames = client.listIndexes(listIndexesReq);
+
+System.out.println(indexNames);
+
+// Output:
+// [
+// "vector_index"
+// ]
+
+// 5.2 Describe an index
+DescribeIndexReq describeIndexReq = DescribeIndexReq.builder()
+ .collectionName("customized_setup")
+ .indexName("vector_index")
+ .build();
+
+DescribeIndexResp describeIndexResp = client.describeIndex(describeIndexReq);
+
+System.out.println(JSONObject.toJSON(describeIndexResp));
+
+// Output:
+// {
+// "metricType": "COSINE",
+// "indexType": "AUTOINDEX",
+// "fieldName": "vector",
+// "indexName": "vector_index"
+// }
+```
+
+```javascript
+// 5. Describe the index
+res = await client.describeIndex({
+ collection_name: "customized_setup",
+ index_name: "vector_index"
+})
+
+console.log(JSON.stringify(res.index_descriptions, null, 2))
+
+// Output
+//
+// [
+// {
+// "params": [
+// {
+// "key": "index_type",
+// "value": "AUTOINDEX"
+// },
+// {
+// "key": "metric_type",
+// "value": "COSINE"
+// }
+// ],
+// "index_name": "vector_index",
+// "indexID": "449007919953063141",
+// "field_name": "vector",
+// "indexed_rows": "0",
+// "total_rows": "0",
+// "state": "Finished",
+// "index_state_fail_reason": "",
+// "pending_index_rows": "0"
+// }
+// ]
+//
+```
+
+You can check the index file created on a specific field, and collect the statistics on the number of rows indexed using this index file.
+
+## Drop an Index
+
+You can simply drop an index if it is no longer needed.
+
+
+
+Before dropping an index, make sure it has been released first.
+
+
+
+
+
+To drop an index, use [`drop_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/drop_index.md).
+
+
+
+
+
+To drop an index, use [`dropIndex()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/dropIndex.md).
+
+
+
+
+
+To drop an index, use [`dropIndex()`](https://milvus.io/api-reference/node/v2.4.x/Management/dropIndex.md).
+
+
+
+
+
+```python
+# 6. Drop index
+client.drop_index(
+ collection_name="customized_setup",
+ index_name="vector_index"
+)
+```
+
+```java
+// 6. Drop index
+
+DropIndexReq dropIndexReq = DropIndexReq.builder()
+ .collectionName("customized_setup")
+ .indexName("vector_index")
+ .build();
+
+client.dropIndex(dropIndexReq);
+```
+
+```javascript
+// 6. Drop the index
+res = await client.dropIndex({
+ collection_name: "customized_setup",
+ index_name: "vector_index"
+})
+
+console.log(res.error_code)
+
+// Output
+//
+// Success
+//
+```
diff --git a/preview/site/en/userGuide/manage-indexes/index-with-gpu.md b/preview/site/en/userGuide/manage-indexes/index-with-gpu.md
new file mode 100644
index 000000000..917fac01d
--- /dev/null
+++ b/preview/site/en/userGuide/manage-indexes/index-with-gpu.md
@@ -0,0 +1,214 @@
+---
+id: index-with-gpu.md
+order: 3
+summary: This guide explains how to build an index with GPU support in Milvus to enhance search performance.
+title: Index with GPU
+---
+
+# Index with GPU
+
+This guide outlines the steps to build an index with GPU support in Milvus, which can significantly improve search performance in high-throughput and high-recall scenarios. For details on the types of GPU indexes supported by Milvus, refer to [GPU Index](gpu_index.md).
+
+## Configure Milvus settings for GPU memory control
+
+Milvus uses a global graphics memory pool to allocate GPU memory.
+
+It supports two parameters `initMemSize` and `maxMemSize` in [Milvus config file](https://github.com/milvus-io/milvus/blob/master/configs/milvus.yaml#L767-L769). The pool size is initially set to `initMemSize`, and will be automatically expanded to `maxMemSize` after exceeding this limit.
+
+The default `initMemSize` is 1/2 of the available GPU memory when Milvus starts, and the default `maxMemSize` is equal to all available GPU memory.
+
+Up until Milvus 2.4.1( including version 2.4.1), Milvus used a unified GPU memory pool. For versions prior to 2.4.1( including version 2.4.1), it was recommended to set both of the value to 0.
+
+```yaml
+gpu:
+ initMemSize: 0 #set the initial memory pool size.
+ maxMemSize: 0 #maxMemSize sets the maximum memory usage limit. When the memory usage exceed initMemSize, Milvus will attempt to expand the memory pool.
+```
+
+From Milvus 2.4.1 onwards, the GPU memory pool is only used for temporary GPU data during searches. Therefore, it is recommended to set it to 2048 and 4096.
+
+```yaml
+gpu:
+ initMemSize: 2048 #set the initial memory pool size.
+ maxMemSize: 4096 #maxMemSize sets the maximum memory usage limit. When the memory usage exceed initMemSize, Milvus will attempt to expand the memory pool.
+```
+
+## Build an index
+
+The following examples demonstrate how to build GPU indexes of different types.
+
+### Prepare index parameters
+
+When setting up GPU index parameters, define __index_type__, __metric_type__, and __params__:
+
+- __index_type__ (_string_): The type of index used to accelerate vector search. Valid options include __GPU_CAGRA__, __GPU_IVF_FLAT__, __GPU_IVF_PQ__, and __GPU_BRUTE_FORCE__.
+
+- __metric_type__ (_string_): The type of metrics used to measure the similarity of vectors. Valid options are __IP__ and __L2__.
+
+- __params__(_dict_): The index-specific building parameters. The valid options for this parameter depend on the index type.
+
+Here are example configurations for different index types:
+
+- __GPU_CAGRA__ index
+
+ ```python
+ index_params = {
+ "metric_type": "L2",
+ "index_type": "GPU_CAGRA",
+ "params": {
+ 'intermediate_graph_degree': 64,
+ 'graph_degree': 32
+ }
+ }
+ ```
+
+ Possible options for __params__ include:
+
+ - __intermediate_graph_degree__ (_int_): Affects recall and build time by determining the graph's degree before pruning. Recommended values are __32__ or __64__.
+
+ - __graph_degree__ (_int_): Affects search performance and recall by setting the graph's degree after pruning. Typically, it is half of the __intermediate_graph_degree__. A larger difference between these two degrees results in a longer build time. Its value must be smaller than the value of __intermediate_graph_degree__.
+
+ - __build_algo__ (_string_): Selects the graph generation algorithm before pruning. Possible options:
+
+ - __IVF_PQ__: Offers higher quality but slower build time.
+
+ - __NN_DESCENT__: Provides a quicker build with potentially lower recall.
+
+ - __cache_dataset_on_device__ (_string_, __"true"__ | __"false"__): Decides whether to cache the original dataset in GPU memory. Setting this to __"true"__ enhances recall by refining search results, while setting it to __"false"__ conserves GPU memory.
+
+- __GPU_IVF_FLAT__ or __GPU_IVF_PQ__ index
+
+ ```python
+ index_params = {
+ "metric_type": "L2",
+ "index_type": "GPU_IVF_FLAT", # Or GPU_IVF_PQ
+ "params": {
+ "nlist": 1024
+ }
+ }
+ ```
+
+ The __params__ options are identical to those used in __[IVF_FLAT](https://milvus.io/docs/index.md#IVF_FLAT)__ and __[IVF_PQ](https://milvus.io/docs/index.md#IVF_PQ)__.
+
+- __GPU_BRUTE_FORCE__ index
+
+ ```python
+ index_params = {
+ 'index_type': 'GPU_BRUTE_FORCE',
+ 'metric_type': 'L2',
+ 'params': {}
+ }
+ ```
+
+ No additional __params__ configurations are required.
+
+### Build index
+
+After configuring the index parameters in __index_params__, call the [`create_index()`](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/create_index.md) method to build the index.
+
+```python
+# Get an existing collection
+collection = Collection("YOUR_COLLECTION_NAME")
+
+collection.create_index(
+ field_name="vector", # Name of the vector field on which an index is built
+ index_params=index_params
+)
+```
+
+## Search
+
+Once you have built your GPU index, the next step is to prepare the search parameters before conducting a search.
+
+### Prepare search parameters
+
+Below are example configurations for different index types:
+
+- __GPU_BRUTE_FORCE__ index
+
+ ```python
+ search_params = {
+ "metric_type": "L2",
+ "params": {}
+ }
+ ```
+
+ No additional __params__ configurations are required.
+
+- __GPU_CAGRA__ index
+
+ ```python
+ search_params = {
+ "metric_type": "L2",
+ "params": {
+ "itopk_size": 128,
+ "search_width": 4,
+ "min_iterations": 0,
+ "max_iterations": 0,
+ "team_size": 0
+ }
+ }
+ ```
+
+ Key search parameters include:
+
+ - __itopk_size__: Determines the size of intermediate results kept during the search. A larger value may improve recall at the expense of search performance. It should be at least equal to the final top-k (__limit__) value and is typically a power of 2 (e.g., 16, 32, 64, 128).
+
+ - __search_width__: Specifies the number of entry points into the CAGRA graph during the search. Increasing this value can enhance recall but may impact search performance.
+
+ - __min_iterations__ / __max_iterations__: These parameters control the search iteration process. By default, they are set to __0__, and CAGRA automatically determines the number of iterations based on __itopk_size__ and __search_width__. Adjusting these values manually can help balance performance and accuracy.
+
+ - __team_size__: Specifies the number of CUDA threads used for calculating metric distance on the GPU. Common values are a power of 2 up to 32 (e.g. 2, 4, 8, 16, 32). It has a minor impact on search performance. The default value is __0__, where Milvus automatically selects the __team_size__ based on the vector dimension.
+
+- __GPU_IVF_FLAT__ or __GPU_IVF_PQ__ index
+
+ ```python
+ search_params = {
+ "metric_type": "L2",
+ "params": {"nprobe": 10}
+ }
+ ```
+
+ Search parameters for these two index types are similar to those used in __[IVF_FLAT](https://milvus.io/docs/index.md#IVF_FLAT) and [IVF_PQ](https://milvus.io/docs/index.md#IVF_PQ)__. For more information, refer to [Conduct a Vector Similarity Search](https://milvus.io/docs/search.md#Prepare-search-parameters).
+
+### Conduct a search
+
+Use the [`search()`](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/search.md) method to perform a vector similarity search on the GPU index.
+
+```python
+# Load data into memory
+collection.load()
+
+collection.search(
+ data=[[query_vector]], # Your query vector
+ anns_field="vector", # Name of the vector field
+ param=search_params,
+ limit=100 # Number of the results to return
+)
+```
+
+## Limits
+
+When using GPU indexes, be aware of certain constraints:
+
+- For __GPU_IVF_FLAT__, the maximum value for __limit__ is 256.
+
+- For __GPU_IVF_PQ__ and __GPU_CAGRA__, the maximum value for __limit__ is 1024.
+
+- While there is no set limit for __limit__ on __GPU_BRUTE_FORCE__, it is recommended not to exceed 4096 to avoid potential performance issues.
+
+- Currently, GPU indexes do not support COSINE distance. If COSINE distance is required, data should be normalized first, and then inner product (IP) distance can be used as a substitute.
+
+- Loading OOM protection for GPU indexes is not fully supported, too much data might lead to QueryNode crashes.
+
+- GPU indexes do not support search functions like [range search](https://milvus.io/docs/single-vector-search.md#Range-search) and [grouping search](https://milvus.io/docs/single-vector-search.md#Grouping-searchh).
+
+## FAQ
+
+- __When is it appropriate to utilize a GPU index?__
+
+ A GPU index is particularly beneficial in situations that demand high throughput or high recall. For instance, when dealing with large batches, the throughput of GPU indexing can surpass that of CPU indexing by as much as 100 times. In scenarios with smaller batches, GPU indexes still significantly outshine CPU indexes in terms of performance. Furthermore, if there's a requirement for rapid data insertion, incorporating a GPU can substantially speed up the process of building indexes.
+
+- __In which scenarios are GPU indexes like CAGRA, GPU_IVF_PQ, GPU_IVF_FLAT, and GPU_BRUTE_FORCE most suitable?__
+
+ CAGRA indexes are ideal for scenarios that demand enhanced performance, albeit at the cost of consuming more memory. For environments where memory conservation is a priority, the __GPU_IVF_PQ__ index can help minimize storage requirements, though this comes with a higher loss in precision. The __GPU_IVF_FLAT__ index serves as a balanced option, offering a compromise between performance and memory usage. Lastly, the __GPU_BRUTE_FORCE__ index is designed for exhaustive search operations, guaranteeing a recall rate of 1 by performing traversal searches.
\ No newline at end of file
diff --git a/preview/site/en/userGuide/manage-partitions.md b/preview/site/en/userGuide/manage-partitions.md
new file mode 100644
index 000000000..86bc76c94
--- /dev/null
+++ b/preview/site/en/userGuide/manage-partitions.md
@@ -0,0 +1,1038 @@
+---
+id: manage-partitions.md
+title: Manage Partitions
+---
+
+# Manage Partitions
+
+This guide walks you through how to create and manage partitions in a collection.
+
+## Overview
+
+A partition in Milvus represents a sub-division of a collection. This functionality allows the physical storage of a collection to be divided into multiple parts, contributing to improved query performance by narrowing down the focus to a smaller subset of data rather than the entire collection.
+
+Upon the creation of a collection, at least a default partition named ___default__ is automatically created. You can create a maximum of 4,096 partitions within a collection.
+
+
+
+
notes
+
+
Milvus introduces a feature called Partition Key, leveraging the underlying partitions to store entities based on the hashed values of a specific field. This feature facilitates the implementation of multi-tenancy, enhancing search performance. For details, read Use Partition Key.
+
If the Partition Key feature is on in a collection, Milvus takes care of managing all the partitions, relieving you of this responsibility.
+
+
+
+## Preparations
+
+The code snippet below repurposes the existing code to establish a connection to Milvus and create a collection in a quick-setup mode, indicating that the collection is loaded upon creation.
+
+
+
+For preparations, use [`MiluvsClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) to connect to Milvus and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+For preparations, use [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) to connect to Milvus and [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+For preparations, use [`MilvusClient`](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) to connect to Milvus and [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) to create a collection in a quick-setup mode.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient, DataType
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create a collection
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5,
+)
+
+```
+
+```java
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in quick setup mode
+CreateCollectionReq quickSetupReq = CreateCollectionReq.builder()
+ .collectionName("quick_setup")
+ .dimension(5)
+ .build();
+
+client.createCollection(quickSetupReq);
+```
+
+```javascript
+const address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection in quick setup mode
+await client.createCollection({
+ collection_name: "quick_setup",
+ dimension: 5,
+});
+```
+
+
+
+
notes
+
+
In the above code snippet, the index of the collection has been created along with the collection, indicating that the collection is loaded upon creation.
+
+
+
+## List Partitions
+
+Once a collection is ready, you can list its partitions.
+
+
+
+To list partitions, use [`list_partitions()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/list_partitions.md).
+
+
+
+
+
+To list partitions, use [`listPartitions()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/listPartitions.md).
+
+
+
+
+
+To list partitions, use [`listPartitions()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/listPartitions.md).
+
+
+
+
+
+```python
+# 3. List partitions
+res = client.list_partitions(collection_name="quick_setup")
+print(res)
+
+# Output
+#
+# ["_default"]
+```
+
+```java
+import io.milvus.v2.service.partition.request.ListPartitionsReq;
+
+// 3. List all partitions in the collection
+ListPartitionsReq listPartitionsReq = ListPartitionsReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+List partitionNames = client.listPartitions(listPartitionsReq);
+
+System.out.println(partitionNames);
+
+// Output:
+// ["_default"]
+```
+
+```javascript
+// 3. List partitions
+res = await client.listPartitions({
+ collection_name: "quick_setup"
+})
+
+console.log(res.partition_names)
+
+// Output
+//
+// [ '_default' ]
+//
+```
+
+The output of the above code snippet includes the names of the partitions within the specified collection.
+
+
+
+
notes
+
+
If you have set a field as the partition key in a collection, Milvus creates at least 64 partitions along with the collection. When listing the partitions, the results may differ from the output of the above code snippets.
+
For details, refer to Use Partition Key.
+
+
+
+## Create Partitions
+
+You can add more partitions to the collection. A collection can have up to 64 partitions.
+
+
+
+To create partitions, use [`create_partition()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/create_partition.md).
+
+
+
+
+
+To create partitions, use [`createPartition()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/createPartition.md).
+
+
+
+
+
+To create partitions, use [`createPartition()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/createPartition.md).
+
+
+
+
+
+```python
+# 4. Create more partitions
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="partitionB"
+)
+
+res = client.list_partitions(collection_name="quick_setup")
+print(res)
+
+# Output
+#
+# ["_default", "partitionA", "partitionB"]
+```
+
+```java
+import io.milvus.v2.service.partition.request.CreatePartitionReq;
+
+// 4. Create more partitions
+CreatePartitionReq createPartitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+client.createPartition(createPartitionReq);
+
+createPartitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionB")
+ .build();
+
+client.createPartition(createPartitionReq);
+
+listPartitionsReq = ListPartitionsReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+partitionNames = client.listPartitions(listPartitionsReq);
+
+System.out.println(partitionNames);
+
+// Output:
+// [
+// "_default",
+// "partitionA",
+// "partitionB"
+// ]
+```
+
+```javascript
+// 4. Create more partitions
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionB"
+})
+
+res = await client.listPartitions({
+ collection_name: "quick_setup"
+})
+
+console.log(res.partition_names)
+
+// Output
+//
+// [ '_default', 'partitionA', 'partitionB' ]
+//
+```
+
+The code snippet above creates a partition in a collection and lists the partitions of the collection.
+
+
+
+
notes
+
+
If you have set a field as the partition key in a collection, Milvus takes care of managing the partitions in the collection. Therefore, you may encounter prompted errors when attempting to create partitions.
+
For details, refer to Use Partition Key.
+
+
+
+## Check for a Specific Partition
+
+You can also check the existence of a specific partition.
+
+
+
+To check for a specific partition, use [`has_partition()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/has_partition.md).
+
+
+
+
+
+To check for a specific partition, use [`hasPartition()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/hasPartition.md).
+
+
+
+
+
+To check for a specific partition, use [`hasPartition()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/hasPartition.md).
+
+
+
+
+
+```python
+# 5. Check whether a partition exists
+res = client.has_partition(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+print(res)
+
+# Output
+#
+# True
+
+res = client.has_partition(
+ collection_name="quick_setup",
+ partition_name="partitionC"
+)
+print(res)
+
+# Output
+#
+# False
+```
+
+```java
+import io.milvus.v2.service.partition.request.HasPartitionReq;
+
+// 5. Check whether a partition exists
+HasPartitionReq hasPartitionReq = HasPartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+boolean exists = client.hasPartition(hasPartitionReq);
+
+System.out.println(exists);
+
+// Output:
+// true
+
+hasPartitionReq = HasPartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionC")
+ .build();
+
+exists = client.hasPartition(hasPartitionReq);
+
+System.out.println(exists);
+
+// Output:
+// false
+```
+
+```javascript
+// 5. Check whether a partition exists
+res = await client.hasPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+console.log(res.value)
+
+// Output
+//
+// true
+//
+
+res = await client.hasPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionC"
+})
+
+console.log(res.value)
+
+// Output
+//
+// false
+//
+```
+
+The code snippet above checks whether the collection has a partition named `partitionA` and `partitionC`.
+
+## Load & Release Partitions
+
+You can load and release specific partitions to make them available or unavailable for searches and queries.
+
+### Get Load Status
+
+
+
+To check the load status of a collection and its partitions, use [`get_load_state()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/get_load_state.md).
+
+
+
+
+
+To check the load status of a collection and its partitions, use [`getLoadState()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/getLoadState.md).
+
+
+
+
+
+To check the load status of a collection and its partitions, use [`getLoadState()`](https://milvus.io/api-reference/node/v2.4.x/Management/getLoadState.md).
+
+
+
+
+
+```python
+# Release the collection
+client.release_collection(collection_name="quick_setup")
+
+# Check the load status
+res = client.get_load_state(collection_name="quick_setup")
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+
+res = client.get_load_state(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+
+res = client.get_load_state(
+ collection_name="quick_setup",
+ partition_name="partitionB"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+
+```
+
+```java
+import io.milvus.v2.service.collection.request.GetLoadStateReq;
+import io.milvus.v2.service.collection.request.ReleaseCollectionReq;
+import io.milvus.v2.service.partition.request.LoadPartitionsReq;
+import io.milvus.v2.service.partition.request.ReleasePartitionsReq;
+
+// 6. Load a partition independantly
+// 6.1 Release the collection
+ReleaseCollectionReq releaseCollectionReq = ReleaseCollectionReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+client.releaseCollection(releaseCollectionReq);
+
+// 6.2 Load partitionA
+LoadPartitionsReq loadPartitionsReq = LoadPartitionsReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(List.of("partitionA"))
+ .build();
+
+client.loadPartitions(loadPartitionsReq);
+
+Thread.sleep(3000);
+
+// 6.3 Check the load status of the collection and its partitions
+GetLoadStateReq getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+boolean state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionB")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// false
+```
+
+```javascript
+// 6. Load a partition indenpendantly
+await client.releaseCollection({
+ collection_name: "quick_setup"
+})
+
+res = await client.getLoadState({
+ collection_name: "quick_setup"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateNotLoad
+//
+
+await client.loadPartitions({
+ collection_name: "quick_setup",
+ partition_names: ["partitionA"]
+})
+
+await sleep(3000)
+
+res = await client.getLoadState({
+ collection_name: "quick_setup"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+
+res = await client.getLoadState({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+
+res = await client.getLoadState({
+ collection_name: "quick_setup",
+ partition_name: "partitionB"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+Possible load status may be either of the following
+
+- __Loaded__
+
+ A collection is marked as `Loaded` if at least one of its partitions has been loaded.
+
+- __NotLoad__
+
+ A collection is marked as `NotLoad` if none of its partitions has been loaded.
+
+- __Loading__
+
+ A collection is marked as Loading if at least one of its partitions is in the loading process.
+
+
+### Load Partitions
+
+
+
+To load all partitions of a collection, you can just call [`load_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/load_collection.md). To load specific partitions of a collection, use [`load_partitions()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/load_partitions.md).
+
+
+
+
+
+To load all partitions of a collection, you can just call [`loadCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/loadCollection.md). To load specific partitions of a collection, use [`loadPartitions()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/loadPartitions.md).
+
+
+
+
+
+To load all partitions of a collection, you can just call [`loadCollection()`](https://milvus.io/api-reference/node/v2.4.x/Management/loadCollection.md). To load specific partitions of a collection, use [`loadPartitions()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/loadPartitions.md).
+
+
+
+
+
+```python
+client.load_partitions(
+ collection_name="quick_setup",
+ partition_names=["partitionA"]
+)
+
+res = client.get_load_state(collection_name="quick_setup")
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+LoadPartitionsReq loadPartitionsReq = LoadPartitionsReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(List.of("partitionA"))
+ .build();
+
+client.loadPartitions(loadPartitionsReq);
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+```
+
+```javascript
+await client.loadPartitions({
+ collection_name: "quick_setup",
+ partition_names: ["partitionA"]
+})
+
+res = await client.getLoadState({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+To load multiple partitions at a time, do as follows:
+
+
+
+```python
+client.load_partitions(
+ collection_name="quick_setup",
+ partition_names=["partitionA", "partitionB"]
+)
+
+res = client.get_load_status(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+# Output
+#
+# {
+# "state": ""
+# }
+
+res = client.get_load_status(
+ collection_name="quick_setup",
+ partition_name="partitionB"
+)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+```java
+LoadPartitionsReq loadPartitionsReq = LoadPartitionsReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(List.of("partitionA", "partitionB"))
+ .build();
+
+client.loadPartitions(loadPartitionsReq);
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionB")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+```
+
+```javascript
+await client.loadPartitions({
+ collection_name: "quick_setup",
+ partition_names: ["partitionA", "partitionB"]
+})
+
+res = await client.getLoadState({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+console.log(res)
+
+// Output
+//
+// LoadStateLoaded
+//
+
+res = await client.getLoadState({
+ collection_name: "quick_setup",
+ partition_name: "partitionB"
+})
+
+console.log(res)
+
+// Output
+//
+// LoadStateLoaded
+//
+```
+
+### Release Partitions
+
+
+
+To release all partitions of a collection, you can just call [`release_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/release_collection.md). To release specific partitions of a collection, use [`release_partitions()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/release_partitions.md).
+
+
+
+
+
+To release all partitions of a collection, you can just call [`releaseCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Management/releaseCollection.md). To release specific partitions of a collection, use [`releasePartitions()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/releasePartitions.md).
+
+
+
+
+
+To release all partitions of a collection, you can just call [`releaseCollection()`](https://milvus.io/api-reference/node/v2.4.x/Management/releaseCollection.md). To release specific partitions of a collection, use [`releasePartitions()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/releasePartitions.md).
+
+
+
+
+
+```python
+# 7. Release a partition
+client.release_partitions(
+ collection_name="quick_setup",
+ partition_names=["partitionA"]
+)
+
+res = client.get_load_state(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "state": ""
+# }
+
+```
+
+```java
+import io.milvus.v2.service.partition.request.ReleasePartitionsReq;
+
+// 7. Release a partition
+ReleasePartitionsReq releasePartitionsReq = ReleasePartitionsReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(List.of("partitionA"))
+ .build();
+
+client.releasePartitions(releasePartitionsReq);
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// false
+```
+
+```javascript
+// 7. Release a partition
+await client.releasePartitions({
+ collection_name: "quick_setup",
+ partition_names: ["partitionA"]
+})
+
+res = await client.getLoadState({
+ collection_name: "quick_setup"
+})
+
+console.log(res.state)
+
+// Output
+//
+// LoadStateNotLoad
+//
+```
+
+To release multiple partitions at a time, do as follows:
+
+```python
+client.release_partitions(
+ collection_name="quick_setup",
+ partition_names=["_default", "partitionA", "partitionB"]
+)
+
+res = client.get_load_status(
+ collection_name="quick_setup",
+)
+
+# Output
+#
+# {
+# "state": ""
+# }
+```
+
+## Drop Partitions
+
+Once you release a partition, you can drop it if it is no longer needed.
+
+
+
+To drop a partition, use [`drop_partition()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/drop_partition.md).
+
+
+
+
+
+To drop a partition, use [`dropPartition()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/dropPartition.md).
+
+
+
+
+
+To drop a partition, use [`dropPartition()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/dropPartition.md).
+
+
+
+
+
+```python
+# 8. Drop a partition
+client.drop_partition(
+ collection_name="quick_setup",
+ partition_name="partitionB"
+)
+
+res = client.list_partitions(collection_name="quick_setup")
+print(res)
+
+# Output
+#
+# ["_default", "partitionA"]
+```
+
+```java
+import io.milvus.v2.service.partition.request.ReleasePartitionsReq;
+
+ReleasePartitionsReq releasePartitionsReq = ReleasePartitionsReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(List.of("_default", "partitionA", "partitionB"))
+ .build();
+
+client.releasePartitions(releasePartitionsReq);
+
+getLoadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+state = client.getLoadState(getLoadStateReq);
+
+System.out.println(state);
+
+// Output:
+// false
+```
+
+```javascript
+
+await client.releasePartitions({
+ collection_name: "quick_setup",
+ partition_names: ["_default", "partitionA", "partitionB"]
+})
+
+res = await client.getLoadState({
+ collection_name: "quick_setup"
+})
+
+console.log(res)
+
+// Output
+//
+// {
+// status: {
+// error_code: 'Success',
+// reason: '',
+// code: 0,
+// retriable: false,
+// detail: ''
+// },
+// state: 'LoadStateNotLoad'
+// }
+//
+```
+
+
+
+
notes
+
+
Before dropping a partition, you need to release it from memory.
+
+
+
+## FAQ
+
+- __How much data can be stored in a partition?__
+
+ It is recommended to store less than 1B of data in a partition.
+
+- __What is the maximum number of partitions that can be created?__
+
+ By default, Milvus allows a maximum of 4,096 partitions to be created. You can adjust the maximum number of partitions by configuring `rootCoord.maxPartitionNum`. For details, refer to [System Configurations](https://milvus.io/docs/configure_rootcoord.md#rootCoordmaxPartitionNum).
+
+- __How can I differentiate between partitions and partition keys?__
+
+ Partitions are physical storage units, whereas partition keys are logical concepts that automatically assign data to specific partitions based on a designated column.
+
+ For instance, in Milvus, if you have a collection with a partition key defined as the `color` field, the system automatically assigns data to partitions based on the hashed values of the `color` field for each entity. This automated process relieves the user of the responsibility to manually specify the partition when inserting or searching data.
+
+ On the other hand, when manually creating partitions, you need to assign data to each partition based on the criteria of the partition key. If you have a collection with a `color` field, you would manually assign entities with a `color` value of `red` to `partition A`, and entities with a `color` value of `blue` to `partition B`. This manual management requires more effort.
+
+ In summary, both partitions and partition keys are utilized to optimize data computation and enhance query efficiency. It is essential to recognize that enabling a partition key means surrendering control over the manual management of partition data insertion and loading, as these processes are fully automated and handled by Milvus.
diff --git a/preview/site/en/userGuide/manage_collections.md b/preview/site/en/userGuide/manage_collections.md
deleted file mode 100644
index 51071bf4f..000000000
--- a/preview/site/en/userGuide/manage_collections.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-id: manage_collections.md
-title: Manage Collections
----
-
-# Manage Collections
-
-A Milvus collection is similar to a table in traditional databases and is used to store and manage data. Learn about the collection-level operations.
-
-- [Create a Collection](create_collection.md): Create a collection with the book collection example.
-
-- [Check Collection Information](check_collection.md): Check the basic information of a collection in Milvus including its name, number of entities, and more.
-
-- [Drop a Collection](drop_collection.md): Caution is needed as the delete operation irreversibly drops the collection and all data within it.
-
-- [Manage Collection Alias](collection_alias.md): Milvus supports specifying a unique alias for a collection.
-
-- [Load a Collection](load_collection.md): Load the collection to memory before a search or a query. Milvus 2.1 now supports loading a collection as multiple replicas.
-
-- [Release a Collection](release_collection.md): Release a collection from memory after a search or a query to reduce memory usage.
diff --git a/preview/site/en/userGuide/manage_connection.md b/preview/site/en/userGuide/manage_connection.md
deleted file mode 100644
index 47fe41e08..000000000
--- a/preview/site/en/userGuide/manage_connection.md
+++ /dev/null
@@ -1,268 +0,0 @@
----
-id: manage_connection.md
-related_key: connect Milvus
-summary: Learn how to connect to a Milvus server.
----
-
-# Manage Milvus Connections
-
-This topic describes how to connect to and disconnect from a Milvus server.
-
-
- Ensure to connect to a Milvus server before any operations.
-
-
-Milvus supports two ports, port `19530` and port `9091`:
-
-- Port `19530` is for gRPC. It is the default port when you connect to a Milvus server with different Milvus SDKs.
-
-- Port `9091` is for RESTful API. It is used when you connect to a Milvus server with an HTTP client.
-
-The example below connects to the Milvus server with host as `localhost` and port as `19530` or `9091`, and disconncets from it. If the connection is refused, try unblocking the corresponding port.
-
-## Connect to a Milvus server
-
-Construct a Milvus connection. Ensure to connect to Milvus server before any operations.
-
-
-
-
-```python
-# Run `python3` in your terminal to operate in the Python interactive mode.
-from pymilvus import connections
-connections.connect(
- alias="default",
- host='localhost',
- port='19530'
-)
-```
-
-```javascript
-import { MilvusClient } from "@zilliz/milvus2-sdk-node";
-const address = "localhost:19530";
-const milvusClient = new MilvusClient(address);
-```
-
-```go
-milvusClient, err := client.NewGrpcClient(
- context.Background(), // ctx
- "localhost:19530", // addr
-)
-if err != nil {
- log.Fatal("failed to connect to Milvus:", err.Error())
-}
-```
-
-```java
-final MilvusServiceClient milvusClient = new MilvusServiceClient(
- ConnectParam.newBuilder()
- .withHost("localhost")
- .withPort(19530)
- .build()
-);
-```
-
-```shell
-connect -h localhost -p 19530 -a default
-```
-
-```curl
-curl localhost:9091/api/v1/health
-{"status":"ok"}
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- alias |
- Alias of the Milvus connection to construct. |
-
-
- host |
- IP address of the Milvus server. |
-
-
- port |
- Port of the Milvus server. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- address |
- Address of the Milvus connection to construct. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- addr |
- Address of the Milvus connection to construct. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- Host |
- IP address of the Milvus server. |
-
-
- Port |
- Port of the Milvus server. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -h (Optional) |
- The host name. The default is "127.0.0.1". |
-
-
- -p (Optional) |
- The port number. The default is "19530". |
-
-
- -a (Optional) |
- The alias name of the Milvus link. The default is "default". |
-
-
- -D (Optional) |
- Flag to disconnect from the Milvus server specified by an alias. The default alias is "default". |
-
-
-
-
-
-
-### Return
-
-A Milvus connection created by the passed parameters.
-
-### Raises
-
-
- - NotImplementedError: If handler in connection parameters is not GRPC.
- - ParamError: If pool in connection parameters is not supported.
- - Exception: If server specified in parameters is not ready, we cannot connect to server.
-
-
-
-
-
-## Disconnect from a Milvus server
-
-Disconnect from a Milvus server.
-
-
-
-
-```python
-connections.disconnect("default")
-```
-
-
-```javascript
-await milvusClient.closeConnection();
-```
-
-```go
-milvusClient.Close()
-```
-
-```java
-milvusClient.close()
-```
-
-```shell
-connect -D
-```
-
-```curl
-# Close your HTTP client connection.
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- alias |
- Alias of the Milvus server to disconnect from. |
-
-
-
-
-## Limits
-
-The maximum number of connections is 65,536.
-
-## What's next
-
-Having connected to a Milvus server, you can:
-
-- [Create a collection](create_collection.md)
-- [Manage data](insert_data.md)
-- [Build a vector index](build_index.md)
-- [Conduct a vector search](search.md)
-- [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/manage_data.md b/preview/site/en/userGuide/manage_data.md
deleted file mode 100644
index b5b91a5f0..000000000
--- a/preview/site/en/userGuide/manage_data.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-id: manage_data.md
-title: Manage Data
----
-
-# Manage Data
-
-Data in Milvus are called entities. An entity consists of a group of fields and is used to represent unstructured data like images, magazine articles, short videos, and more.
-
-- [Insert Data](insert_data.md): Prepare and insert entities into Milvus. Milvus 2.1 now supports VARCHAR data type on scalar field.
-
-- [Delete Data](delete_data.md): Milvus supports deleting entities by primary key filtered with boolean expression.
-
-- [Compact Data](compact_data.md): Milvus supports automatic data compaction by default. You can still compact data manually and check the compaction status.
diff --git a/preview/site/en/userGuide/manage_databases.md b/preview/site/en/userGuide/manage_databases.md
new file mode 100644
index 000000000..1360685ff
--- /dev/null
+++ b/preview/site/en/userGuide/manage_databases.md
@@ -0,0 +1,638 @@
+---
+id: manage_databases.md
+title: Manage Databases
+---
+
+# Manage Databases
+
+Similar to traditional database engines, you can also create databases in Milvus and allocate privileges to certain users to manage them. Then such users have the right to manage the collections in the databases. A Milvus cluster supports a maximum of 64 databases.
+
+
+
+## Create database
+
+
+
+Use [connect()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Connections/connect.md) to connect to the Milvus server and [create_database()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/db/create_database.md) to create a new database:
+
+
+
+
+
+Use [MilvusClient](https://milvus.io/api-reference/java/v2.4.x/v1/Connections/MilvusClient.md) to connect to the Milvus server and [createDatabase()](https://milvus.io/api-reference/java/v2.4.x/v1/Database/createDatabase.md) to create a new database:
+
+
+
+
+
+Use [MilvusClient](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) to connect to the Milvus server and [createDatabase()](https://milvus.io/api-reference/node/v2.4.x/Database/createDatabase.md) to create a new database:
+
+
+
+
+
+```python
+from pymilvus import connections, db
+
+conn = connections.connect(host="127.0.0.1", port=19530)
+
+database = db.create_database("book")
+```
+
+```java
+import io.milvus.client.MilvusServiceClient;
+import io.milvus.param.ConnectParam;
+import io.milvus.param.collection.CreateDatabaseParam;
+
+// 1. Connect to Milvus server
+ConnectParam connectParam = ConnectParam.newBuilder()
+ .withUri(CLUSTER_ENDPOINT)
+ .withToken(TOKEN)
+ .build();
+
+MilvusServiceClient client = new MilvusServiceClient(connectParam);
+
+// 3. Create a new database
+CreateDatabaseParam createDatabaseParam = CreateDatabaseParam.newBuilder()
+ .withDatabaseName("my_database")
+ .build();
+
+R response = client.createDatabase(createDatabaseParam);
+```
+
+```javascript
+const address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 3. Create a database
+res = await client.createDatabase({
+ db_name: "my_db"
+})
+
+console.log(res)
+
+// {
+// error_code: 'Success',
+// reason: '',
+// code: 0,
+// retriable: false,
+// detail: ''
+// }
+```
+
+The above code snippets connects to the default database and creates a new database named `my_database`.
+
+## Use a database
+
+A Milvus cluster ships with a default database, named 'default'. Collections are created in the default database unless otherwise specified.
+
+To change the default database, do as follows:
+
+
+
+```python
+db.using_database("book")
+```
+
+```java
+// No equivalent method is available.
+```
+
+```javascript
+// 4. Activate another database
+res = await client.useDatabase({
+ db_name: "my_db"
+})
+
+console.log(res)
+```
+
+You can also set a database to use upon connecting to your Milvus cluster as follows:
+
+
+
+```python
+conn = connections.connect(
+ host="127.0.0.1",
+ port="19530",
+ db_name="my_database"
+)
+```
+
+```java
+ConnectParam connectParam = ConnectParam.newBuilder()
+ .withDatabaseName("my_database")
+ .withUri(CLUSTER_ENDPOINT)
+ .withToken(TOKEN)
+ .build();
+
+MilvusServiceClient client = new MilvusServiceClient(connectParam);
+```
+
+```javascript
+const address = "http://localhost:19530";
+const db_name = "my_database";
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address, db_name});
+```
+
+## List databases
+
+
+
+To find all existing databases in your Milvus cluster, use the [list_database()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/db/list_database.md) method:
+
+
+
+
+
+To find all existing databases in your Milvus cluster, use the [listDatabases()](https://milvus.io/api-reference/java/v2.4.x/v1/Database/listDatabases.md) method:
+
+
+
+
+
+To find all existing databases in your Milvus cluster, use the [listDatabases()](https://milvus.io/api-reference/node/v2.4.x/Database/listDatabases.md) method:
+
+
+
+
+
+```python
+db.list_database()
+
+# Output
+['default', 'my_database']
+```
+
+```java
+import io.milvus.grpc.ListDatabasesResponse;
+import io.milvus.param.R;
+
+// 2. List all databases
+R listDatabasesResponse = client.listDatabases();
+System.out.println(listDatabasesResponse.getData());
+
+// status {
+// }
+// db_names: "default"
+// db_names: "my_database"
+// created_timestamp: 1716794498117757990
+// created_timestamp: 1716797196479639477
+```
+
+```javascript
+res = await client.listDatabases()
+
+console.log(res.db_names)
+
+// [ 'default', 'my_db' ]
+```
+
+## Drop database
+
+To drop a database, you have to drop all its collections first. Otherwise, the drop fails.
+
+
+
+To drop a database, use the [drop_database()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/db/drop_database.md) method:
+
+
+
+
+
+To drop a database, use the [dropDatabase()](https://milvus.io/api-reference/java/v2.4.x/v1/Database/dropDatabase.md) method:
+
+
+
+
+
+To drop a database, use the [dropDatabase()](https://milvus.io/api-reference/node/v2.4.x/Database/dropDatabase.md) method:
+
+
+
+
+
+```python
+db.drop_database("book")
+
+db.list_database()
+
+# Output
+['default']
+```
+
+```java
+import io.milvus.param.collection.DropDatabaseParam;
+
+DropDatabaseParam dropDatabaseParam = DropDatabaseParam.newBuilder()
+ .withDatabaseName("my_database")
+ .build();
+
+response = client.dropDatabase(dropDatabaseParam);
+```
+
+```javascript
+res = await client.dropDatabase({
+ db_name: "my_db"
+})
+```
+
+## Use RBAC with database
+
+RBAC also covers database operations and ensures forward compatibility. The word **database** in the Permission APIs (Grant / Revoke / List Grant) has the following meanings:
+
+- If neither a Milvus connection nor a Permission API call specifies a `db_name`, **database** refers to the default database.
+- If a Milvus connection specifies a `db_name`, but a Permission API call afterward does not, **database** refers to the database whose name was specified in the Milvus connection.
+- If a Permission API call is made upon a Milvus connection, with or without `db_name` specified, **database** refers to the database whose name was specified in the Permission API call.
+
+The following code snippet is shared among the listed blocks below.
+
+
+
+```python
+from pymilvus import connections, Role
+
+_URI = "http://localhost:19530"
+_TOKEN = "root:Milvus"
+_DB_NAME = "default"
+
+
+def connect_to_milvus(db_name="default"):
+ print(f"connect to milvus\n")
+ connections.connect(
+ uri=_URI,
+ token=_TOKEN,
+ db_name=db_name
+ )
+```
+
+```java
+String URI = "http://localhost:19530";
+String TOKEN = "root:Milvus";
+
+public class ConnectToMilvus {
+ private String _dbName = "default";
+
+ public newBuilder() {}
+
+ public MilvusServiceClient build() {
+ ConnectParam connectParam = ConnectParam.newBuilder()
+ .withUri(URI)
+ .withToken(TOKEN)
+ .withDatabaseName(_dbNAME)
+ .build();
+
+ return new MilvusServiceClient(connectParam);
+ }
+
+ public newBuilder withDbName(String dbName) {
+ this._dbName = dbName;
+ return this;
+ }
+}
+```
+
+```javascript
+const address = "http://localhost:19530";
+const token = "root:Milvus";
+
+function connectToMilvus(dbName="default") {
+ const client = new MilvusClient({
+ address,
+ token,
+ dbName
+ });
+
+ return client;
+}
+```
+
+- If neither a Milvus connection nor a Permission API call specifies a `db_name`, **database** refers to the default database.
+
+
+
+ ```python
+ _ROLE_NAME = "test_role"
+ _PRIVILEGE_INSERT = "Insert"
+
+ connect_to_milvus()
+ role = Role(_ROLE_NAME)
+ role.create()
+
+ connect_to_milvus()
+ role.grant("Collection", "*", _PRIVILEGE_INSERT)
+ print(role.list_grants())
+ print(role.list_grant("Collection", "*"))
+ role.revoke("Global", "*", _PRIVILEGE_INSERT)
+ ```
+
+ ```java
+ String ROLE_NAME = "test_role";
+ String PRIVILEGE_INSERT = "Insert";
+
+ MilvusServiceClient client = new ConnectToMilvus().build();
+ R response = client.createRole(CreateRoleParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+
+ response = client.grantRolePrivilege(GrantRolePriviledgeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+
+ R grants = client.selectGrantForRole(SelectGrantForRoleParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ grants = client.selectGrantForRoleAndObject(SelectGrantForRoleAndObjectParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ response = client.revokeRolePrivilege(RevokeRolePrivilegeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Global")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+
+ response = client.revokeRolePrivilege(RevokeRolePrivilegeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Global")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+ ```
+
+ ```javascript
+ const ROLE_NAME = "test_role";
+ const PRIVILEGE_INSERT = "Insert";
+
+ const client = connectToMilvus();
+
+ async function demo() {
+
+ }
+ await client.createRole({
+ roleName: ROLE_NAME
+ })
+
+ const grants = await client.listGrants({
+ roleName: ROLE_NAME
+ })
+
+ console.log(grants.grants);
+
+ await client.revokePrivilege({
+ roleName: ROLE_NAME,
+ object: "Global",
+ objectName: "*",
+ privilege: PRIVILEGE_INSERT
+ })
+ ```
+
+- If a Milvus connection specifies a `db_name`, but a Permission API call afterward does not, **database** refers to the database whose name was specified in the Milvus connection.
+
+
+
+ ```python
+ # NOTE: please make sure the 'foo' db has been created
+ connect_to_milvus(db_name="foo")
+
+ # This role will have the insert permission of all collections under foo db,
+ # excluding the insert permissions of collections under other dbs
+ role.grant("Collection", "*", _PRIVILEGE_INSERT)
+ print(role.list_grants())
+ print(role.list_grant("Collection", "*"))
+ role.revoke("Global", "*", _PRIVILEGE_INSERT)
+ ```
+
+ ```java
+ // NOTE: please make sure the 'foo' db has been created
+ MilvusServiceClient client = new ConnectToMilvus().withDbName("foo").build();
+
+ // This role will have the insert permission of all collections under foo db,
+ // excluding the insert permissions of collections under other dbs
+ R response = client.grantRolePrivilege(GrantRolePriviledgeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+
+ R grants = client.selectGrantForRole(SelectGrantForRoleParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ grants = client.selectGrantForRoleAndObject(SelectGrantForRoleAndObjectParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ response = client.revokeRolePrivilege(RevokeRolePrivilegeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Global")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+ ```
+
+ ```javascript
+ const client = connectToMilvus("foo");
+
+ async function demo() {
+
+ }
+ await client.createRole({
+ roleName: ROLE_NAME
+ })
+
+ const grants = await client.listGrants({
+ roleName: ROLE_NAME
+ })
+
+ console.log(grants.grants);
+
+ await client.revokePrivilege({
+ roleName: ROLE_NAME,
+ object: "Global",
+ objectName: "*",
+ privilege: PRIVILEGE_INSERT
+ })
+ ```
+
+- If a Permission API call is made upon a Milvus connection, with or without `db_name` specified, **database** refers to the database whose name was specified in the Permission API call.
+
+
+
+ ```python
+ # NOTE: please make sure the 'foo' db has been created
+
+ db_name = "foo"
+ connect_to_milvus()
+ role.grant("Collection", "*", _PRIVILEGE_INSERT, db_name=db_name)
+ print(role.list_grants(db_name=db_name))
+ print(role.list_grant("Collection", "*", db_name=db_name))
+ role.revoke("Global", "*", _PRIVILEGE_INSERT, db_name=db_name)
+ ```
+
+ ```java
+ // NOTE: please make sure the 'foo' db has been created
+
+ String dbName = "foo";
+ MilvusServiceClient client = new ConnectToMilvus().build();
+
+ R response = client.grantRolePrivilege(GrantRolePriviledgeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .withDatabaseName(dbName)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+
+ R grants = client.selectGrantForRole(SelectGrantForRoleParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withDatabaseName(dbName)
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ grants = client.selectGrantForRoleAndObject(SelectGrantForRoleAndObjectParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Collection")
+ .withObjectName("*")
+ .withDatabaseName(dbName)
+ .build());
+
+ if (grants.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(grants.getMessage());
+ }
+
+ System.out.println(grants.getData());
+
+ response = client.revokeRolePrivilege(RevokeRolePrivilegeParam.newBuilder()
+ .withRoleName(ROLE_NAME)
+ .withObject("Global")
+ .withObjectName("*")
+ .withPrivilege(PRIVILEGE_INSERT)
+ .withDatabaseName(dbName)
+ .build());
+
+ if (response.getStatus() != R.Status.Success.getCode()) {
+ throw new RuntimeException(response.getMessage());
+ }
+ ```
+
+ ```javascript
+ // The Node.js SDK currently cannot support this case.
+ ```
+
+## What's next
+
+- [Enable RBAC](rbac.md)
+
+- [Multi-tenancy](multi_tenancy.md)
diff --git a/preview/site/en/userGuide/manage_indexes.md b/preview/site/en/userGuide/manage_indexes.md
deleted file mode 100644
index ce535926d..000000000
--- a/preview/site/en/userGuide/manage_indexes.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-id: manage_indexes.md
-title: Manage Indexes
----
-
-# Manage Indexes
-
-Indexing is the process of efficiently organizing data, and it plays a major role in making similarity search useful by dramatically accelerating time-consuming queries on large datasets.
-
-- [Build an Index](build_index.md): Build an index to accelerate your vector similarity search. Milvus 2.1 now supports indexes on the scalar field.
-
-- [Drop an Index](drop_index.md): Dropping an index irreversibly removes all corresponding index files.
diff --git a/preview/site/en/userGuide/manage_partitions.md b/preview/site/en/userGuide/manage_partitions.md
deleted file mode 100644
index a0326d746..000000000
--- a/preview/site/en/userGuide/manage_partitions.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-id: manage_partitions.md
-title: Manage Partitions
----
-
-# Manage Partitions
-
-A partition is a division of a collection. Milvus supports dividing collection data into multiple parts on physical storage so that search and other operations can be limited to one partition to improve performance. Learn about the partition-level operations.
-
-- [Create a Partition](create_partition.md): Create a partition with the example of creating a novel partition within a book collection.
-
-- [Check Partition Information](check_partition.md): Check the basic information of a partition in Milvus including its name.
-
-- [Drop a Partition](drop_partition.md): Caution is needed as the delete operation irreversibly drops the partition and all data within it.
-
-- [Load a Partition](load_partition.md): Load the partition to memory before a search or a query instead of loading the whole collection can significantly reduce memory usage. Milvus 2.1 now supports loading a partition as multiple replicas.
-
-- [Release a Partition](release_partition.md): Release a partition from memory after a search or a query to reduce memory usage.
diff --git a/preview/site/en/userGuide/modify_collection.md b/preview/site/en/userGuide/modify_collection.md
deleted file mode 100644
index e970c8c23..000000000
--- a/preview/site/en/userGuide/modify_collection.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-id: modify_collection.md
-related_key: modify collection
-summary: Learn how to modify the properties of a collection in Milvus.
----
-
-# Modify a collection
-
-This topic describes how to modify the properties, especially the time to live (TTL), of a collection.
-
-Currently, the TTL feature is only available in Python.
-
-```
-collection.set_properties(properties={"collection.ttl.seconds": 1800})
-```
-
-The example above changes the collection TTL to 1800 seconds.
-
-| Parameter | Description | Option |
-| ---------------------------------- | ------------------------------------------------------------ | ----------------------------------- |
-| Properties: collection.ttl.seconds | Collection time to live (TTL) is the expiration time of data in a collection. Expired data in the collection will be cleaned up and will not be involved in searches or queries. Specify TTL in the unit of seconds. | The value should be 0 or greater. The default value is 0, which means TTL is disabled. |
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/release_collection.md b/preview/site/en/userGuide/release_collection.md
deleted file mode 100644
index 1bbc1631f..000000000
--- a/preview/site/en/userGuide/release_collection.md
+++ /dev/null
@@ -1,188 +0,0 @@
----
-id: release_collection.md
-related_key: release collection
-summary: Learn how to release a collection from memory in Milvus.
----
-
-# Release a Collection
-
-This topic describes how to release a collection from memory after a search or a query to reduce memory usage.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.release()
-```
-
-```javascript
-await milvusClient.collectionManager.releaseCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.ReleaseCollection(
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("failed to release collection:", err.Error())
-}
-```
-
-```java
-milvusClient.releaseCollection(
- ReleaseCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-release -c book
-```
-
-``` curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-
-Output:
-
-```json
-{}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name (optional) |
- Name of the partition to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to release. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to release. |
-
-
- -p (Optional/Multiple) |
- The name of the partition to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to release. |
-
-
-
-
-## Constraints
-
-- Releasing the collection that is successfully loaded is allowed.
-- Releasing the collection is allowed when its partition(s) are loaded.
-- Error will be returned at the attempt to release partition(s) when the parent collection is already loaded. Future releases will support releasing partitions from a loaded collection, and loading the collection when its partition(s) are released.
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Create a partition](create_partition.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
diff --git a/preview/site/en/userGuide/release_partition.md b/preview/site/en/userGuide/release_partition.md
deleted file mode 100644
index 83e0fbebc..000000000
--- a/preview/site/en/userGuide/release_partition.md
+++ /dev/null
@@ -1,199 +0,0 @@
----
-id: release_partition.md
-related_key: release partition
-summary: Learn how to release a partition into memory for search or query in Milvus.
----
-
-# Release a Partition
-
-This topic describes how to release a partition from memory after a search or a query to reduce memory usage.
-
-
-
-
-
-```python
-from pymilvus import Partition
-partition = Partition("novel") # Get an existing partition.
-partition.release()
-```
-
-```javascript
-await milvusClient.partitionManager.releasePartitions({
- collection_name: "book",
- partition_names: ["novel"],
- });
-```
-
-```go
-err := milvusClient.ReleasePartitions(
- context.Background(), // ctx
- "book", // CollectionName
- []string{"novel"} // partitionNames
-)
-if err != nil {
- log.Fatal("failed to release partitions:", err.Error())
-}
-```
-
-```java
-milvusClient.releasePartitions(
- ReleasePartitionsParam.newBuilder()
- .withCollectionName("book")
- .withPartitionNames(["novel"])
- .build()
-);
-```
-
-```shell
-release -c book -p novel
-```
-
-``` curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/partitions/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "partition_names": ["novel"],
- "replica_number": 1
- }'
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- partition_name |
- Name of the partition. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to release partitions. |
-
-
- partition_names |
- List of names of the partitions to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- ctx |
- Context to control API invocation process. |
-
-
- CollectionName |
- Name of the collection to release partitions. |
-
-
- partitionNames |
- List of names of the partitions to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- CollectionName |
- Name of the collection to release partition. |
-
-
- PartitionNames |
- List of names of the partitions to release. |
-
-
-
-
-
-
-
- Option |
- Description |
-
-
-
-
- -c |
- Name of the collection to release partition. |
-
-
- -p (Multiple) |
- The name of the partition to release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to release partitions. |
-
-
- partition_names |
- List of names of the partitions to release. |
-
-
-
-
-## Constraints
-
-- Error will be returned at the attempt to load partition(s) when the parent collection is already loaded. Future releases will support releasing partitions from a loaded collection, and (if needed) then loading some other partition(s).
-- "Load successfully" will be returned at the attempt to load the collection that is already loaded.
-- Error will be returned at the attempt to load the collection when the child partition(s) is/are already loaded. Future releases will support loading the collection when some of its partitions are already loaded.
-- Loading different partitions in a same collection via separate RPCs is not allowed.
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Insert data into Milvus](insert_data.md)
- - [Build an index for vectors](build_index.md)
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
diff --git a/preview/site/en/userGuide/search-query-get/get-and-scalar-query.md b/preview/site/en/userGuide/search-query-get/get-and-scalar-query.md
new file mode 100644
index 000000000..8a69ca489
--- /dev/null
+++ b/preview/site/en/userGuide/search-query-get/get-and-scalar-query.md
@@ -0,0 +1,1607 @@
+---
+id: get-and-scalar-query.md
+order: 3
+summary: This guide demonstrates how to get entities by ID and conduct scalar filtering.
+title: Get & Scalar Query
+---
+
+# Get & Scalar Query
+
+This guide demonstrates how to get entities by ID and conduct scalar filtering. A scalar filtering retrieves entities that match the specified filtering conditions.
+
+## Overview
+
+A scalar query filters entities in a collection based on a defined condition using boolean expressions. The query result is a set of entities that match the defined condition. Unlike a vector search, which identifies the closest vector to a given vector in a collection, queries filter entities based on specific criteria.
+
+In Milvus, __a filter is always a string compising field names joined by operators__. In this guide, you will find various filter examples. To learn more about the operator details, go to the [Reference](https://milvus.io/docs/get-and-scalar-query.md#Reference-on-scalar-filters) section.
+
+## Preparations
+
+The following steps repurpose the code to connect to Milvus, quickly set up a collection, and insert over 1,000 randomly generated entities into the collection.
+
+### Step 1: Create a collection
+
+
+
+Use [`MilvusClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) to connect to the Milvus server and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) to create a collection.
+
+
+
+
+
+Use [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) to connect to the Milvus server and [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) to create a collection.
+
+
+
+
+
+Use [`MilvusClient`](https://milvus.io/api-reference/node/v2.4.x/Client/MilvusClient.md) to connect to the Milvus server and [`createCollection()`](https://milvus.io/api-reference/node/v2.4.x/Collections/createCollection.md) to create a collection.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create a collection
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5,
+)
+```
+
+```java
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in quick setup mode
+CreateCollectionReq quickSetupReq = CreateCollectionReq.builder()
+ .collectionName("quick_setup")
+ .dimension(5)
+ .metricType("IP")
+ .build();
+
+client.createCollection(quickSetupReq);
+```
+
+```javascript
+const { MilvusClient, DataType, sleep } = require("@zilliz/milvus2-sdk-node")
+
+const address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection in quick setup mode
+await client.createCollection({
+ collection_name: "quick_setup",
+ dimension: 5,
+});
+```
+
+### Step 2: Insert randomly generated entities
+
+
+
+Use [`insert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/insert.md) to insert entities into the collection.
+
+
+
+
+
+Use [`insert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) to insert entities into the collection.
+
+
+
+
+
+Use [`insert()`](https://milvus.io/api-reference/node/v2.4.x/Vector/insert.md) to insert entities into the collection.
+
+
+
+
+
+```python
+# 3. Insert randomly generated vectors
+colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+data = []
+
+for i in range(1000):
+ current_color = random.choice(colors)
+ current_tag = random.randint(1000, 9999)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": f"{current_color}_{str(current_tag)}"
+ })
+
+print(data[0])
+
+# Output
+#
+# {
+# "id": 0,
+# "vector": [
+# 0.7371107800002366,
+# -0.7290389773227746,
+# 0.38367002049157417,
+# 0.36996000494220627,
+# -0.3641898951462792
+# ],
+# "color": "yellow",
+# "tag": 6781,
+# "color_tag": "yellow_6781"
+# }
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 1000,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(990 more items hidden)"
+# ]
+# }
+```
+
+```java
+// 3. Insert randomly generated vectors into the collection
+List colors = Arrays.asList("green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey");
+List data = new ArrayList<>();
+
+for (int i=0; i<1000; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ int current_tag = rand.nextInt(8999) + 1000;
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("tag", current_tag);
+ row.put("color_tag", current_color + '_' + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+InsertReq insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .build();
+
+InsertResp insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 1000}
+```
+
+```javascript
+// 3. Insert randomly generated vectors
+const colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+var data = []
+
+for (let i = 0; i < 1000; i++) {
+ current_color = colors[Math.floor(Math.random() * colors.length)]
+ current_tag = Math.floor(Math.random() * 8999 + 1000)
+ data.push({
+ "id": i,
+ "vector": [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": `${current_color}_${current_tag}`
+ })
+}
+
+console.log(data[0])
+
+// Output
+//
+// {
+// id: 0,
+// vector: [
+// 0.16022394821966035,
+// 0.6514875214491056,
+// 0.18294484964044666,
+// 0.30227694168725394,
+// 0.47553087493572255
+// ],
+// color: 'blue',
+// tag: 8907,
+// color_tag: 'blue_8907'
+// }
+//
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: data
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 1000
+//
+```
+
+### Step 3: Create partitions and insert more entities
+
+
+
+Use [`create_partition()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Partitions/create_partition.md) to create partitions and [`insert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/insert.md) to insert more entities into the collection.
+
+
+
+
+
+Use [`createPartition()`](https://milvus.io/api-reference/java/v2.4.x/v2/Partitions/createPartition.md) to create partitions and [`insert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) to insert more entities into the collection.
+
+
+
+
+
+Use [`createPartition()`](https://milvus.io/api-reference/node/v2.4.x/Partitions/createPartition.md) to create partitions and [`insert()`](https://milvus.io/api-reference/node/v2.4.x/Vector/insert.md) to insert more entities into the collection.
+
+
+
+
+
+```python
+# 4. Create partitions and insert more entities
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="partitionA"
+)
+
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="partitionB"
+)
+
+data = []
+
+for i in range(1000, 1500):
+ current_color = random.choice(colors)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": f"{current_color}_{str(current_tag)}"
+ })
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data,
+ partition_name="partitionA"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 500,
+# "ids": [
+# 1000,
+# 1001,
+# 1002,
+# 1003,
+# 1004,
+# 1005,
+# 1006,
+# 1007,
+# 1008,
+# 1009,
+# "(490 more items hidden)"
+# ]
+# }
+
+data = []
+
+for i in range(1500, 2000):
+ current_color = random.choice(colors)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": f"{current_color}_{str(current_tag)}"
+ })
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data,
+ partition_name="partitionB"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 500,
+# "ids": [
+# 1500,
+# 1501,
+# 1502,
+# 1503,
+# 1504,
+# 1505,
+# 1506,
+# 1507,
+# 1508,
+# 1509,
+# "(490 more items hidden)"
+# ]
+# }
+```
+
+```java
+// 4. Create partitions and insert some more data
+CreatePartitionReq createPartitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionA")
+ .build();
+
+client.createPartition(createPartitionReq);
+
+createPartitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("partitionB")
+ .build();
+
+client.createPartition(createPartitionReq);
+
+data.clear();
+
+for (int i=1000; i<1500; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ int current_tag = rand.nextInt(8999) + 1000;
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("tag", current_tag);
+ data.add(row);
+}
+
+insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("partitionA")
+ .build();
+
+insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 500}
+
+data.clear();
+
+for (int i=1500; i<2000; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ int current_tag = rand.nextInt(8999) + 1000;
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("tag", current_tag);
+ data.add(row);
+}
+
+insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("partitionB")
+ .build();
+
+insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 500}
+```
+
+```javascript
+// 4. Create partitions and insert more entities
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionA"
+})
+
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "partitionB"
+})
+
+data = []
+
+for (let i = 1000; i < 1500; i++) {
+ current_color = colors[Math.floor(Math.random() * colors.length)]
+ current_tag = Math.floor(Math.random() * 8999 + 1000)
+ data.push({
+ "id": i,
+ "vector": [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": `${current_color}_${current_tag}`
+ })
+}
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: data,
+ partition_name: "partitionA"
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 500
+//
+
+await sleep(5000)
+
+data = []
+
+for (let i = 1500; i < 2000; i++) {
+ current_color = colors[Math.floor(Math.random() * colors.length)]
+ current_tag = Math.floor(Math.random() * 8999 + 1000)
+ data.push({
+ "id": i,
+ "vector": [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": `${current_color}_${current_tag}`
+ })
+}
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: data,
+ partition_name: "partitionB"
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 500
+//
+```
+
+## Get Entities by ID
+
+
+
+If you know the IDs of the entities of your interests, you can use the [`get()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/get.md) method.
+
+
+
+
+
+If you know the IDs of the entities of your interests, you can use the [`get()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/get.md) method.
+
+
+
+
+
+If you know the IDs of the entities of your interests, you can use the [`get()`](https://milvus.io/api-reference/node/v2.4.x/Vector/get.md) method.
+
+
+
+
+
+```python
+# 4. Get entities by ID
+res = client.get(
+ collection_name="quick_setup",
+ ids=[0, 1, 2]
+)
+
+print(res)
+
+# Output
+#
+# [
+# {
+# "id": 0,
+# "vector": [
+# 0.68824464,
+# 0.6552274,
+# 0.33593303,
+# -0.7099536,
+# -0.07070546
+# ],
+# "color_tag": "green_2006",
+# "color": "green"
+# },
+# {
+# "id": 1,
+# "vector": [
+# -0.98531723,
+# 0.33456197,
+# 0.2844234,
+# 0.42886782,
+# 0.32753858
+# ],
+# "color_tag": "white_9298",
+# "color": "white"
+# },
+# {
+# "id": 2,
+# "vector": [
+# -0.9886812,
+# -0.44129863,
+# -0.29859528,
+# 0.06059075,
+# -0.43817034
+# ],
+# "color_tag": "grey_5312",
+# "color": "grey"
+# }
+# ]
+```
+
+```java
+// 5. Get entities by ID
+GetReq getReq = GetReq.builder()
+ .collectionName("quick_setup")
+ .ids(Arrays.asList(0L, 1L, 2L))
+ .build();
+
+GetResp entities = client.get(getReq);
+
+System.out.println(JSONObject.toJSON(entities));
+
+// Output:
+// {"getResults": [
+// {"entity": {
+// "color": "white",
+// "color_tag": "white_4597",
+// "vector": [
+// 0.09665024,
+// 0.1163497,
+// 0.0701347,
+// 0.32577968,
+// 0.40943468
+// ],
+// "tag": 8946,
+// "id": 0
+// }},
+// {"entity": {
+// "color": "green",
+// "color_tag": "green_3039",
+// "vector": [
+// 0.90689456,
+// 0.4377399,
+// 0.75387514,
+// 0.36454988,
+// 0.8702918
+// ],
+// "tag": 2341,
+// "id": 1
+// }},
+// {"entity": {
+// "color": "white",
+// "color_tag": "white_8708",
+// "vector": [
+// 0.9757728,
+// 0.13974023,
+// 0.8023141,
+// 0.61947155,
+// 0.8290197
+// ],
+// "tag": 9913,
+// "id": 2
+// }}
+// ]}
+```
+
+```javascript
+// 5. Get entities by id
+res = await client.get({
+ collection_name: "quick_setup",
+ ids: [0, 1, 2],
+ output_fields: ["vector", "color_tag"]
+})
+
+console.log(res.data)
+
+// Output
+//
+// [
+// {
+// vector: [
+// 0.16022394597530365,
+// 0.6514875292778015,
+// 0.18294484913349152,
+// 0.30227693915367126,
+// 0.47553086280822754
+// ],
+// '$meta': { color: 'blue', tag: 8907, color_tag: 'blue_8907' },
+// id: '0'
+// },
+// {
+// vector: [
+// 0.2459285855293274,
+// 0.4974019527435303,
+// 0.2154673933982849,
+// 0.03719571232795715,
+// 0.8348019123077393
+// ],
+// '$meta': { color: 'grey', tag: 3710, color_tag: 'grey_3710' },
+// id: '1'
+// },
+// {
+// vector: [
+// 0.9404329061508179,
+// 0.49662265181541443,
+// 0.8088793158531189,
+// 0.9337621331214905,
+// 0.8269071578979492
+// ],
+// '$meta': { color: 'blue', tag: 2993, color_tag: 'blue_2993' },
+// id: '2'
+// }
+// ]
+//
+```
+
+### Get entities from partitions
+
+You can also get entities from specific partitions.
+
+
+
+```python
+# 5. Get entities from partitions
+res = client.get(
+ collection_name="quick_setup",
+ ids=[1000, 1001, 1002],
+ partition_names=["partitionA"]
+)
+
+print(res)
+
+# Output
+#
+# [
+# {
+# "color": "green",
+# "tag": 1995,
+# "color_tag": "green_1995",
+# "id": 1000,
+# "vector": [
+# 0.7807706,
+# 0.8083741,
+# 0.17276904,
+# -0.8580777,
+# 0.024156934
+# ]
+# },
+# {
+# "color": "red",
+# "tag": 1995,
+# "color_tag": "red_1995",
+# "id": 1001,
+# "vector": [
+# 0.065074645,
+# -0.44882354,
+# -0.29479212,
+# -0.19798489,
+# -0.77542555
+# ]
+# },
+# {
+# "color": "green",
+# "tag": 1995,
+# "color_tag": "green_1995",
+# "id": 1002,
+# "vector": [
+# 0.027934508,
+# -0.44199976,
+# -0.40262738,
+# -0.041511405,
+# 0.024782438
+# ]
+# }
+# ]
+```
+
+```java
+// 5. Get entities by ID in a partition
+getReq = GetReq.builder()
+ .collectionName("quick_setup")
+ .ids(Arrays.asList(1001L, 1002L, 1003L))
+ .partitionName("partitionA")
+ .build();
+
+entities = client.get(getReq);
+
+System.out.println(JSONObject.toJSON(entities));
+
+// Output:
+// {"getResults": [
+// {"entity": {
+// "color": "yellow",
+// "vector": [
+// 0.4300114,
+// 0.599917,
+// 0.799163,
+// 0.75395125,
+// 0.89947814
+// ],
+// "id": 1001,
+// "tag": 5803
+// }},
+// {"entity": {
+// "color": "blue",
+// "vector": [
+// 0.009218454,
+// 0.64637834,
+// 0.19815737,
+// 0.30519038,
+// 0.8218663
+// ],
+// "id": 1002,
+// "tag": 7212
+// }},
+// {"entity": {
+// "color": "black",
+// "vector": [
+// 0.76521933,
+// 0.7818409,
+// 0.16976339,
+// 0.8719652,
+// 0.1434964
+// ],
+// "id": 1003,
+// "tag": 1710
+// }}
+// ]}
+```
+
+```javascript
+// 5.1 Get entities by id in a partition
+res = await client.get({
+ collection_name: "quick_setup",
+ ids: [1000, 1001, 1002],
+ partition_names: ["partitionA"],
+ output_fields: ["vector", "color_tag"]
+})
+
+console.log(res.data)
+
+// Output
+//
+// [
+// {
+// id: '1000',
+// vector: [
+// 0.014254206791520119,
+// 0.5817716121673584,
+// 0.19793470203876495,
+// 0.8064294457435608,
+// 0.7745839357376099
+// ],
+// '$meta': { color: 'white', tag: 5996, color_tag: 'white_5996' }
+// },
+// {
+// id: '1001',
+// vector: [
+// 0.6073881983757019,
+// 0.05214758217334747,
+// 0.730999231338501,
+// 0.20900958776474,
+// 0.03665429726243019
+// ],
+// '$meta': { color: 'grey', tag: 2834, color_tag: 'grey_2834' }
+// },
+// {
+// id: '1002',
+// vector: [
+// 0.48877206444740295,
+// 0.34028753638267517,
+// 0.6527213454246521,
+// 0.9763909578323364,
+// 0.8031482100486755
+// ],
+// '$meta': { color: 'pink', tag: 9107, color_tag: 'pink_9107' }
+// }
+// ]
+//
+```
+
+
+## Use Basic Operators
+
+In this section, you will find examples of how to use basic operators in scalar filtering. You can apply these filters to [vector searches](https://milvus.io/docs/single-vector-search.md#Filtered-search) and [data deletions](https://milvus.io/docs/insert-update-delete.md#Delete-entities) too.
+
+
+
+For more information, refer to [`query()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/query.md) in the SDK reference.
+
+
+
+
+
+For more information, refer to [`query()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/query.md) in the SDK reference.
+
+
+
+
+
+For more information, refer to [`query()`](https://milvus.io/api-reference/node/v2.4.x/Vector/query.md) in the SDK reference.
+
+
+
+- Filter entities with their tag values falling between 1,000 to 1,500.
+
+
+
+ ```python
+ # 6. Use basic operators
+
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter="1000 < tag < 1500",
+ output_fields=["color_tag"],
+ # highlight-end
+ limit=3
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "id": 1,
+ # "color_tag": "pink_1023"
+ # },
+ # {
+ # "id": 41,
+ # "color_tag": "red_1483"
+ # },
+ # {
+ # "id": 44,
+ # "color_tag": "grey_1146"
+ # }
+ # ]
+ ```
+
+ ```java
+ // 6. Use basic operators
+
+ QueryReq queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("1000 < tag < 1500")
+ .outputFields(Arrays.asList("color_tag"))
+ .limit(3)
+ .build();
+
+ QueryResp queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [
+ // {"entity": {
+ // "color_tag": "white_7588",
+ // "id": 34
+ // }},
+ // {"entity": {
+ // "color_tag": "orange_4989",
+ // "id": 64
+ // }},
+ // {"entity": {
+ // "color_tag": "white_3415",
+ // "id": 73
+ // }}
+ // ]}
+ ```
+
+ ```javascript
+ // 6. Use basic operators
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: "1000 < tag < 1500",
+ output_fields: ["color_tag"],
+ limit: 3
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [
+ // {
+ // '$meta': { color: 'pink', tag: 1050, color_tag: 'pink_1050' },
+ // id: '6'
+ // },
+ // {
+ // '$meta': { color: 'purple', tag: 1174, color_tag: 'purple_1174' },
+ // id: '24'
+ // },
+ // {
+ // '$meta': { color: 'orange', tag: 1023, color_tag: 'orange_1023' },
+ // id: '40'
+ // }
+ // ]
+ //
+ ```
+
+- Filter entities with their __color__ values set to __brown__.
+
+
+
+ ```python
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter='color == "brown"',
+ output_fields=["color_tag"],
+ # highlight-end
+ limit=3
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "color_tag": "brown_5343",
+ # "id": 15
+ # },
+ # {
+ # "color_tag": "brown_3167",
+ # "id": 27
+ # },
+ # {
+ # "color_tag": "brown_3100",
+ # "id": 30
+ # }
+ # ]
+ ```
+
+ ```java
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("color == \"brown\"")
+ .outputFields(Arrays.asList("color_tag"))
+ .limit(3)
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [
+ // {"entity": {
+ // "color_tag": "brown_7792",
+ // "id": 3
+ // }},
+ // {"entity": {
+ // "color_tag": "brown_9695",
+ // "id": 7
+ // }},
+ // {"entity": {
+ // "color_tag": "brown_2551",
+ // "id": 15
+ // }}
+ // ]}
+ ```
+
+ ```javascript
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: 'color == "brown"',
+ output_fields: ["color_tag"],
+ limit: 3
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [
+ // {
+ // '$meta': { color: 'brown', tag: 6839, color_tag: 'brown_6839' },
+ // id: '22'
+ // },
+ // {
+ // '$meta': { color: 'brown', tag: 7849, color_tag: 'brown_7849' },
+ // id: '32'
+ // },
+ // {
+ // '$meta': { color: 'brown', tag: 7855, color_tag: 'brown_7855' },
+ // id: '33'
+ // }
+ // ]
+ //
+ ```
+
+- Filter entities with their __color__ values not set to __green__ and __purple__.
+
+
+
+ ```python
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter='color not in ["green", "purple"]',
+ output_fields=["color_tag"],
+ # highlight-end
+ limit=3
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "color_tag": "yellow_6781",
+ # "id": 0
+ # },
+ # {
+ # "color_tag": "pink_1023",
+ # "id": 1
+ # },
+ # {
+ # "color_tag": "blue_3972",
+ # "id": 2
+ # }
+ # ]
+ ```
+
+ ```java
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("color not in [\"green\", \"purple\"]")
+ .outputFields(Arrays.asList("color_tag"))
+ .limit(3)
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [
+ // {"entity": {
+ // "color_tag": "white_4597",
+ // "id": 0
+ // }},
+ // {"entity": {
+ // "color_tag": "white_8708",
+ // "id": 2
+ // }},
+ // {"entity": {
+ // "color_tag": "brown_7792",
+ // "id": 3
+ // }}
+ // ]}
+ ```
+
+ ```javascript
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: 'color not in ["green", "purple"]',
+ output_fields: ["color_tag"],
+ limit: 3
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [
+ // {
+ // '$meta': { color: 'blue', tag: 8907, color_tag: 'blue_8907' },
+ // id: '0'
+ // },
+ // {
+ // '$meta': { color: 'grey', tag: 3710, color_tag: 'grey_3710' },
+ // id: '1'
+ // },
+ // {
+ // '$meta': { color: 'blue', tag: 2993, color_tag: 'blue_2993' },
+ // id: '2'
+ // }
+ // ]
+ //
+ ```
+
+- Filter articles whose color tags start with __red__.
+
+
+
+ ```python
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter='color_tag like "red%"',
+ output_fields=["color_tag"],
+ # highlight-end
+ limit=3
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "color_tag": "red_6443",
+ # "id": 17
+ # },
+ # {
+ # "color_tag": "red_1483",
+ # "id": 41
+ # },
+ # {
+ # "color_tag": "red_4348",
+ # "id": 47
+ # }
+ # ]
+ ```
+
+ ```java
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("color_tag like \"red%\"")
+ .outputFields(Arrays.asList("color_tag"))
+ .limit(3)
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [
+ // {"entity": {
+ // "color_tag": "red_4929",
+ // "id": 9
+ // }},
+ // {"entity": {
+ // "color_tag": "red_8284",
+ // "id": 13
+ // }},
+ // {"entity": {
+ // "color_tag": "red_3021",
+ // "id": 44
+ // }}
+ // ]}
+ ```
+
+ ```javascript
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: 'color_tag like "red%"',
+ output_fields: ["color_tag"],
+ limit: 3
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [
+ // {
+ // '$meta': { color: 'red', tag: 8773, color_tag: 'red_8773' },
+ // id: '17'
+ // },
+ // {
+ // '$meta': { color: 'red', tag: 9197, color_tag: 'red_9197' },
+ // id: '34'
+ // },
+ // {
+ // '$meta': { color: 'red', tag: 7914, color_tag: 'red_7914' },
+ // id: '46'
+ // }
+ // ]
+ //
+ ```
+
+- Filter entities with their colors set to red and tag values within the range from 1,000 to 1,500.
+
+
+
+ ```python
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter='(color == "red") and (1000 < tag < 1500)',
+ output_fields=["color_tag"],
+ # highlight-end
+ limit=3
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "color_tag": "red_1483",
+ # "id": 41
+ # },
+ # {
+ # "color_tag": "red_1100",
+ # "id": 94
+ # },
+ # {
+ # "color_tag": "red_1343",
+ # "id": 526
+ # }
+ # ]
+ ```
+
+ ```java
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("(color == \"red\") and (1000 < tag < 1500)")
+ .outputFields(Arrays.asList("color_tag"))
+ .limit(3)
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [
+ // {"entity": {
+ // "color_tag": "red_8124",
+ // "id": 83
+ // }},
+ // {"entity": {
+ // "color_tag": "red_5358",
+ // "id": 501
+ // }},
+ // {"entity": {
+ // "color_tag": "red_3564",
+ // "id": 638
+ // }}
+ // ]}
+ ```
+
+ ```javascript
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: '(color == "red") and (1000 < tag < 1500)',
+ output_fields: ["color_tag"],
+ limit: 3
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [
+ // {
+ // '$meta': { color: 'red', tag: 1436, color_tag: 'red_1436' },
+ // id: '67'
+ // },
+ // {
+ // '$meta': { color: 'red', tag: 1463, color_tag: 'red_1463' },
+ // id: '160'
+ // },
+ // {
+ // '$meta': { color: 'red', tag: 1073, color_tag: 'red_1073' },
+ // id: '291'
+ // }
+ // ]
+ //
+ ```
+
+## Use Advanced Operators
+
+In this section, you will find examples of how to use advanced operators in scalar filtering. You can apply these filters to [vector searches](https://milvus.io/docs/single-vector-search.md#Filtered-search) and [data deletions](https://milvus.io/docs/insert-update-delete.md#Delete-entities) too.
+
+### Count entities
+
+- Counts the total number of entities in a collection.
+
+
+
+ ```python
+ # 7. Use advanced operators
+
+ # Count the total number of entities in a collection
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ output_fields=["count(*)"]
+ # highlight-end
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "count(*)": 2000
+ # }
+ # ]
+ ```
+
+ ```java
+ // 7. Use advanced operators
+ // Count the total number of entities in the collection
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("")
+ .outputFields(Arrays.asList("count(*)"))
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [{"entity": {"count(*)": 2000}}]}
+ ```
+
+ ```javascript
+ // 7. Use advanced operators
+ // Count the total number of entities in a collection
+ res = await client.query({
+ collection_name: "quick_setup",
+ output_fields: ["count(*)"]
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [ { 'count(*)': '2000' } ]
+ //
+ ```
+
+- Counts the total number of entities in specific partitions.
+
+
+
+ ```python
+ # Count the number of entities in a partition
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ output_fields=["count(*)"],
+ partition_names=["partitionA"]
+ # highlight-end
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "count(*)": 500
+ # }
+ # ]
+ ```
+
+ ```java
+ // Count the number of entities in a partition
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .partitionNames(Arrays.asList("partitionA"))
+ .filter("")
+ .outputFields(Arrays.asList("count(*)"))
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [{"entity": {"count(*)": 500}}]}
+ ```
+
+ ```javascript
+ // Count the number of entities in a partition
+ res = await client.query({
+ collection_name: "quick_setup",
+ output_fields: ["count(*)"],
+ partition_names: ["partitionA"]
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [ { 'count(*)': '500' } ]
+ //
+ ```
+
+- Counts the number of entities that match a filtering condition
+
+
+
+ ```python
+ # Count the number of entities that match a specific filter
+ res = client.query(
+ collection_name="quick_setup",
+ # highlight-start
+ filter='(color == "red") and (1000 < tag < 1500)',
+ output_fields=["count(*)"],
+ # highlight-end
+ )
+
+ print(res)
+
+ # Output
+ #
+ # [
+ # {
+ # "count(*)": 3
+ # }
+ # ]
+ ```
+
+ ```java
+ // Count the number of entities that match a specific filter
+ queryReq = QueryReq.builder()
+ .collectionName("quick_setup")
+ .filter("(color == \"red\") and (1000 < tag < 1500)")
+ .outputFields(Arrays.asList("count(*)"))
+ .build();
+
+ queryResp = client.query(queryReq);
+
+ System.out.println(JSONObject.toJSON(queryResp));
+
+ // Output:
+ // {"queryResults": [{"entity": {"count(*)": 7}}]}
+ ```
+
+ ```javascript
+ // Count the number of entities that match a specific filter
+ res = await client.query({
+ collection_name: "quick_setup",
+ filter: '(color == "red") and (1000 < tag < 1500)',
+ output_fields: ["count(*)"]
+ })
+
+ console.log(res.data)
+
+ // Output
+ //
+ // [ { 'count(*)': '10' } ]
+ //
+ ```
+
+## Reference on scalar filters
+
+### Basic Operators
+
+A __boolean expression__ is always __a string comprising field names joined by operators__. In this section, you will learn more about basic operators.
+
+| __Operator__ | __Description__ |
+| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
+| __and (&&)__ | True if both operands are true |
+| __or (||)__ | True if either operand is true |
+| __+, -, *, /__ | Addition, subtraction, multiplication, and division |
+| __**__ | Exponent |
+| __%__ | Modulus |
+| __<, >__ | Less than, greater than |
+| __==, !=__ | Equal to, not equal to |
+| __<=, >=__ | Less than or equal to, greater than or equal to |
+| __not__ | Reverses the result of a given condition. |
+| __like__ | Compares a value to similar values using wildcard operators.
For example, like "prefix%" matches strings that begin with "prefix". |
+| __in__ | Tests if an expression matches any value in a list of values. |
+
+### Advanced operators
+
+- `count(*)`
+
+ Counts the exact number of entities in the collection. Use this as an output field to get the exact number of entities in a collection or partition.
+
+
+
+
notes
+
+
This applies to loaded collections. You should use it as the only output field.
+
+
+
+
diff --git a/preview/site/en/userGuide/search-query-get/multi-vector-search.md b/preview/site/en/userGuide/search-query-get/multi-vector-search.md
new file mode 100644
index 000000000..25e9f0ca0
--- /dev/null
+++ b/preview/site/en/userGuide/search-query-get/multi-vector-search.md
@@ -0,0 +1,247 @@
+---
+id: multi-vector-search.md
+order: 2
+summary: This guide demonstrates how to perform hybrid search in Milvus and understand the reranking of results.
+title: Hybrid Search
+---
+
+# Hybrid Search
+
+Since Milvus 2.4, we introduced multi-vector support and a hybrid search framework, which means users can bring in several vector fields (up to 10) into a single collection. These vectors in different columns represent diverse facets of data, originating from different embedding models or undergoing distinct processing methods. The results of hybrid searches are integrated using reranking strategies, such as Reciprocal Rank Fusion (RRF) and Weighted Scoring. To learn more about reranking strategies, refer to [Reranking](reranking.md).
+
+This feature is particularly useful in comprehensive search scenarios, such as identifying the most similar person in a vector library based on various attributes like pictures, voice, fingerprints, etc.
+
+In this tutorial, you will learn how to:
+
+- Create multiple `AnnSearchRequest` instances for similarity searches on different vector fields;
+
+- Configure a reranking strategy to combine and rerank search results from multiple `AnnSearchRequest` instances;
+
+- Use the [`hybrid_search()`](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/hybrid_search.md) method to perform a hybrid search.
+
+
+
+The code snippets on this page use the [PyMilvus ORM module](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Connections/connect.md) to interact with Milvus. Code snippets with the new [MilvusClient SDK](https://milvus.io/api-reference/pymilvus/v2.4.x/About.md) will be available soon.
+
+
+
+## Preparations
+
+Before starting a hybrid search, ensure you have a collection with multiple vector fields. Currently, Milvus introduces a default of four vector fields per collection, which can be extended to a maximum of ten by modifying the [proxy.maxVectorFieldNum](https://milvus.io/docs/configure_proxy.md#proxymaxVectorFieldNum) configuration.
+
+Below is an example of creating a collection named `test_collection` with two vector fields, `filmVector` and `posterVector`, and inserting random entities into it.
+
+```python
+from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType
+import random
+
+# Connect to Milvus
+connections.connect(
+ host="10.102.7.3", # Replace with your Milvus server IP
+ port="19530"
+)
+
+# Create schema
+fields = [
+ FieldSchema(name="film_id", dtype=DataType.INT64, is_primary=True),
+ FieldSchema(name="filmVector", dtype=DataType.FLOAT_VECTOR, dim=5), # Vector field for film vectors
+ FieldSchema(name="posterVector", dtype=DataType.FLOAT_VECTOR, dim=5)] # Vector field for poster vectors
+
+schema = CollectionSchema(fields=fields,enable_dynamic_field=False)
+
+# Create collection
+collection = Collection(name="test_collection", schema=schema)
+
+# Create index for each vector field
+index_params = {
+ "metric_type": "L2",
+ "index_type": "IVF_FLAT",
+ "params": {"nlist": 128},
+}
+
+collection.create_index("filmVector", index_params)
+collection.create_index("posterVector", index_params)
+
+# Generate random entities to insert
+entities = []
+
+for _ in range(1000):
+ # generate random values for each field in the schema
+ film_id = random.randint(1, 1000)
+ film_vector = [ random.random() for _ in range(5) ]
+ poster_vector = [ random.random() for _ in range(5) ]
+
+ # create a dictionary for each entity
+ entity = {
+ "film_id": film_id,
+ "filmVector": film_vector,
+ "posterVector": poster_vector
+ }
+
+ # add the entity to the list
+ entities.append(entity)
+
+collection.insert(entities)
+```
+
+## Step 1: Create Multiple AnnSearchRequest Instances
+
+A hybrid search uses the `hybrid_search()` API to perform multiple ANN search requests in a single call. Each `AnnSearchRequest` represents a single search request on a specific vector field.
+
+The following example creates two `AnnSearchRequest` instances to perform individual similarity searches on two vector fields.
+
+```python
+from pymilvus import AnnSearchRequest
+
+# Create ANN search request 1 for filmVector
+query_filmVector = [[0.8896863042430693, 0.370613100114602, 0.23779315077113428, 0.38227915951132996, 0.5997064603128835]]
+
+search_param_1 = {
+ "data": query_filmVector, # Query vector
+ "anns_field": "filmVector", # Vector field name
+ "param": {
+ "metric_type": "L2", # This parameter value must be identical to the one used in the collection schema
+ "params": {"nprobe": 10}
+ },
+ "limit": 2 # Number of search results to return in this AnnSearchRequest
+}
+request_1 = AnnSearchRequest(**search_param_1)
+
+# Create ANN search request 2 for posterVector
+query_posterVector = [[0.02550758562349764, 0.006085637357292062, 0.5325251250159071, 0.7676432650114147, 0.5521074424751443]]
+search_param_2 = {
+ "data": query_posterVector, # Query vector
+ "anns_field": "posterVector", # Vector field name
+ "param": {
+ "metric_type": "L2", # This parameter value must be identical to the one used in the collection schema
+ "params": {"nprobe": 10}
+ },
+ "limit": 2 # Number of search results to return in this AnnSearchRequest
+}
+request_2 = AnnSearchRequest(**search_param_2)
+
+# Store these two requests as a list in `reqs`
+reqs = [request_1, request_2]
+```
+
+Parameters:
+
+- `AnnSearchRequest` (_object_)
+
+ A class representing an ANN search request. Each hybrid search can contain 1 to 1,024 `ANNSearchRequest` objects at a time.
+
+- `data` (_list_)
+
+ The query vector to search in a single `AnnSearchRequest`. Currently, this parameter accepts a list containing only a single query vector, for example, `[[0.5791814851218929, 0.5792985702614121, 0.8480776460143558, 0.16098005945243, 0.2842979317256803]]`. In the future, this parameter will be expanded to accept multiple query vectors.
+
+- `anns_field` (_string_)
+
+ The name of the vector field to use in a single `AnnSearchRequest`.
+
+- `param` (_dict_)
+
+ A dictionary of search parameters for a single `AnnSearchRequest`. These search parameters are identical to those for a single-vector search. For more information, refer to [Search parameters](https://milvus.io/docs/single-vector-search.md#Search-parameters).
+
+- `limit` (_int_)
+
+ The maximum number of search results to include in a single `ANNSearchRequest`.
+
+ This parameter only affects the number of search results to return within an individual `ANNSearchRequest`, and it does not decide the final results to return for a `hybrid_search` call. In a hybrid search, the final results are determined by combining and reranking the results from multiple `ANNSearchRequest` instances.
+
+## Step 2: Configure a Reranking Strategy
+
+After creating `AnnSearchRequest` instances, configure a reranking strategy to combine and rerank the results. Currently, there are two options: `WeightedRanker` and `RRFRanker`. For more information about reranking strategies, refer to [Reranking](reranking.md).
+
+- Use weighted scoring
+
+ The `WeightedRanker` is used to assign importance to the results from each vector field search with specified weights. If you prioritize some vector fields over others, `WeightedRanker(value1, value2, ..., valueN)` can reflect this in the combined search results.
+
+ ```python
+ from pymilvus import WeightedRanker
+ # Use WeightedRanker to combine results with specified weights
+ # Assign weights of 0.8 to text search and 0.2 to image search
+ rerank = WeightedRanker(0.8, 0.2)
+ ```
+
+ When using `WeightedRanker`, note that:
+
+ - Each weight value ranges from 0 (least important) to 1 (most important), influencing the final aggregated score.
+ - The total number of weight values provided in `WeightedRanker` should equal the number of `AnnSearchRequest` instances you have created.
+
+- Use Reciprocal Rank Fusion (RFF)
+
+ ```python
+ # Alternatively, use RRFRanker for reciprocal rank fusion reranking
+ from pymilvus import RRFRanker
+
+ rerank = RRFRanker()
+ ```
+
+## Step 3: Perform a Hybrid Search
+
+With the `AnnSearchRequest` instances and reranking strategy set, use the `hybrid_search()` method to perform the hybrid search.
+
+```python
+# Before conducting hybrid search, load the collection into memory.
+collection.load()
+
+res = collection.hybrid_search(
+ reqs, # List of AnnSearchRequests created in step 1
+ rerank, # Reranking strategy specified in step 2
+ limit=2 # Number of final search results to return
+)
+
+print(res)
+```
+
+Parameters:
+
+- `reqs` (_list_)
+
+ A list of search requests, where each request is an `ANNSearchRequest` object. Each request can correspond to a different vector field and a different set of search parameters.
+
+- `rerank` (_object_)
+
+ The reranking strategy to use for hybrid search. Possible values: `WeightedRanker(value1, value2, ..., valueN)` and `RRFRanker()`.
+
+ For more information about reranking strategies, refer to [Reranking](reranking.md).
+
+- `limit` (_int_)
+
+ The maximum number of final results to return in the hybrid search.
+
+The output is similar to the following:
+
+```python
+["['id: 844, distance: 0.006047376897186041, entity: {}', 'id: 876, distance: 0.006422005593776703, entity: {}']"]
+```
+
+## Limits
+
+- Typically, each collection has a default allowance of up to 4 vector fields. However, you have the option to adjust the `proxy.maxVectorFieldNum` configuration to expand the maximum number of vector fields in a collection, with a maximum limit of 10 vector fields per collection. See [Proxy-related Configurations](https://milvus.io/docs/configure_proxy.md#Proxy-related-Configurations) for more.
+
+- Partially indexed or loaded vector fields in a collection will result in an error.
+
+- Currently, each `AnnSearchRequest` in a hybrid search can carry one query vector only.
+
+## FAQ
+
+- **In which scenario is hybrid search recommended?**
+
+ Hybrid search is ideal for complex situations demanding high accuracy, especially when an entity can be represented by multiple, diverse vectors. This applies to cases where the same data, such as a sentence, is processed through different embedding models or when multimodal information (like images, fingerprints, and voiceprints of an individual) is converted into various vector formats. By assigning weights to these vectors, their combined influence can significantly enrich recall and improve the effectiveness of search results.
+
+- **How does a weighted ranker normalize distances between different vector fields?**
+
+ A weighted ranker normalizes the distances between vector fields using assigned weights to each field. It calculates the importance of each vector field according to its weight, prioritizing those with higher weights. It's advised to use the same metric type across ANN search requests to ensure consistency. This method ensures that vectors deemed more significant have a greater influence on the overall ranking.
+
+- **Is it possible to use alternative rankers like Cohere Ranker or BGE Ranker?**
+
+ Currently, only the provided rankers are supported. Plans to include additional rankers are underway for future updates.
+
+- **Is it possible to conduct multiple hybrid search operations at the same time?**
+
+ Yes, simultaneous execution of multiple hybrid search operations is supported.
+
+- **Can I use the same vector field in multiple AnnSearchRequest objects to perform hybrid searches?**
+
+ Technically, it is possible to use the same vector field in multiple AnnSearchRequest objects for hybrid searches. It is not necessary to have multiple vector fields for a hybrid search.
diff --git a/preview/site/en/userGuide/search-query-get/single-vector-search.md b/preview/site/en/userGuide/search-query-get/single-vector-search.md
new file mode 100644
index 000000000..7dc2625a6
--- /dev/null
+++ b/preview/site/en/userGuide/search-query-get/single-vector-search.md
@@ -0,0 +1,1976 @@
+---
+id: single-vector-search.md
+order: 1
+summary: This article describes how to search for vectors in a Milvus collection using a single query vector.
+title: Single-Vector Search
+---
+
+# Single-Vector Search
+
+Once you have inserted your data, the next step is to perform similarity searches on your collection in Milvus.
+
+Milvus allows you to conduct two types of searches, depending on the number of vector fields in your collection:
+
+- **Single-vector search**: If your collection has only one vector field, use the [`search()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/search.md) method to find the most similar entities. This method compares your query vector with the existing vectors in your collection and returns the IDs of the closest matches along with the distances between them. Optionally, it can also return the vector values and metadata of the results.
+- **Hybrid search**: For collections with two or more vector fields, use the [`hybrid_search()`](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/hybrid_search.md) method. This method performs multiple Approximate Nearest Neighbor (ANN) search requests and combines the results to return the most relevant matches after reranking.
+
+This guide focuses on how to perform a single-vector search in Milvus. For details on hybrid search, refer to [Hybrid search](https://milvus.io/docs/multi-vector-search.md).
+
+## Overview
+
+There are a variety of search types to meet different requirements:
+
+- [Basic search](https://milvus.io/docs/single-vector-search.md#Basic-search): Includes single-vector search, bulk-vector search, partition search, and search with specified output fields.
+
+- [Filtered search](https://milvus.io/docs/single-vector-search.md#Filtered-search): Applies filtering criteria based on scalar fields to refine search results.
+
+- [Range search](https://milvus.io/docs/single-vector-search.md#Range-search): Finds vectors within a specific distance range from the query vector.
+
+- [Grouping search](https://milvus.io/docs/single-vector-search.md#Grouping-search): Groups search results based on a specific field to ensure diversity in the results.
+
+## Preparations
+
+The code snippet below repurposes the existing code to establish a connection to Milvus and quickly set up a collection.
+
+
+
+```python
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri=CLUSTER_ENDPOINT,
+ token=TOKEN
+)
+
+# 2. Create a collection
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5,
+ metric_type="IP"
+)
+
+# 3. Insert randomly generated vectors
+colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+data = []
+
+for i in range(1000):
+ current_color = random.choice(colors)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "color_tag": f"{current_color}_{str(random.randint(1000, 9999))}"
+ })
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 1000,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(990 more items hidden)"
+# ]
+# }
+
+# 6.1 Create partitions
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="red"
+)
+
+client.create_partition(
+ collection_name="quick_setup",
+ partition_name="blue"
+)
+
+# 6.1 Insert data into partitions
+red_data = [ {"id": i, "vector": [ random.uniform(-1, 1) for _ in range(5) ], "color": "red", "color_tag": f"red_{str(random.randint(1000, 9999))}" } for i in range(500) ]
+blue_data = [ {"id": i, "vector": [ random.uniform(-1, 1) for _ in range(5) ], "color": "blue", "color_tag": f"blue_{str(random.randint(1000, 9999))}" } for i in range(500) ]
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=red_data,
+ partition_name="red"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 500,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(490 more items hidden)"
+# ]
+# }
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=blue_data,
+ partition_name="blue"
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 500,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(490 more items hidden)"
+# ]
+# }
+```
+
+```java
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import com.alibaba.fastjson.JSONObject;
+
+import io.milvus.v2.client.ConnectConfig;
+import io.milvus.v2.client.MilvusClientV2;
+import io.milvus.v2.service.collection.request.CreateCollectionReq;
+import io.milvus.v2.service.collection.request.GetLoadStateReq;
+import io.milvus.v2.service.vector.request.InsertReq;
+import io.milvus.v2.service.vector.response.InsertResp;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectConfig connectConfig = ConnectConfig.builder()
+ .uri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusClientV2 client = new MilvusClientV2(connectConfig);
+
+// 2. Create a collection in quick setup mode
+CreateCollectionReq quickSetupReq = CreateCollectionReq.builder()
+ .collectionName("quick_setup")
+ .dimension(5)
+ .metricType("IP")
+ .build();
+
+client.createCollection(quickSetupReq);
+
+GetLoadStateReq loadStateReq = GetLoadStateReq.builder()
+ .collectionName("quick_setup")
+ .build();
+
+boolean state = client.getLoadState(loadStateReq);
+
+System.out.println(state);
+
+// Output:
+// true
+
+// 3. Insert randomly generated vectors into the collection
+List colors = Arrays.asList("green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey");
+List data = new ArrayList<>();
+
+for (int i=0; i<1000; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color_tag", current_color + "_" + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+InsertReq insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .build();
+
+InsertResp insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 1000}
+
+// 6.1. Create a partition
+CreatePartitionReq partitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("red")
+ .build();
+
+client.createPartition(partitionReq);
+
+partitionReq = CreatePartitionReq.builder()
+ .collectionName("quick_setup")
+ .partitionName("blue")
+ .build();
+
+client.createPartition(partitionReq);
+
+// 6.2 Insert data into the partition
+data = new ArrayList<>();
+
+for (int i=1000; i<1500; i++) {
+ Random rand = new Random();
+ String current_color = "red";
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("color_tag", current_color + "_" + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("red")
+ .build();
+
+insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 500}
+
+data = new ArrayList<>();
+
+for (int i=1500; i<2000; i++) {
+ Random rand = new Random();
+ String current_color = "blue";
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color", current_color);
+ row.put("color_tag", current_color + "_" + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+insertReq = InsertReq.builder()
+ .collectionName("quick_setup")
+ .data(data)
+ .partitionName("blue")
+ .build();
+
+insertResp = client.insert(insertReq);
+
+System.out.println(JSONObject.toJSON(insertResp));
+
+// Output:
+// {"insertCnt": 500}
+```
+
+```javascript
+const { MilvusClient, DataType, sleep } = require("@zilliz/milvus2-sdk-node")
+
+const address = "http://localhost:19530"
+
+// 1. Set up a Milvus Client
+client = new MilvusClient({address});
+
+// 2. Create a collection in quick setup mode
+await client.createCollection({
+ collection_name: "quick_setup",
+ dimension: 5,
+ metric_type: "IP"
+});
+
+// 3. Insert randomly generated vectors
+const colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+data = []
+
+for (let i = 0; i < 1000; i++) {
+ current_color = colors[Math.floor(Math.random() * colors.length)]
+ data.push({
+ id: i,
+ vector: [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ color: current_color,
+ color_tag: `${current_color}_${Math.floor(Math.random() * 8999) + 1000}`
+ })
+}
+
+var res = await client.insert({
+ collection_name: "quick_setup",
+ data: data
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 1000
+//
+
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "red"
+})
+
+await client.createPartition({
+ collection_name: "quick_setup",
+ partition_name: "blue"
+})
+
+// 6.1 Insert data into partitions
+var red_data = []
+var blue_data = []
+
+for (let i = 1000; i < 1500; i++) {
+ red_data.push({
+ id: i,
+ vector: [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ color: "red",
+ color_tag: `red_${Math.floor(Math.random() * 8999) + 1000}`
+ })
+}
+
+for (let i = 1500; i < 2000; i++) {
+ blue_data.push({
+ id: i,
+ vector: [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()],
+ color: "blue",
+ color_tag: `blue_${Math.floor(Math.random() * 8999) + 1000}`
+ })
+}
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: red_data,
+ partition_name: "red"
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 500
+//
+
+res = await client.insert({
+ collection_name: "quick_setup",
+ data: blue_data,
+ partition_name: "blue"
+})
+
+console.log(res.insert_cnt)
+
+// Output
+//
+// 500
+//
+```
+
+## Basic search
+
+When sending a `search` request, you can provide one or more vector values representing your query embeddings and a `limit` value indicating the number of results to return.
+
+Depending on your data and your query vector, you may get fewer than `limit` results. This happens when `limit` is larger than the number of possible matching vectors for your query.
+
+### Single-vector search
+
+Single-vector search is the simplest form of `search` operations in Milvus, designed to find the most similar vectors to a given query vector.
+
+To perform a single-vector search, specify the target collection name, the query vector, and the desired number of results (`limit`). This operation returns a result set comprising the most similar vectors, their IDs, and distances from the query vector.
+
+Here is an example of searching for the top 5 entities that are most similar to the query vector:
+
+
+
+```python
+# Single vector search
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ # Replace with your query vector
+ data=[[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]],
+ limit=5, # Max. number of search results to return
+ search_params={"metric_type": "IP", "params": {}} # Search parameters
+)
+
+# Convert the output to a formatted JSON string
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 4. Single vector search
+List> query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+SearchReq searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .topK(3) // The number of results to return
+ .build();
+
+SearchResp searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 4. Single vector search
+var query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592],
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ limit: 3, // The number of results to return
+})
+
+console.log(res.results)
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of an existing collection. |
+
+
+ data |
+ A list of vector embeddings. Milvus searches for the most similar vector embeddings to the specified ones. |
+
+
+ limit |
+ The total number of entities to return. You can use this parameter in combination with offset in param to enable pagination. The sum of this value and offset in param should be less than 16,384. |
+
+
+ search_params |
+ The parameter settings specific to this operation.
metric_type : The metric type applied to this operation. This should be the same as the one used when you index the vector field specified above. Possible values are L2, IP, COSINE, JACCARD, HAMMING.params : Additional parameters. For details, refer to search().
|
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collectionName |
+ The name of an existing collection. |
+
+
+ data |
+ A list of vector embeddings. Milvus searches for the most similar vector embeddings to the specified ones. |
+
+
+ topK |
+ The number of records to return in the search result. This parameter uses the same syntax as the limit parameter, so you should only set one of them. You can use this parameter in combination with offset in param to enable pagination. The sum of this value and offset in param should be less than 16,384. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ collection_name |
+ The name of an existing collection. |
+
+
+ data |
+ A list of vector embeddings. Milvus searches for the most similar vector embeddings to the specified ones. |
+
+
+ limit |
+ The total number of entities to return. You can use this parameter in combination with offset in param to enable pagination. The sum of this value and offset in param should be less than 16,384. |
+
+
+
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 0,
+ "distance": 1.4093276262283325,
+ "entity": {}
+ },
+ {
+ "id": 4,
+ "distance": 0.9902134537696838,
+ "entity": {}
+ },
+ {
+ "id": 1,
+ "distance": 0.8519943356513977,
+ "entity": {}
+ },
+ {
+ "id": 5,
+ "distance": 0.7972343564033508,
+ "entity": {}
+ },
+ {
+ "id": 2,
+ "distance": 0.5928734540939331,
+ "entity": {}
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [[
+ {
+ "score": 1.263043,
+ "fields": {
+ "vector": [
+ 0.9533119,
+ 0.02538395,
+ 0.76714665,
+ 0.35481733,
+ 0.9845762
+ ],
+ "id": 740
+ }
+ },
+ {
+ "score": 1.2377806,
+ "fields": {
+ "vector": [
+ 0.7411156,
+ 0.08687937,
+ 0.8254139,
+ 0.08370924,
+ 0.99095553
+ ],
+ "id": 640
+ }
+ },
+ {
+ "score": 1.1869997,
+ "fields": {
+ "vector": [
+ 0.87928146,
+ 0.05324632,
+ 0.6312755,
+ 0.28005534,
+ 0.9542448
+ ],
+ "id": 455
+ }
+ }
+]]}
+```
+
+```javascript
+[
+ { score: 1.7463608980178833, id: '854' },
+ { score: 1.744946002960205, id: '425' },
+ { score: 1.7258622646331787, id: '718' }
+]
+```
+
+The output showcases the top 5 neighbors nearest to your query vector, including their unique IDs and the calculated distances.
+
+### Bulk-vector search
+
+A bulk-vector search extends the [single-vector search](https://milvus.io/docs/single-vector-search.md#Single-Vector-Search) concept by allowing multiple query vectors to be searched in a single request. This type of search is ideal for scenarios where you need to find similar vectors for a set of query vectors, significantly reducing the time and computational resources required.
+
+In a bulk-vector search, you can include several query vectors in the `data` field. The system processes these vectors in parallel, returning a separate result set for each query vector, each set containing the closest matches found within the collection.
+
+Here is an example of searching for two distinct sets of the most similar entities from two query vectors:
+
+
+
+```python
+# Bulk-vector search
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ data=[
+ [0.19886812562848388, 0.06023560599112088, 0.6976963061752597, 0.2614474506242501, 0.838729485096104],
+ [0.3172005263489739, 0.9719044792798428, -0.36981146090600725, -0.4860894583077995, 0.95791889146345]
+ ], # Replace with your query vectors
+ limit=2, # Max. number of search results to return
+ search_params={"metric_type": "IP", "params": {}} # Search parameters
+)
+
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 5. Batch vector search
+query_vectors = Arrays.asList(
+ Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f),
+ Arrays.asList(0.19886812562848388f, 0.06023560599112088f, 0.6976963061752597f, 0.2614474506242501f, 0.838729485096104f)
+);
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .topK(2)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 5. Batch vector search
+var query_vectors = [
+ [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592],
+ [0.19886812562848388, 0.06023560599112088, 0.6976963061752597, 0.2614474506242501, 0.838729485096104]
+]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: query_vectors,
+ limit: 2,
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 1,
+ "distance": 1.3017789125442505,
+ "entity": {}
+ },
+ {
+ "id": 7,
+ "distance": 1.2419954538345337,
+ "entity": {}
+ }
+ ], # Result set 1
+ [
+ {
+ "id": 3,
+ "distance": 2.3358664512634277,
+ "entity": {}
+ },
+ {
+ "id": 8,
+ "distance": 0.5642921924591064,
+ "entity": {}
+ }
+ ] # Result set 2
+]
+```
+
+```java
+// Two sets of vectors are returned as expected
+
+{"searchResults": [
+ [
+ {
+ "score": 1.263043,
+ "fields": {
+ "vector": [
+ 0.9533119,
+ 0.02538395,
+ 0.76714665,
+ 0.35481733,
+ 0.9845762
+ ],
+ "id": 740
+ }
+ },
+ {
+ "score": 1.2377806,
+ "fields": {
+ "vector": [
+ 0.7411156,
+ 0.08687937,
+ 0.8254139,
+ 0.08370924,
+ 0.99095553
+ ],
+ "id": 640
+ }
+ }
+ ],
+ [
+ {
+ "score": 1.8654699,
+ "fields": {
+ "vector": [
+ 0.4671427,
+ 0.8378432,
+ 0.98844475,
+ 0.82763994,
+ 0.9729997
+ ],
+ "id": 638
+ }
+ },
+ {
+ "score": 1.8581753,
+ "fields": {
+ "vector": [
+ 0.735541,
+ 0.60140246,
+ 0.86730254,
+ 0.93152493,
+ 0.98603314
+ ],
+ "id": 855
+ }
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ [
+ { score: 2.3590476512908936, id: '854' },
+ { score: 2.2896690368652344, id: '59' }
+ [
+ { score: 2.664059638977051, id: '59' },
+ { score: 2.59483003616333, id: '854' }
+ ]
+]
+```
+
+The results include two sets of nearest neighbors, one for each query vector, showcasing the efficiency of bulk-vector searches in handling multiple query vectors at once.
+
+### Partition search
+
+Partition search narrows the scope of your search to a specific subset or partition of your collection. This is particularly useful for organized datasets where data is segmented into logical or categorical divisions, allowing for faster search operations by reducing the volume of data to scan.
+
+To conduct a partition search, simply include the name of the target partition in `partition_names` of your search request. This specifies that the `search` operation only considers vectors within the specified partition.
+
+Here is an example of searching for entities in `red`:
+
+
+
+```python
+# 6.2 Search within a partition
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = client.search(
+ collection_name="quick_setup",
+ data=[query_vector],
+ limit=5,
+ search_params={"metric_type": "IP", "params": {"level": 1}},
+ partition_names=["red"]
+)
+
+print(res)
+```
+
+```java
+// 6.3 Search within partitions
+query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .partitionNames(Arrays.asList("red"))
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 6.2 Search within partitions
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ partition_names: ["red"],
+ limit: 5,
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 16,
+ "distance": 0.9200337529182434,
+ "entity": {}
+ },
+ {
+ "id": 14,
+ "distance": 0.4505271911621094,
+ "entity": {}
+ },
+ {
+ "id": 15,
+ "distance": 0.19924677908420563,
+ "entity": {}
+ },
+ {
+ "id": 17,
+ "distance": 0.0075093843042850494,
+ "entity": {}
+ },
+ {
+ "id": 13,
+ "distance": -0.14609718322753906,
+ "entity": {}
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.1677284,
+ "fields": {
+ "vector": [
+ 0.9986977,
+ 0.17964739,
+ 0.49086612,
+ 0.23155272,
+ 0.98438674
+ ],
+ "id": 1435
+ }
+ },
+ {
+ "score": 1.1476475,
+ "fields": {
+ "vector": [
+ 0.6952647,
+ 0.13417172,
+ 0.91045254,
+ 0.119336545,
+ 0.9338931
+ ],
+ "id": 1291
+ }
+ },
+ {
+ "score": 1.0969629,
+ "fields": {
+ "vector": [
+ 0.3363194,
+ 0.028906643,
+ 0.6675426,
+ 0.030419827,
+ 0.9735209
+ ],
+ "id": 1168
+ }
+ },
+ {
+ "score": 1.0741848,
+ "fields": {
+ "vector": [
+ 0.9980543,
+ 0.36063594,
+ 0.66427994,
+ 0.17359233,
+ 0.94954175
+ ],
+ "id": 1164
+ }
+ },
+ {
+ "score": 1.0584627,
+ "fields": {
+ "vector": [
+ 0.7187005,
+ 0.12674773,
+ 0.987718,
+ 0.3110777,
+ 0.86093885
+ ],
+ "id": 1085
+ }
+ }
+ ],
+ [
+ {
+ "score": 1.8030131,
+ "fields": {
+ "vector": [
+ 0.59726167,
+ 0.7054632,
+ 0.9573117,
+ 0.94529945,
+ 0.8664103
+ ],
+ "id": 1203
+ }
+ },
+ {
+ "score": 1.7728865,
+ "fields": {
+ "vector": [
+ 0.6672442,
+ 0.60448086,
+ 0.9325822,
+ 0.80272985,
+ 0.8861626
+ ],
+ "id": 1448
+ }
+ },
+ {
+ "score": 1.7536311,
+ "fields": {
+ "vector": [
+ 0.59663296,
+ 0.77831805,
+ 0.8578314,
+ 0.88818026,
+ 0.9030075
+ ],
+ "id": 1010
+ }
+ },
+ {
+ "score": 1.7520742,
+ "fields": {
+ "vector": [
+ 0.854198,
+ 0.72294194,
+ 0.9245805,
+ 0.86126596,
+ 0.7969224
+ ],
+ "id": 1219
+ }
+ },
+ {
+ "score": 1.7452049,
+ "fields": {
+ "vector": [
+ 0.96419,
+ 0.943535,
+ 0.87611496,
+ 0.8268136,
+ 0.79786557
+ ],
+ "id": 1149
+ }
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ { score: 3.0258803367614746, id: '1201' },
+ { score: 3.004319190979004, id: '1458' },
+ { score: 2.880324363708496, id: '1187' },
+ { score: 2.8246407508850098, id: '1347' },
+ { score: 2.797295093536377, id: '1406' }
+]
+```
+
+Then, search for entities in `blue`:
+
+
+
+```python
+res = client.search(
+ collection_name="quick_setup",
+ data=[query_vector],
+ limit=5,
+ search_params={"metric_type": "IP", "params": {"level": 1}},
+ partition_names=["blue"]
+)
+
+print(res)
+```
+
+```java
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .partitionNames(Arrays.asList("blue"))
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ partition_names: ["blue"],
+ limit: 5,
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 20,
+ "distance": 2.363696813583374,
+ "entity": {}
+ },
+ {
+ "id": 26,
+ "distance": 1.0665391683578491,
+ "entity": {}
+ },
+ {
+ "id": 23,
+ "distance": 1.066049575805664,
+ "entity": {}
+ },
+ {
+ "id": 29,
+ "distance": 0.8353596925735474,
+ "entity": {}
+ },
+ {
+ "id": 28,
+ "distance": 0.7484277486801147,
+ "entity": {}
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.1628494,
+ "fields": {
+ "vector": [
+ 0.7442872,
+ 0.046407282,
+ 0.71031404,
+ 0.3544345,
+ 0.9819991
+ ],
+ "id": 1992
+ }
+ },
+ {
+ "score": 1.1470042,
+ "fields": {
+ "vector": [
+ 0.5505825,
+ 0.04367262,
+ 0.9985836,
+ 0.18922359,
+ 0.93255126
+ ],
+ "id": 1977
+ }
+ },
+ {
+ "score": 1.1450152,
+ "fields": {
+ "vector": [
+ 0.89994013,
+ 0.052991092,
+ 0.8645576,
+ 0.6406729,
+ 0.95679337
+ ],
+ "id": 1573
+ }
+ },
+ {
+ "score": 1.1439825,
+ "fields": {
+ "vector": [
+ 0.9253267,
+ 0.15890503,
+ 0.7999555,
+ 0.19126713,
+ 0.898583
+ ],
+ "id": 1552
+ }
+ },
+ {
+ "score": 1.1029172,
+ "fields": {
+ "vector": [
+ 0.95661926,
+ 0.18777144,
+ 0.38115507,
+ 0.14323527,
+ 0.93137646
+ ],
+ "id": 1823
+ }
+ }
+ ],
+ [
+ {
+ "score": 1.8005109,
+ "fields": {
+ "vector": [
+ 0.5953582,
+ 0.7794224,
+ 0.9388869,
+ 0.79825854,
+ 0.9197286
+ ],
+ "id": 1888
+ }
+ },
+ {
+ "score": 1.7714822,
+ "fields": {
+ "vector": [
+ 0.56805456,
+ 0.89422905,
+ 0.88187534,
+ 0.914824,
+ 0.8944365
+ ],
+ "id": 1648
+ }
+ },
+ {
+ "score": 1.7561421,
+ "fields": {
+ "vector": [
+ 0.83421993,
+ 0.39865613,
+ 0.92319834,
+ 0.42695504,
+ 0.96633124
+ ],
+ "id": 1688
+ }
+ },
+ {
+ "score": 1.7553532,
+ "fields": {
+ "vector": [
+ 0.89994013,
+ 0.052991092,
+ 0.8645576,
+ 0.6406729,
+ 0.95679337
+ ],
+ "id": 1573
+ }
+ },
+ {
+ "score": 1.7543385,
+ "fields": {
+ "vector": [
+ 0.16542226,
+ 0.38248396,
+ 0.9888778,
+ 0.80913955,
+ 0.9501492
+ ],
+ "id": 1544
+ }
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ { score: 2.8421106338500977, id: '1745' },
+ { score: 2.838560104370117, id: '1782' },
+ { score: 2.8134000301361084, id: '1511' },
+ { score: 2.718268871307373, id: '1679' },
+ { score: 2.7014894485473633, id: '1597' }
+]
+```
+
+The data in `red` differs from that in `blue`. Therefore, the search results will be constrained to the specified partition, reflecting the unique characteristics and data distribution of that subset.
+
+### Search with output fields
+
+Search with output fields allows you to specify which attributes or fields of the matched vectors should be included in the search results.
+
+You can specify `output_fields` in a request to return results with specific fields.
+
+Here is an example of returning results with `color` attribute values:
+
+
+
+```python
+# Search with output fields
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ data=[[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]],
+ limit=5, # Max. number of search results to return
+ search_params={"metric_type": "IP", "params": {}}, # Search parameters
+ output_fields=["color"] # Output fields to return
+)
+
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 7. Search with output fields
+query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .outputFields(Arrays.asList("color"))
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 7. Search with output fields
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ limit: 5,
+ output_fields: ["color"],
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 0,
+ "distance": 1.4093276262283325,
+ "entity": {
+ "color": "pink_8682"
+ }
+ },
+ {
+ "id": 16,
+ "distance": 1.0159327983856201,
+ "entity": {
+ "color": "yellow_1496"
+ }
+ },
+ {
+ "id": 4,
+ "distance": 0.9902134537696838,
+ "entity": {
+ "color": "red_4794"
+ }
+ },
+ {
+ "id": 14,
+ "distance": 0.9803846478462219,
+ "entity": {
+ "color": "green_2899"
+ }
+ },
+ {
+ "id": 1,
+ "distance": 0.8519943356513977,
+ "entity": {
+ "color": "red_7025"
+ }
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.263043,
+ "fields": {}
+ },
+ {
+ "score": 1.2377806,
+ "fields": {}
+ },
+ {
+ "score": 1.1869997,
+ "fields": {}
+ },
+ {
+ "score": 1.1748955,
+ "fields": {}
+ },
+ {
+ "score": 1.1720343,
+ "fields": {}
+ }
+ ]
+]}
+```
+
+```javascript
+
+[
+ { score: 3.036271572113037, id: '59', color: 'orange' },
+ { score: 3.0267879962921143, id: '1745', color: 'blue' },
+ { score: 3.0069446563720703, id: '854', color: 'black' },
+ { score: 2.984386682510376, id: '718', color: 'black' },
+ { score: 2.916019916534424, id: '425', color: 'purple' }
+]
+```
+
+Alongside the nearest neighbors, the search results will include the specified field `color`, providing a richer set of information for each matching vector.
+
+## Filtered search
+
+Filtered search applies scalar filters to vector searches, allowing you to refine the search results based on specific criteria. You can find more about filter expressions in [Boolean Expression Rules](https://milvus.io/docs/boolean.md) and examples in [Get & Scalar Query](https://milvus.io/docs/get-and-scalar-query.md).
+
+### Use the `like` operator
+
+The `like` operator enhances string searches by evaluating patterns including prefixes, infixes, and suffixes:
+
+- __Prefix matching__: To find values starting with a specific prefix, use the syntax `'like "prefix%"'`.
+- __Infix matching__: To find values containing a specific sequence of characters anywhere within the string, use the syntax `'like "%infix%"'`.
+- __Suffix matching__: To find values ending with a specific suffix, use the syntax `'like "%suffix"'`.
+
+For single-character matching, underscore (`_`) acts as a wildcard for one character, e.g., `'like "y_llow"'`.
+
+### Special characters in search strings
+
+If you want to search for a string that contains special characters like underscores (`_`) or percent signs (`%`), which are normally used as wildcards in search patterns (`_` for any single character and `%` for any sequence of characters), you must escape these characters to treat them as literal characters. Use a backslash (`\`) to escape special characters, and remember to escape the backslash itself. For instance:
+
+- To search for a literal underscore, use `\\_`.
+- To search for a literal percent sign, use `\\%`.
+
+So, if you need to search for the text `"_version_"`, your query should be formatted as `'like "\\_version\\_"'` to ensure the underscores are treated as part of the search term and not as wildcards.
+
+Filter results whose __color__ is prefixed with __red__:
+
+
+
+```python
+# Search with filter
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ data=[[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]],
+ limit=5, # Max. number of search results to return
+ search_params={"metric_type": "IP", "params": {}}, # Search parameters
+ output_fields=["color"], # Output fields to return
+ filter='color like "red%"'
+)
+
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 8. Filtered search
+query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .outputFields(Arrays.asList("color_tag"))
+ .filter("color_tag like \"red%\"")
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 8. Filtered search
+// 8.1 Filter with "like" operator and prefix wildcard
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ limit: 5,
+ filters: "color_tag like \"red%\"",
+ output_fields: ["color_tag"]
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 4,
+ "distance": 0.9902134537696838,
+ "entity": {
+ "color": "red_4794"
+ }
+ },
+ {
+ "id": 1,
+ "distance": 0.8519943356513977,
+ "entity": {
+ "color": "red_7025"
+ }
+ },
+ {
+ "id": 6,
+ "distance": -0.4113418459892273,
+ "entity": {
+ "color": "red_9392"
+ }
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.1869997,
+ "fields": {"color_tag": "red_3026"}
+ },
+ {
+ "score": 1.1677284,
+ "fields": {"color_tag": "red_9030"}
+ },
+ {
+ "score": 1.1476475,
+ "fields": {"color_tag": "red_3744"}
+ },
+ {
+ "score": 1.0969629,
+ "fields": {"color_tag": "red_4168"}
+ },
+ {
+ "score": 1.0741848,
+ "fields": {"color_tag": "red_9678"}
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ { score: 2.5080761909484863, id: '1201', color_tag: 'red_8904' },
+ { score: 2.491129159927368, id: '425', color_tag: 'purple_8212' },
+ { score: 2.4889798164367676, id: '1458', color_tag: 'red_6891' },
+ { score: 2.42964243888855, id: '724', color_tag: 'black_9885' },
+ { score: 2.4004223346710205, id: '854', color_tag: 'black_5990' }
+]
+```
+
+Filter results whose __color__ contains the letters __ll__ anywhere within the string:
+
+
+
+```python
+# Infix match on color field
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ data=[[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]],
+ limit=5, # Max. number of search results to return
+ search_params={"metric_type": "IP", "params": {}}, # Search parameters
+ output_fields=["color"], # Output fields to return
+ filter='color like "%ll%"' # Filter on color field, infix match on "ll"
+)
+
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 8. Filtered search
+query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .outputFields(Arrays.asList("color_tag"))
+ .filter("color like \"%ll%\"")
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 8. Filtered search
+// 8.1 Filter with "like" operator and prefix wildcard
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ limit: 5,
+ filters: "color_tag like \"%ll%\"",
+ output_fields: ["color_tag"]
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 5,
+ "distance": 0.7972343564033508,
+ "entity": {
+ "color": "yellow_4222"
+ }
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.1869997,
+ "fields": {"color_tag": "yellow_4222"}
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ { score: 2.5080761909484863, id: '1201', color_tag: 'yellow_4222' }
+]
+```
+
+## Range search
+
+Range search allows you to find vectors that lie within a specified distance range from your query vector.
+
+By setting `radius` and optionally `range_filter`, you can adjust the breadth of your search to include vectors that are somewhat similar to the query vector, providing a more comprehensive view of potential matches.
+
+- `radius`: Defines the outer boundary of your search space. Only vectors that are within this distance from the query vector are considered potential matches.
+
+- `range_filter`: While `radius` sets the outer limit of the search, `range_filter` can be optionally used to define an inner boundary, creating a distance range within which vectors must fall to be considered matches.
+
+
+
+```python
+# Conduct a range search
+search_params = {
+ "metric_type": "IP",
+ "params": {
+ "radius": 0.8, # Radius of the search circle
+ "range_filter": 1.0 # Range filter to filter out vectors that are not within the search circle
+ }
+}
+
+res = client.search(
+ collection_name="test_collection", # Replace with the actual name of your collection
+ data=[[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]],
+ limit=3, # Max. number of search results to return
+ search_params=search_params, # Search parameters
+ output_fields=["color"], # Output fields to return
+)
+
+result = json.dumps(res, indent=4)
+print(result)
+```
+
+```java
+// 9. Range search
+query_vectors = Arrays.asList(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f));
+
+searchReq = SearchReq.builder()
+ .collectionName("quick_setup")
+ .data(query_vectors)
+ .outputFields(Arrays.asList("color_tag"))
+ .searchParams(Map.of("radius", 0.1, "range", 1.0))
+ .topK(5)
+ .build();
+
+searchResp = client.search(searchReq);
+
+System.out.println(JSONObject.toJSON(searchResp));
+```
+
+```javascript
+// 9. Range search
+query_vector = [0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]
+
+res = await client.search({
+ collection_name: "quick_setup",
+ data: [query_vector],
+ limit: 5,
+ params: {
+ radius: 0.1,
+ range: 1.0
+ },
+ output_fields: ["color_tag"]
+})
+
+console.log(res.results)
+```
+
+The output is similar to the following:
+
+
+
+```python
+[
+ [
+ {
+ "id": 4,
+ "distance": 0.9902134537696838,
+ "entity": {
+ "color": "red_4794"
+ }
+ },
+ {
+ "id": 14,
+ "distance": 0.9803846478462219,
+ "entity": {
+ "color": "green_2899"
+ }
+ },
+ {
+ "id": 1,
+ "distance": 0.8519943356513977,
+ "entity": {
+ "color": "red_7025"
+ }
+ }
+ ]
+]
+```
+
+```java
+{"searchResults": [
+ [
+ {
+ "score": 1.263043,
+ "fields": {"color_tag": "green_2052"}
+ },
+ {
+ "score": 1.2377806,
+ "fields": {"color_tag": "purple_3709"}
+ },
+ {
+ "score": 1.1869997,
+ "fields": {"color_tag": "red_3026"}
+ },
+ {
+ "score": 1.1748955,
+ "fields": {"color_tag": "black_1646"}
+ },
+ {
+ "score": 1.1720343,
+ "fields": {"color_tag": "green_4853"}
+ }
+ ]
+]}
+```
+
+```javascript
+[
+ { score: 2.3387961387634277, id: '718', color_tag: 'black_7154' },
+ { score: 2.3352415561676025, id: '1745', color_tag: 'blue_8741' },
+ { score: 2.290485382080078, id: '1408', color_tag: 'red_2324' },
+ { score: 2.285870313644409, id: '854', color_tag: 'black_5990' },
+ { score: 2.2593345642089844, id: '1309', color_tag: 'red_8458' }
+]
+```
+
+You will observe that all the entities returned have a distance that falls within the range of 0.8 to 1.0 from the query vector.
+
+The parameter settings for `radius` and `range_filter` vary with the metric type in use.
+
+| __Metric Type__ | __Charactericstics__ | __Range Search Settings__ |
+| ---------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
+| `L2` | Smaller L2 distances indicate higher similarity. | To exclude the closest vectors from results, ensure that:
`range_filter` <= distance < `radius` |
+| `IP` | Larger IP distances indicate higher similarity. | To exclude the closest vectors from results, ensure that:
`radius` < distance <= `range_filter` |
+| `COSINE` | Larger cosine value indicates higher similarity. | To exclude the closest vectors from results, ensure that:
`radius` < distance <= `range_filter` |
+| `JACCARD` | Smaller Jaccard distances indicate higher similarity. | To exclude the closest vectors from results, ensure that:
`range_filter` <= distance < `radius` |
+| `HAMMING` | Smaller Hamming distances indicate higher similarity. | To exclude the closest vectors from results, ensure that:
`range_filter` <= distance < `radius` |
+
+To learn more about distance metric types, refer to [Similarity Metrics](metric.md).
+
+## Grouping search
+
+In Milvus, grouping search by a specific field can avoid redundancy of the same field item in the results. You can get a varied set of results for the specific field.
+
+Consider a collection of documents, each document splits into various passages. Each passage is represented by one vector embedding and belongs to one document. To find relevant documents instead of similar passages, you can include the `group_by_field` argument in the `search()` opeartion to group results by the document ID. This helps return the most relevant and unique documents, rather than separate passages from the same document.
+
+Here is the example code to group search results by field:
+
+```python
+# Connect to Milvus
+client = MilvusClient(uri='http://localhost:19530') # Milvus server address
+
+# Load data into collection
+client.load_collection("group_search") # Collection name
+
+# Group search results
+res = client.search(
+ collection_name="group_search", # Collection name
+ data=[[0.14529211512077012, 0.9147257273453546, 0.7965055218724449, 0.7009258593102812, 0.5605206522382088]], # Query vector
+ search_params={
+ "metric_type": "L2",
+ "params": {"nprobe": 10},
+ }, # Search parameters
+ limit=10, # Max. number of search results to return
+ group_by_field="doc_id", # Group results by document ID
+ output_fields=["doc_id", "passage_id"]
+)
+
+# Retrieve the values in the `doc_id` column
+doc_ids = [result['entity']['doc_id'] for result in res[0]]
+
+print(doc_ids)
+```
+
+The output is similar to the following:
+
+```python
+[5, 10, 1, 7, 9, 6, 3, 4, 8, 2]
+```
+
+In the given output, it can be observed that the returned entities do not contain any duplicate `doc_id` values.
+
+For comparison, let's comment out the `group_by_field` and conduct a regular search:
+
+```python
+# Connect to Milvus
+client = MilvusClient(uri='http://localhost:19530') # Milvus server address
+
+# Load data into collection
+client.load_collection("group_search") # Collection name
+
+# Search without `group_by_field`
+res = client.search(
+ collection_name="group_search", # Collection name
+ data=query_passage_vector, # Replace with your query vector
+ search_params={
+ "metric_type": "L2",
+ "params": {"nprobe": 10},
+ }, # Search parameters
+ limit=10, # Max. number of search results to return
+ # group_by_field="doc_id", # Group results by document ID
+ output_fields=["doc_id", "passage_id"]
+)
+
+# Retrieve the values in the `doc_id` column
+doc_ids = [result['entity']['doc_id'] for result in res[0]]
+
+print(doc_ids)
+```
+
+The output is similar to the following:
+
+```python
+[1, 10, 3, 10, 1, 9, 4, 4, 8, 6]
+```
+
+In the given output, it can be observed that the returned entities contain duplicate `doc_id` values.
+
+__Limitations__
+
+- __Indexing__: This grouping feature works only for collections that are indexed with the __HNSW__, __IVF_FLAT__, or __FLAT__ type. For more information, refer to [In-memory Index](https://milvus.io/docs/index.md#HNSW).
+
+- __Vector__: Currently, grouping search does not support a vector field of the __BINARY_VECTOR__ type. For more information on data types, refer to [Supported data types](https://milvus.io/docs/schema.md#Supported-data-types).
+
+- __Field__: Currently, grouping search allows only for a single column. You cannot specify multiple field names in the `group_by_field` config. Additionally, grouping search is incompatible with data types of JSON, FLOAT, DOUBLE, ARRAY, or vector fields.
+
+- __Performance Impact__: Be mindful that performance degrades with increasing query vector counts. Using a cluster with 2 CPU cores and 8 GB of memory as an example, the execution time for grouping search increases proportionally with the number of input query vectors.
+
+- __Functionality__: Currently, grouping search is not supported by [range search](https://milvus.io/docs/single-vector-search.md#Range-search), [search iterators](https://milvus.io/docs/with-iterators.md#Search-with-iterator), or [hybrid search](multi-vector-search.md).
+
+## Search parameters
+
+In the above searches except the range search, the default search parameters apply. In normal cases, you do not need to manually set search parameters.
+
+```python
+# In normal cases, you do not need to set search parameters manually
+# Except for range searches.
+search_parameters = {
+ 'metric_type': 'L2',
+ 'params': {
+ 'nprobe': 10,
+ 'level': 1,
+ 'radius': 1.0
+ 'range_filter': 0.8
+ }
+}
+```
+
+The following table lists all possible settings in the search parameters.
+
+| __Parameter Name__ | __Parameter Description__ |
+| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `metric_type` | How to measure similarity between vector embeddings.
Possible values are `IP`, `L2`, and `COSINE`, and defaults to that of the loaded index file. |
+| `params.nprobe` | Number of units to query during the search.
The value falls in the range [1, nlist[1]]. |
+| `params.level` | Search precision level.
Possible values are `1`, `2`, and `3`, and defaults to `1`. Higher values yield more accurate results but slower performance. |
+| `params.radius` | Minimum similarity between the query vector and candidate vectors.
The value falls in the range [1, nlist[1]]. |
+| `params.range_filter` | A similarity range, optionally refining the search for vectors that fall in the range.
The value falls in the range [top-K[2], ∞]. |
+
+
+
+
notes
+
+
[1] Number of cluster units after indexing. When indexing a collection, Milvus sub-divides the vector data into multiple cluster units, the number of which varies with the actual index settings.
+
[2] Number of entities to return in a search.
+
+
+
diff --git a/preview/site/en/userGuide/search-query-get/with-iterators.md b/preview/site/en/userGuide/search-query-get/with-iterators.md
new file mode 100644
index 000000000..e9b9d8254
--- /dev/null
+++ b/preview/site/en/userGuide/search-query-get/with-iterators.md
@@ -0,0 +1,596 @@
+---
+id: with-iterators.md
+order: 4
+summary: Milvus provides search and query iterators for iterating results with a large volume of entities.
+title: With Iterators
+---
+
+# With Iterators
+
+Milvus provides search and query iterators for iterating results with a large volume of entities.
+
+## Overview
+
+Iterators are powerful tools that help you iterate through a large volume of or all data within a collection using primary key values and Boolean expressions. This can significantly improve the way you retrieve data. Unlike the traditional use of __offset__ and __limit__ parameters, which may become less efficient over time, iterators offer a more scalable solution.
+
+### Benefits of using iterators
+
+- __Simplicity__: Eliminates the complex __offset__ and __limit__ settings.
+
+- __Efficiency__: Provides scalable data retrieval by fetching only the data in need.
+
+- __Consistency__: Ensures a consistent dataset size with boolean filters.
+
+
+
+
notes
+
+
+
+- This feature is available for Milvus 2.3.x or later.
+
+
+
+
+
+## Preparations
+
+The following steps repurpose the code to connect to Milvus, quickly set up a collection, and insert over 10,000 randomly generated entities into the collection.
+
+### Step 1: Create a collection
+
+
+
+Use [`MilvusClient`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Client/MilvusClient.md) to connect to the Milvus server and [`create_collection()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Collections/create_collection.md) to create a collection.
+
+
+
+
+
+Use [`MilvusClientV2`](https://milvus.io/api-reference/java/v2.4.x/v2/Client/MilvusClientV2.md) to connect to the Milvus server and [`createCollection()`](https://milvus.io/api-reference/java/v2.4.x/v2/Collections/createCollection.md) to create a collection.
+
+
+
+
+
+```python
+from pymilvus import MilvusClient
+
+# 1. Set up a Milvus client
+client = MilvusClient(
+ uri="http://localhost:19530"
+)
+
+# 2. Create a collection
+client.create_collection(
+ collection_name="quick_setup",
+ dimension=5,
+)
+```
+
+```java
+import io.milvus.client.MilvusServiceClient;
+import io.milvus.param.ConnectParam;
+import io.milvus.param.highlevel.collection.CreateSimpleCollectionParam;
+
+String CLUSTER_ENDPOINT = "http://localhost:19530";
+
+// 1. Connect to Milvus server
+ConnectParam connectParam = ConnectParam.newBuilder()
+ .withUri(CLUSTER_ENDPOINT)
+ .build();
+
+MilvusServiceClient client = new MilvusServiceClient(connectParam);
+
+// 2. Create a collection
+CreateSimpleCollectionParam createCollectionParam = CreateSimpleCollectionParam.newBuilder()
+ .withCollectionName("quick_setup")
+ .withDimension(5)
+ .build();
+
+client.createCollection(createCollectionParam);
+```
+
+### Step 2: Insert randomly generated entities
+
+
+
+Use [`insert()`](https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Vector/insert.md) to insert entities into the collection.
+
+
+
+
+
+Use [`insert()`](https://milvus.io/api-reference/java/v2.4.x/v2/Vector/insert.md) to insert entities into the collection.
+
+
+
+
+
+```python
+# 3. Insert randomly generated vectors
+colors = ["green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey"]
+data = []
+
+for i in range(10000):
+ current_color = random.choice(colors)
+ current_tag = random.randint(1000, 9999)
+ data.append({
+ "id": i,
+ "vector": [ random.uniform(-1, 1) for _ in range(5) ],
+ "color": current_color,
+ "tag": current_tag,
+ "color_tag": f"{current_color}_{str(current_tag)}"
+ })
+
+print(data[0])
+
+# Output
+#
+# {
+# "id": 0,
+# "vector": [
+# -0.5705990742218152,
+# 0.39844925120642083,
+# -0.8791287928610869,
+# 0.024163154953680932,
+# 0.6837669917169638
+# ],
+# "color": "purple",
+# "tag": 7774,
+# "color_tag": "purple_7774"
+# }
+
+res = client.insert(
+ collection_name="quick_setup",
+ data=data,
+)
+
+print(res)
+
+# Output
+#
+# {
+# "insert_count": 10000,
+# "ids": [
+# 0,
+# 1,
+# 2,
+# 3,
+# 4,
+# 5,
+# 6,
+# 7,
+# 8,
+# 9,
+# "(9990 more items hidden)"
+# ]
+# }
+```
+
+```java
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+import com.alibaba.fastjson.JSONObject;
+
+import io.milvus.param.R;
+import io.milvus.param.dml.InsertParam;
+import io.milvus.response.MutationResultWrapper;
+import io.milvus.grpc.MutationResult;
+
+
+// 3. Insert randomly generated vectors into the collection
+List colors = Arrays.asList("green", "blue", "yellow", "red", "black", "white", "purple", "pink", "orange", "brown", "grey");
+List data = new ArrayList<>();
+
+for (int i=0; i<10000; i++) {
+ Random rand = new Random();
+ String current_color = colors.get(rand.nextInt(colors.size()-1));
+ JSONObject row = new JSONObject();
+ row.put("id", Long.valueOf(i));
+ row.put("vector", Arrays.asList(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), rand.nextFloat()));
+ row.put("color_tag", current_color + "_" + String.valueOf(rand.nextInt(8999) + 1000));
+ data.add(row);
+}
+
+InsertParam insertParam = InsertParam.newBuilder()
+ .withCollectionName("quick_setup")
+ .withRows(data)
+ .build();
+
+R insertRes = client.insert(insertParam);
+
+if (insertRes.getStatus() != R.Status.Success.getCode()) {
+ System.err.println(insertRes.getMessage());
+}
+
+MutationResultWrapper wrapper = new MutationResultWrapper(insertRes.getData());
+System.out.println(wrapper.getInsertCount());
+```
+
+## Search with iterator
+
+Iterators make similarity searches more scalable.
+
+
+
+To search with an iterator, call the [search_iterator()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/search_iterator.md) method:
+
+
+
+
+
+To search with an iterator, call the [searchIterator()](https://milvus.io/api-reference/java/v2.4.x/v1/QuerySearch/searchIterator.md) method:
+
+
+
+1. Initialize the search iterator to define the search parameters and output fields.
+
+1. Use the __next()__ method within a loop to paginate through the search results.
+
+ - If the method returns an empty array, the loop ends, and no more pages are available.
+
+ - All results carry the specified output fields.
+
+1. Manually call the __close()__ method to close the iterator once all data has been retrieved.
+
+
+
+```python
+from pymilvus import Collection
+
+# 4. Search with iterator
+connections.connect(host="127.0.0.1", port=19530)
+collection = Collection("quick_setup")
+
+query_vectors = [[0.3580376395471989, -0.6023495712049978, 0.18414012509913835, -0.26286205330961354, 0.9029438446296592]]
+search_params = {
+ "metric_type": "IP",
+ "params": {"nprobe": 10}
+}
+
+iterator = collection.search_iterator(
+ data=query_vectors,
+ anns_field="vector",
+ batch_size=10,
+ param=search_params,
+ output_fields=["color_tag"],
+ limit=3
+)
+
+results = []
+
+while True:
+ result = iterator.next()
+ if not result:
+ iterator.close()
+ break
+
+ results.extend(result)
+
+ for hit in result:
+ results.append(hit.to_dict())
+
+print(results)
+
+# Output
+#
+# [
+# {
+# "id": 1756,
+# "distance": 2.0642056465148926,
+# "entity": {
+# "color_tag": "black_9109"
+# }
+# },
+# {
+# "id": 6488,
+# "distance": 1.9437453746795654,
+# "entity": {
+# "color_tag": "purple_8164"
+# }
+# },
+# {
+# "id": 3338,
+# "distance": 1.9107104539871216,
+# "entity": {
+# "color_tag": "brown_8121"
+# }
+# }
+# ]
+```
+
+```java
+import io.milvus.param.dml.QueryIteratorParam;
+import io.milvus.param.dml.SearchIteratorParam;
+import io.milvus.response.QueryResultsWrapper;
+import io.milvus.orm.iterator.SearchIterator;
+
+// 4. Search with iterators
+SearchIteratorParam iteratorParam = SearchIteratorParam.newBuilder()
+ .withCollectionName("quick_setup")
+ .withVectorFieldName("vector")
+ // Use withFloatVectors() in clusters compatible with Milvus 2.4.x
+ .withVectors(Arrays.asList(0.3580376395471989f, -0.6023495712049978f, 0.18414012509913835f, -0.26286205330961354f, 0.9029438446296592f))
+ .withBatchSize(10L)
+ .withParams("{\"metric_type\": \"COSINE\", \"params\": {\"level\": 1}}")
+ .build();
+
+
+R searchIteratorRes = client.searchIterator(iteratorParam);
+
+if (searchIteratorRes.getStatus() != R.Status.Success.getCode()) {
+ System.err.println(searchIteratorRes.getMessage());
+}
+
+SearchIterator searchIterator = searchIteratorRes.getData();
+List results = new ArrayList<>();
+
+while (true) {
+ List batchResults = searchIterator.next();
+ if (batchResults.isEmpty()) {
+ searchIterator.close();
+ break;
+ }
+ for (QueryResultsWrapper.RowRecord rowRecord : batchResults) {
+ results.add(rowRecord);
+ }
+}
+
+System.out.println(results.size());
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ data |
+ A list of vector embeddings. Milvus searches for the most similar vector embeddings to the specified ones. |
+
+
+ anns_field |
+ The name of the vector field in the current collection. |
+
+
+ batch_size |
+ The number of entities to return each time you call next() on the current iterator. The value defaults to 1000. Set it to a proper value to control the number of entities to return per iteration. |
+
+
+ param |
+ The parameter settings specific to this operation.
metric_type : The metric type applied to this operation. This should be the same as the one used when you index the vector field specified above. Possible values are L2, IP, COSINE, JACCARD, HAMMING.params : Additional parameters. For details, refer to search_iterator().
|
+
+
+ output_fields |
+ A list of field names to include in each entity in return. The value defaults to None. If left unspecified, only the primary field is included. |
+
+
+ limit |
+ The total number of entities to return. The value defaults to -1, indicating all matching entities will be in return. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ withCollectionName |
+ Set the collection name. Collection name cannot be empty or null. |
+
+
+ withVectorFieldName |
+ Set target vector field by name. Field name cannot be empty or null. |
+
+
+ withVectors |
+ Set the target vectors. Up to 16384 vectors allowed. |
+
+
+ withBatchSize |
+ The number of entities to return each time you call next() on the current iterator. The value defaults to 1000. Set it to a proper value to control the number of entities to return per iteration. |
+
+
+ withParams |
+ Specifies the parameters of search in JSON format. For more information, refer to searchIterator(). |
+
+
+
+
+## Query with an iterator
+
+
+
+To query with an iterator, call the [query_iterator()](https://milvus.io/api-reference/pymilvus/v2.4.x/ORM/Collection/query_iterator.md) method:
+
+
+
+
+
+To search with an iterator, call the [queryIterator()](https://milvus.io/api-reference/java/v2.4.x/v1/QuerySearch/queryIterator.md) method:
+
+
+
+
+
+```python
+# 6. Query with iterator
+iterator = collection.query_iterator(
+ batch_size=10, # Controls the size of the return each time you call next()
+ expr="color_tag like \"brown_8\"",
+ output_fields=["color_tag"]
+)
+
+results = []
+
+while True:
+ result = iterator.next()
+ if not result:
+ iterator.close()
+ break
+
+ results.extend(result)
+
+# 8. Check the search results
+print(len(results))
+
+print(results[:3])
+
+# Output
+#
+# [
+# {
+# "color_tag": "brown_8785",
+# "id": 94
+# },
+# {
+# "color_tag": "brown_8568",
+# "id": 176
+# },
+# {
+# "color_tag": "brown_8721",
+# "id": 289
+# }
+# ]
+```
+
+```java
+import io.milvus.param.dml.QueryIteratorParam;
+import io.milvus.orm.iterator.QueryIterator;
+
+// 5. Query with iterators
+
+try {
+ Files.write(Path.of("results.json"), JSON.toJSONString(new ArrayList<>()).getBytes(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
+} catch (Exception e) {
+ // TODO: handle exception
+ e.printStackTrace();
+}
+
+QueryIteratorParam queryIteratorParam = QueryIteratorParam.newBuilder()
+ .withCollectionName("quick_setup")
+ .withExpr("color_tag like \"brown_8%\"")
+ .withBatchSize(50L)
+ .addOutField("vector")
+ .addOutField("color_tag")
+ .build();
+
+R queryIteratRes = client.queryIterator(queryIteratorParam);
+
+if (queryIteratRes.getStatus() != R.Status.Success.getCode()) {
+ System.err.println(queryIteratRes.getMessage());
+}
+
+QueryIterator queryIterator = queryIteratRes.getData();
+
+while (true) {
+ List batchResults = queryIterator.next();
+ if (batchResults.isEmpty()) {
+ queryIterator.close();
+ break;
+ }
+
+ String jsonString = "";
+ List jsonObject = new ArrayList<>();
+ try {
+ jsonString = Files.readString(Path.of("results.json"));
+ jsonObject = JSON.parseArray(jsonString).toJavaList(null);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ for (QueryResultsWrapper.RowRecord queryResult : batchResults) {
+ JSONObject row = new JSONObject();
+ row.put("id", queryResult.get("id"));
+ row.put("vector", queryResult.get("vector"));
+ row.put("color_tag", queryResult.get("color_tag"));
+ jsonObject.add(row);
+ }
+
+ try {
+ Files.write(Path.of("results.json"), JSON.toJSONString(jsonObject).getBytes(), StandardOpenOption.WRITE);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+}
+```
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ batch_size |
+ The number of entities to return each time you call next() on the current iterator. The value defaults to 1000. Set it to a proper value to control the number of entities to return per iteration. |
+
+
+ expr |
+ A scalar filtering condition to filter matching entities. The value defaults to None, indicating that scalar filtering is ignored. To build a scalar filtering condition, refer to Boolean Expression Rules. |
+
+
+ output_fields |
+ A list of field names to include in each entity in return. The value defaults to None. If left unspecified, only the primary field is included. |
+
+
+ limit |
+ The total number of entities to return. The value defaults to -1, indicating all matching entities will be in return. |
+
+
+
+
+
+
+
+ Parameter |
+ Description |
+
+
+
+
+ withCollectionName |
+ Set the collection name. Collection name cannot be empty or null. |
+
+
+ withExpr |
+ Set the expression to query entities. To build a scalar filtering condition, refer to Boolean Expression Rules. |
+
+
+ withBatchSize |
+ The number of entities to return each time you call next() on the current iterator. The value defaults to 1000. Set it to a proper value to control the number of entities to return per iteration. |
+
+
+ addOutField |
+ Specifies an output scalar field (Optional). |
+
+
+
diff --git a/preview/site/en/userGuide/search/hybridsearch.md b/preview/site/en/userGuide/search/hybridsearch.md
deleted file mode 100644
index 8189ae294..000000000
--- a/preview/site/en/userGuide/search/hybridsearch.md
+++ /dev/null
@@ -1,579 +0,0 @@
----
-id: hybridsearch.md
-related_key: filter
-summary: Conduct a Hybrid Search with Milvus.
----
-
-# Conduct a Hybrid Search
-
-This topic describes how to conduct a hybrid search.
-
-A hybrid search is essentially a vector search with attribute filtering. By specifying [boolean expressions](boolean.md) that filter the scalar fields or the primary key field, you can limit your search with certain conditions.
-
-The following example shows how to perform a hybrid search on the basis of a regular [vector search](search.md). Suppose you want to search for certain books based on their vectorized introductions, but you only want those within a specific range of word count. You can then specify the boolean expression to filter the `word_count` field in the search parameters. Milvus will search for similar vectors only among those entities that match the expression.
-
-
-## Load collection
-
-All search and query operations within Milvus are executed in memory. Load the collection to memory before conducting a vector search.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load()
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.LoadCollection(
- context.Background(), // ctx
- "book", // CollectionName
- false // async
-)
-if err != nil {
- log.Fatal("failed to load collection:", err.Error())
-}
-```
-
-```java
-milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-load -c book
-```
-
-```curl
-# See the following step.
-```
-
-## Conduct a hybrid vector search
-
-By specifying the boolean expression, you can filter the scalar field of the entities during the vector search. The following example limits the scale of search to the vectors within a specified `word_count` value range.
-
-
-
-
-```python
-search_param = {
- "data": [[0.1, 0.2]],
- "anns_field": "book_intro",
- "param": {"metric_type": "L2", "params": {"nprobe": 10}},
- "offset": 0,
- "limit": 2,
- "expr": "word_count <= 11000",
-}
-res = collection.search(**search_param)
-```
-
-```javascript
-const results = await milvusClient.dataManager.search({
- collection_name: "book",
- expr: "word_count <= 11000",
- vectors: [[0.1, 0.2]],
- search_params: {
- anns_field: "book_intro",
- topk: "2",
- metric_type: "L2",
- params: JSON.stringify({ nprobe: 10 }),
- },
- vector_type: 101, // DataType.FloatVector,
-});
-```
-
-```go
-sp, _ := entity.NewIndexFlatSearchParam( // NewIndex*SearchParam func
- 10, // searchParam
-)
-searchResult, err := milvusClient.Search(
- context.Background(), // ctx
- "book", // CollectionName
- []string{}, // partitionNames
- "word_count <= 11000", // expr
- []string{"book_id"}, // outputFields
- []entity.Vector{entity.FloatVector([]float32{0.1, 0.2})}, // vectors
- "book_intro", // vectorField
- entity.L2, // metricType
- 2, // topK
- sp, // sp
-)
-if err != nil {
- log.Fatal("fail to search collection:", err.Error())
-}
-```
-
-```java
-final Integer SEARCH_K = 2;
-final String SEARCH_PARAM = "{\"nprobe\":10, \”offset\”:5}";
-List search_output_fields = Arrays.asList("book_id");
-List> search_vectors = Arrays.asList(Arrays.asList(0.1f, 0.2f));
-
-SearchParam searchParam = SearchParam.newBuilder()
- .withCollectionName("book")
- .withMetricType(MetricType.L2)
- .withOutFields(search_output_fields)
- .withTopK(SEARCH_K)
- .withVectors(search_vectors)
- .withVectorFieldName("book_intro")
- .withExpr("word_count <= 11000")
- .withParams(SEARCH_PARAM)
- .build();
-R respSearch = milvusClient.search(searchParam);
-```
-
-```shell
-search
-
-Collection name (book): book
-
-The vectors of search data(the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a csv file without headers): [[0.1, 0.2]]
-
-The vector field used to search of collection (book_intro): book_intro
-
-Metric type: L2
-
-Search parameter nprobe's value: 10
-
-The max number of returned record, also known as topk: 2
-
-The boolean expression used to filter attribute []: word_count <= 11000
-
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-
-timeout []:
-
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "output_fields": ["book_id"],
- "search_params": [
- {"key": "anns_field", "value": "book_intro"},
- {"key": "topk", "value": "2"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"},
- {"key": "round_decimal", "value": "-1"}
- ],
- "vectors": [ [0.1,0.2] ],
- "dsl": "word_count >= 11000",
- "dsl_type": 1
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":2,
- "fields_data":[
- {
- "type":5,
- "field_name":"book_id",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[11,12]}}}},
- "field_id":100
- }
- ],
- "scores":[119.44999,142.24998],
- "ids":{"IdField":{"IntId":{"data":[11,12]}}},"topks":[2]
- },
- "collection_name":"book"
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- data |
- Vectors to search with. |
-
-
- anns_field |
- Name of the field to search on. |
-
-
- params |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
- offset |
- Number of results to skip in the returned set. The sum of this value and `limit` should be less than 65535. |
-
-
- limit |
- Number of the most similar results to return. |
-
-
- expr |
- Boolean expression used to filter attribute. See Boolean Expression Rules for more information. |
-
-
- partition_names (optional) |
- List of names of the partition to search in. The sum of this value and `offset` should be less than 65535. |
-
-
- output_fields (optional) |
- Name of the field to return. Vector field is not supported in current release. |
-
-
- timeout (optional) |
- A duration of time in seconds to allow for RPC. Clients wait until server responds or error occurs when it is set to None. |
-
-
- round_decimal (optional) |
- Number of decimal places of returned distance. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to search in. |
-
-
- search_params |
- Parameters (as an object) used for search. |
-
-
- vectors |
- Vectors to search with. |
-
-
- vector_type |
- Pre-check of binary or float vectors. 100 for binary vectors and 101 for float vectors. |
-
-
- partition_names (optional) |
- List of names of the partition to search in. |
-
-
- expr (optional) |
- Boolean expression used to filter attribute. See Boolean Expression Rules for more information. |
-
-
- output_fields (optional) |
- Name of the field to return. Vector field not support in current release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- NewIndex*SearchParam func |
- Function to create entity.SearchParam according to different index types. |
- For floating point vectors:
-
- NewIndexFlatSearchParam (FLAT)
- NewIndexIvfFlatSearchParam (IVF_FLAT)
- NewIndexIvfSQ8SearchParam (IVF_SQ8)
- NewIndexIvfPQSearchParam (RNSG)
- NewIndexRNSGSearchParam (HNSW)
- NewIndexHNSWSearchParam (HNSW)
- NewIndexANNOYSearchParam (ANNOY)
- NewIndexRHNSWFlatSearchParam (RHNSW_FLAT)
- NewIndexRHNSW_PQSearchParam (RHNSW_PQ)
- NewIndexRHNSW_SQSearchParam (RHNSW_SQ)
-
- For binary vectors:
-
- NewIndexBinFlatSearchParam (BIN_FLAT)
- NewIndexBinIvfFlatSearchParam (BIN_IVF_FLAT)
-
- |
-
-
- searchParam |
- Search parameter(s) specific to the index. |
- See Vector Index for more information. |
-
-
- ctx |
- Context to control API invocation process. |
- N/A |
-
-
- CollectionName |
- Name of the collection to load. |
- N/A |
-
-
- partitionNames |
- List of names of the partitions to load. All partitions will be searched if it is left empty. |
- N/A |
-
-
- expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- output_fields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
- vectors |
- Vectors to search with. |
- N/A |
-
-
- vectorField |
- Name of the field to search on. |
- N/A |
-
-
- metricType |
- Metric type used for search. |
- This parameter must be set identical to the metric type used for index building. |
-
-
- topK |
- Number of the most similar results to return. |
- N/A |
-
-
- sp |
- entity.SearchParam specific to the index. |
- N/A |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- CollectionName |
- Name of the collection to load. |
- N/A |
-
-
- MetricType |
- Metric type used for search. |
- This parameter must be set identical to the metric type used for index building. |
-
-
- OutFields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
- TopK |
- Number of the most similar results to return. |
- N/A |
-
-
- Vectors |
- Vectors to search with. |
- N/A |
-
-
- VectorFieldName |
- Name of the field to search on. |
- N/A |
-
-
- Expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- Params |
- Search parameter(s) specific to the index. |
- See Vector Index for more information. |
-
-
-
-
-
-
-
- Option |
- Full name |
- Description |
-
-
-
-
- --help |
- n/a |
- Displays help for using the command. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- output_fields (optional) |
- Name of the field to return. Vector field is not supported in current release. |
-
-
- anns_field |
- Name of the field to search on. |
-
-
- topk |
- Number of the most similar results to return. |
-
-
- params |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
- metric_type |
- Metric type used for search. This parameter must be set identical to the metric type used for index building. |
-
-
- round_decimal (optional) |
- Number of decimal places of returned distance. |
-
-
- Vectors |
- Vectors to search with. |
-
-
- dsl |
- Boolean expression used to filter attribute. Find more expression details in Boolean Expression Rules. |
-
-
- dsl_type |
- Type of dsl (Data Search Language) field:
- 0: "Dsl"
- 1: "BoolExprV1"
- |
-
-
-
-
-Check the returned results.
-
-
-
-
-```python
-assert len(res) == 1
-hits = res[0]
-assert len(hits) == 2
-print(f"- Total hits: {len(hits)}, hits ids: {hits.ids} ")
-print(f"- Top1 hit id: {hits[0].id}, distance: {hits[0].distance}, score: {hits[0].score} ")
-```
-
-```javascript
-console.log(results.results)
-```
-
-```go
-fmt.Printf("%#v\n", searchResult)
-for _, sr := range searchResult {
- fmt.Println(sr.IDs)
- fmt.Println(sr.Scores)
-}
-```
-
-```java
-SearchResultsWrapper wrapperSearch = new SearchResultsWrapper(respSearch.getData().getResults());
-System.out.println(wrapperSearch.getIDScore(0));
-System.out.println(wrapperSearch.getFieldData("book_id", 0));
-```
-
-```shell
-# Milvus CLI automatically returns the primary key values of the most similar vectors and their distances.
-```
-
-```curl
-# See the output of the previous step.
-```
-
-## What's next
-
-- Try [Search with Time Travel](timetravel.md)
-
-- Explore API references for Milvus SDKs:
-
- - [PyMilvus API reference](/api-reference/pymilvus/v2.2.2/About.md)
- - [Node.js API reference](/api-reference/node/v2.2.x/About.md)
- - [Go API reference](/api-reference/go/v2.2.0/About.md)
- - [Java API reference](/api-reference/java/v2.2.1/About.md)
-
-
diff --git a/preview/site/en/userGuide/search/query.md b/preview/site/en/userGuide/search/query.md
deleted file mode 100644
index 8fb8b8f9a..000000000
--- a/preview/site/en/userGuide/search/query.md
+++ /dev/null
@@ -1,409 +0,0 @@
----
-id: query.md
-related_key: query vectors
-summary: Learn how to query vectors in Milvus.
----
-
-# Conduct a Vector Query
-
-This topic describes how to conduct a vector query.
-
-Unlike a vector similarity search, a vector query retrieves vectors via scalar filtering based on [boolean expression](boolean.md). Milvus supports many data types in the scalar fields and a variety of boolean expressions. The boolean expression filters on scalar fields or the primary key field, and it retrieves all results that match the filters.
-
-The following example shows how to perform a vector query on a 2000-row dataset of book ID (primary key), word count (scalar field), and book introduction (vector field), simulating the situation where you query for certain books based on their IDs.
-
-
-## Load collection
-
-All search and query operations within Milvus are executed in memory. Load the collection to memory before conducting a vector query.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load()
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.LoadCollection(
- context.Background(), // ctx
- "book", // CollectionName
- false // async
-)
-if err != nil {
- log.Fatal("failed to load collection:", err.Error())
-}
-```
-
-```java
-milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-load -c book
-```
-
-```curl
-# See the following step.
-```
-
-## Conduct a vector query
-
-The following example filters the vectors with certain `book_id` values, and returns the `book_id` field and `book_intro` of the results.
-
-Milvus supports setting consistency level specifically for a query. The example in this topic sets the consistency level as `Strong`. You can also set the consistency level as `Bounded`, `Session` or `Eventually`. See [Consistency](consistency.md) for more information about the four consistency levels in Milvus.
-
-
-
-
-```python
-res = collection.query(
- expr = "book_id in [2,4,6,8]",
- offset = 0,
- limit = 10,
- output_fields = ["book_id", "book_intro"],
- consistency_level="Strong"
-)
-```
-
-```javascript
-const results = await milvusClient.dataManager.query({
- collection_name: "book",
- expr: "book_id in [2,4,6,8]",
- output_fields: ["book_id", "book_intro"],
-});
-```
-
-```go
-queryResult, err := milvusClient.Query(
- context.Background(), // ctx
- "book", // CollectionName
- "", // PartitionName
- entity.NewColumnInt64("book_id", []int64{2,4,6,8}), // expr
- []string{"book_id", "book_intro"} // OutputFields
-)
-if err != nil {
- log.Fatal("fail to query collection:", err.Error())
-}
-```
-
-```java
-List query_output_fields = Arrays.asList("book_id", "word_count");
-QueryParam queryParam = QueryParam.newBuilder()
- .withCollectionName("book")
- .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
- .withExpr("book_id in [2,4,6,8]")
- .withOutFields(query_output_fields)
- .withOffset(0L)
- .withLimit(10L)
- .build();
-R respQuery = milvusClient.query(queryParam);
-```
-
-```shell
-query
-
-collection_name: book
-
-The query expression: book_id in [2,4,6,8]
-
-Name of partitions that contain entities(split by "," if multiple) []:
-
-A list of fields to return(split by "," if multiple) []: book_id, book_intro
-
-timeout []:
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/query' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "output_fields": ["book_id", "book_intro"],
- "vectors": [ [0.1,0.2] ],
- "expr": "book_id in [2,4,6,8]"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "fields_data":[
- {
- "type":5,
- "field_name":"book_id",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[6,8,2,4]}}}},
- "field_id":100
- },
- {
- "type":101,
- "field_name":"book_intro",
- "Field":{"Vectors":{"dim":2,"Data":{"FloatVector":{"data":[6,1,8,1,2,1,4,1]}}}},
- "field_id":102
- }
- ]
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- expr |
- Boolean expression used to filter attribute. Find more expression details in Boolean Expression Rules. |
-
-
- offset |
- Number of results to skip in the returned set. The sum of this value and `limit` should be less than 65535. |
-
-
- limit |
- Number of the most similar results to return. The sum of this value and `offset` should be less than 65535. |
-
-
- output_fields (optional) |
- List of names of the field to return. |
-
-
- partition_names (optional) |
- List of names of the partitions to query on. |
-
-
- consistency_level (optional) |
- Consistency level of the query. |
-
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to query. |
-
-
- expr |
- Boolean expression used to filter attribute. Find more expression details in Boolean Expression Rules. |
-
-
- output_fields (optional) |
- List of names of the field to return. |
-
-
- partition_names (optional) |
- List of names of the partitions to query on. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- ctx |
- Context to control API invocation process. |
- N/A |
-
-
- CollectionName |
- Name of the collection to query. |
- N/A |
-
-
- partitionName |
- List of names of the partitions to load. All partitions will be queried if it is left empty. |
- N/A |
-
-
- expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- OutputFields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- CollectionName |
- Name of the collection to load. |
- N/A |
-
-
- OutFields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
- Expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- ConsistencyLevel |
- The consistency level used in the query. |
- STRONG , BOUNDED , andEVENTUALLY . |
-
-
-
-
-
-
-
- Option |
- Full name |
- Description |
-
-
-
-
- --help |
- n/a |
- Displays help for using the command. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- output_fields (optional) |
- List of names of the fields to return. |
-
-
- vectors |
- Vectors to query. |
-
-
- expr |
- Boolean expression used to filter attribute. Find more expression details in Boolean Expression Rules. |
-
-
-
-
-Check the returned results.
-
-
-
-
-```python
-sorted_res = sorted(res, key=lambda k: k['book_id'])
-sorted_res
-```
-
-```javascript
-console.log(results.data)
-```
-
-```go
-fmt.Printf("%#v\n", queryResult)
-for _, qr := range queryResult {
- fmt.Println(qr.IDs)
-}
-```
-
-```java
-QueryResultsWrapper wrapperQuery = new QueryResultsWrapper(respQuery.getData());
-System.out.println(wrapperQuery.getFieldWrapper("book_id").getFieldData());
-System.out.println(wrapperQuery.getFieldWrapper("word_count").getFieldData());
-```
-
-```shell
-# Milvus CLI automatically returns the entities with the pre-defined output fields.
-```
-
-```curl
-# See the output of the previous step.
-```
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Conduct a vector search](search.md)
- - [Conduct a hybrid search](hybridsearch.md)
- - [Search with Time Travel](timetravel.md)
-
-- Explore API references for Milvus SDKs:
-
- - [PyMilvus API reference](/api-reference/pymilvus/v2.2.2/About.md)
- - [Node.js API reference](/api-reference/node/v2.2.x/About.md)
- - [Go API reference](/api-reference/go/v2.2.0/About.md)
- - [Java API reference](/api-reference/java/v2.2.1/About.md)
-
-
diff --git a/preview/site/en/userGuide/search/search.md b/preview/site/en/userGuide/search/search.md
deleted file mode 100644
index bb89ff8ed..000000000
--- a/preview/site/en/userGuide/search/search.md
+++ /dev/null
@@ -1,758 +0,0 @@
----
-id: search.md
-related_key: search
-summary: Conduct a vector similarity search with Milvus.
----
-
-# Conduct a Vector Similarity Search
-
-This topic describes how to search entities with Milvus.
-
-A vector similarity search in Milvus calculates the distance between query vector(s) and vectors in the collection with specified similarity metrics, and returns the most similar results. By specifying a [boolean expression](boolean.md) that filters the scalar field or the primary key field, you can perform a [hybrid search](hybridsearch.md) or even a search with [Time Travel](timetravel.md).
-
-The following example shows how to perform a vector similarity search on a 2000-row dataset of book ID (primary key), word count (scalar field), and book introduction (vector field), simulating the situation that you search for certain books based on their vectorized introductions. Milvus will return the most similar results according to the query vector and search parameters you have defined.
-
-
-## Load collection
-
-All search and query operations within Milvus are executed in memory. Load the collection to memory before conducting a vector similarity search.
-
-
-
-
-```python
-from pymilvus import Collection
-collection = Collection("book") # Get an existing collection.
-collection.load()
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "book",
-});
-```
-
-```go
-err := milvusClient.LoadCollection(
- context.Background(), // ctx
- "book", // CollectionName
- false // async
-)
-if err != nil {
- log.Fatal("failed to load collection:", err.Error())
-}
-```
-
-```java
-milvusClient.loadCollection(
- LoadCollectionParam.newBuilder()
- .withCollectionName("book")
- .build()
-);
-```
-
-```shell
-load -c book
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-## Prepare search parameters
-
-Prepare the parameters that suit your search scenario. The following example defines that the search will calculate the distance with Euclidean distance, and retrieve vectors from ten closest clusters built by the IVF_FLAT index.
-
-
-
-
-```python
-search_params = {"metric_type": "L2", "params": {"nprobe": 10}, "offset": 5}
-```
-
-```javascript
-const searchParams = {
- anns_field: "book_intro",
- topk: "2",
- metric_type: "L2",
- params: JSON.stringify({ nprobe: 10 }),
-};
-```
-
-```go
-sp, _ := entity.NewIndexFlatSearchParam( // NewIndex*SearchParam func
- 10, // searchParam
-)
-```
-
-```java
-final Integer SEARCH_K = 2; // TopK
-final String SEARCH_PARAM = "{\"nprobe\":10, \”offset\”:5}"; // Params
-```
-
-```shell
-search
-
-Collection name (book): book
-
-The vectors of search data(the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a csv file without headers): [[0.1, 0.2]]
-
-The vector field used to search of collection (book_intro): book_intro
-
-Metric type: L2
-
-Search parameter nprobe's value: 10
-
-The max number of returned record, also known as topk: 10
-
-The boolean expression used to filter attribute []:
-
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-
-timeout []:
-
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book",
- "output_fields": ["book_id"],
- "search_params": [
- {"key": "anns_field", "value": "book_intro"},
- {"key": "topk", "value": "2"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"},
- {"key": "round_decimal", "value": "-1"}
- ],
- "vectors": [ [0.1,0.2] ],
- "dsl_type": 1
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":2,
- "fields_data":[
- {
- "type":5,
- "field_name":"book_id",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[1,2]}}}},
- "field_id":100
- }
- ],
- "scores":[1.45,4.25],
- "ids":{"IdField":{"IntId":{"data":[1,2]}}},
- "topks":[2]},
- "collection_name":"book"
-}
-```
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- metric_type |
- Metrics used to measure similarity of vectors. See Simlarity Metrics for more information. |
-
-
- params |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- anns_field |
- Name of the field to search on. |
-
-
- topk |
- Number of the most similar results to return. |
-
-
- metric_type |
- Metrics used to measure similarity of vectors. See Simlarity Metrics for more information. |
-
-
- params |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- NewIndex*SearchParam func |
- Function to create entity.SearchParam according to different index types. |
- For floating point vectors:
-
- NewIndexFlatSearchParam (FLAT)
- NewIndexIvfFlatSearchParam (IVF_FLAT)
- NewIndexIvfSQ8SearchParam (IVF_SQ8)
- NewIndexIvfPQSearchParam (RNSG)
- NewIndexRNSGSearchParam (HNSW)
- NewIndexHNSWSearchParam (HNSW)
- NewIndexANNOYSearchParam (ANNOY)
- NewIndexRHNSWFlatSearchParam (RHNSW_FLAT)
- NewIndexRHNSW_PQSearchParam (RHNSW_PQ)
- NewIndexRHNSW_SQSearchParam (RHNSW_SQ)
-
- For binary vectors:
-
- NewIndexBinFlatSearchParam (BIN_FLAT)
- NewIndexBinIvfFlatSearchParam (BIN_IVF_FLAT)
-
- |
-
-
- searchParam |
- Search parameter(s) specific to the index. |
- See Vector Index for more information. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- TopK |
- Number of the most similar results to return. |
- N/A |
-
-
- Params |
- Search parameter(s) specific to the index. |
- See Vector Index for more information. |
-
-
-
-
-
-
-
-
- Option |
- Full name |
- Description |
-
-
-
-
- --help |
- n/a |
- Displays help for using the command. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- output_fields (optional) |
- Name of the field to return. Vector field is not supported in current release. |
-
-
- anns_field |
- Name of the field to search on. |
-
-
- topk |
- Number of the most similar results to return. |
-
-
- params |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
- metric_type |
- Metrics used to measure similarity of vectors. See Simlarity Metrics for more information. |
-
-
- round_decimal (optional) |
- Number of decimal places of returned distance. |
-
-
- Vectors |
- Vectors to search with. |
-
-
- dsl_type |
- Type of dsl (Data Search Language) field:
- 0: "Dsl"
- 1: "BoolExprV1"
- |
-
-
-
-
-## Conduct a vector search
-
-Search vectors with Milvus. To search in a specific [partition](glossary.md#Partition), specify the list of partition names.
-
-Milvus supports setting consistency level specifically for a search. The example in this topic sets the consistency level as `Strong`. You can also set the consistency level as `Bounded`, `Session` or `Eventually`. See [Consistency](consistency.md) for more information about the four consistency levels in Milvus.
-
-
-
-
-```python
-results = collection.search(
- data=[[0.1, 0.2]],
- anns_field="book_intro",
- param=search_params,
- limit=10,
- expr=None,
- consistency_level="Strong"
-)
-```
-
-```javascript
-const results = await milvusClient.dataManager.search({
- collection_name: "book",
- expr: "",
- vectors: [[0.1, 0.2]],
- search_params: searchParams,
- vector_type: 101, // DataType.FloatVector
-});
-```
-
-```go
-searchResult, err := milvusClient.Search(
- context.Background(), // ctx
- "book", // CollectionName
- []string{}, // partitionNames
- "", // expr
- []string{"book_id"}, // outputFields
- []entity.Vector{entity.FloatVector([]float32{0.1, 0.2})}, // vectors
- "book_intro", // vectorField
- entity.L2, // metricType
- 2, // topK
- sp, // sp
-)
-if err != nil {
- log.Fatal("fail to search collection:", err.Error())
-}
-```
-
-```java
-List search_output_fields = Arrays.asList("book_id");
-List> search_vectors = Arrays.asList(Arrays.asList(0.1f, 0.2f));
-
-SearchParam searchParam = SearchParam.newBuilder()
- .withCollectionName("book")
- .withConsistencyLevel(ConsistencyLevelEnum.STRONG)
- .withMetricType(MetricType.L2)
- .withOutFields(search_output_fields)
- .withTopK(SEARCH_K)
- .withVectors(search_vectors)
- .withVectorFieldName("book_intro")
- .withParams(SEARCH_PARAM)
- .build();
-R respSearch = milvusClient.search(searchParam);
-```
-
-```shell
-# Follow the previous step.
-```
-
-```curl
-# Follow the previous step.
-```
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- data |
- Vectors to search with. |
-
-
- anns_field |
- Name of the field to search on. |
-
-
- param |
- Search parameter(s) specific to the index. See Vector Index for more information. |
-
-
- offset |
- Number of results to skip in the returned set. The sum of this value and `limit` should be less than 16384. |
-
-
- limit |
- Number of the most similar results to return. The sum of this value and `offset` should be less than 16384. |
-
-
- expr |
- Boolean expression used to filter attribute. See Boolean Expression Rules for more information. |
-
-
- partition_names (optional) |
- List of names of the partition to search in. |
-
-
- output_fields (optional) |
- Name of the field to return. Vector field is not supported in current release. |
-
-
- timeout (optional) |
- A duration of time in seconds to allow for RPC. Clients wait until server responds or error occurs when it is set to None. |
-
-
- round_decimal (optional) |
- Number of decimal places of returned distance. |
-
-
- consistency_level (optional) |
- Consistency level of the search. |
-
-
-
-
-
-
-
- Parameter |
- Description |
-
-
-
-
- collection_name |
- Name of the collection to search in. |
-
-
- search_params |
- Parameters (as an object) used for search. |
-
-
- vectors |
- Vectors to search with. |
-
-
- vector_type |
- Pre-check of binary or float vectors. 100 for binary vectors and 101 for float vectors. |
-
-
- partition_names (optional) |
- List of names of the partition to search in. |
-
-
- expr (optional) |
- Boolean expression used to filter attribute. See Boolean Expression Rules for more information. |
-
-
- output_fields (optional) |
- Name of the field to return. Vector field is not supported in current release. |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- ctx |
- Context to control API invocation process. |
- N/A |
-
-
- CollectionName |
- Name of the collection to load. |
- N/A |
-
-
- partitionNames |
- List of names of the partitions to load. All partitions will be searched if it is left empty. |
- N/A |
-
-
- expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- output_fields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
- vectors |
- Vectors to search with. |
- N/A |
-
-
- vectorField |
- Name of the field to search on. |
- N/A |
-
-
- metricType |
- Metric type used for search. |
- This parameter must be set identical to the metric type used for index building. |
-
-
- topK |
- Number of the most similar results to return. |
- N/A |
-
-
- sp |
- entity.SearchParam specific to the index. |
- N/A |
-
-
-
-
-
-
-
- Parameter |
- Description |
- Options |
-
-
-
-
- CollectionName |
- Name of the collection to load. |
- N/A |
-
-
- MetricType |
- Metric type used for search. |
- This parameter must be set identical to the metric type used for index building. |
-
-
- OutFields |
- Name of the field to return. |
- Vector field is not supported in current release. |
-
-
- Vectors |
- Vectors to search with. |
- N/A |
-
-
- VectorFieldName |
- Name of the field to search on. |
- N/A |
-
-
- Expr |
- Boolean expression used to filter attribute. |
- See Boolean Expression Rules for more information. |
-
-
- ConsistencyLevel |
- The consistency level used in the query. |
- STRONG , BOUNDED , andEVENTUALLY . |
-
-
-
-
-
-
-Check the primary key values of the most similar vectors and their distances.
-
-
-
-
-```python
-results[0].ids
-results[0].distances
-```
-
-```javascript
-console.log(results.results)
-```
-
-```go
-fmt.Printf("%#v\n", searchResult)
-for _, sr := range searchResult {
- fmt.Println(sr.IDs)
- fmt.Println(sr.Scores)
-}
-```
-
-```java
-SearchResultsWrapper wrapperSearch = new SearchResultsWrapper(respSearch.getData().getResults());
-System.out.println(wrapperSearch.getIDScore(0));
-System.out.println(wrapperSearch.getFieldData("book_id", 0));
-```
-
-```shell
-# Milvus CLI automatically returns the primary key values of the most similar vectors and their distances.
-```
-
-Release the collection loaded in Milvus to reduce memory consumption when the search is completed.
-
-
-
-
-```python
-collection.release()
-```
-
-```javascript
-await milvusClient.collectionManager.releaseCollection({ collection_name: "book",});
-```
-
-```go
-err := milvusClient.ReleaseCollection(
- context.Background(), // ctx
- "book", // CollectionName
-)
-if err != nil {
- log.Fatal("failed to release collection:", err.Error())
-}
-```
-
-```java
-milvusClient.releaseCollection(
- ReleaseCollectionParam.newBuilder()
- .withCollectionName("book")
- .build());
-```
-
-```shell
-release -c book
-```
-
-``` curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "book"
- }'
-```
-
-## Limits
-|Feature|Maximum limit|
-|---|---|
-|Length of a collection name|255 characters|
-|Number of partitions in a collection|4,096|
-|Number of fields in a collection|256|
-|Number of shards in a collection|256|
-|Dimensions of a vector|32,768|
-|Top K|16,384|
-|Target input vectors|16,384|
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Query vectors](query.md)
- - [Conduct a hybrid search](hybridsearch.md)
- - [Search with Time Travel](timetravel.md)
-
-- Explore API references for Milvus SDKs:
-
- - [PyMilvus API reference](/api-reference/pymilvus/v2.2.2/About.md)
- - [Node.js API reference](/api-reference/node/v2.2.x/About.md)
- - [Go API reference](/api-reference/go/v2.2.0/About.md)
- - [Java API reference](/api-reference/java/v2.2.1/About.md)
-
-
diff --git a/preview/site/en/userGuide/search/search_and_query.md b/preview/site/en/userGuide/search/search_and_query.md
deleted file mode 100644
index 6dfd051a6..000000000
--- a/preview/site/en/userGuide/search/search_and_query.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-id: search_and_query.md
-title: Search and Query
----
-
-# Search and Query
-
-Conduct a search, query, or hybrid search to find relevant results.
-
-- [Search](search.md): A vector similarity search in Milvus calculates the distance between query vector(s) and vectors in a collection and returns the most similar results.
-
-- [Hybrid Search](hybridsearch.md): A hybrid search in Milvus is essentially a vector search with attribute filtering.
-
-- [Query](query.md): A vector query in Milvus retrieves vectors via scalar filtering based on boolean expression.
diff --git a/preview/site/en/userGuide/search/timetravel.md b/preview/site/en/userGuide/search/timetravel.md
deleted file mode 100644
index 894d33533..000000000
--- a/preview/site/en/userGuide/search/timetravel.md
+++ /dev/null
@@ -1,1027 +0,0 @@
----
-id: timetravel.md
-related_key: Time Travel
-summary: Learn how to search with Time Travel in Milvus.
----
-
-# Search with Time Travel
-
-This topic describes how to use the Time Travel feature during vector search.
-
-Milvus maintains a timeline for all data insert and delete operations. It allows users to specify a timestamp in a search to retrieve a data view at a specified point in time, without spending tremendously on maintenance for data rollback.
-
-
-By default, Milvus allows Time Travel span of 432,000 seconds (120h0m0s). You can configure this parameter in common.retentionDuration
.
-
-
-## Preparations
-
-The following example code demonstrates the steps prior to inserting data.
-
-If you work with your own dataset in an existing Milvus instance, you can move forward to the next step.
-
-
-
-
-```python
-from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType
-connections.connect("default", host='localhost', port='19530')
-collection_name = "test_time_travel"
-schema = CollectionSchema([
- FieldSchema("pk", DataType.INT64, is_primary=True),
- FieldSchema("example_field", dtype=DataType.FLOAT_VECTOR, dim=2)
-])
-collection = Collection(collection_name, schema)
-```
-
-```javascript
-const { MilvusClient } =require("@zilliz/milvus2-sdk-node");
-const milvusClient = new MilvusClient("localhost:19530");
-const params = {
- collection_name: "test_time_travel",
- fields: [{
- name: "example_field",
- description: "",
- data_type: 101, // DataType.FloatVector
- type_params: {
- dim: "2",
- },
- },
- {
- name: "pk",
- data_type: 5, //DataType.Int64
- is_primary_key: true,
- description: "",
- },
- ],
-};
-await milvusClient.collectionManager.createCollection(params);
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-connect -h localhost -p 19530 -a default
-create collection -c test_time_travel -f pk:INT64:primary_field -f example_field:FLOAT_VECTOR:2 -p pk
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "consistency_level": 1,
- "schema": {
- "name": "test_time_travel",
- "autoID": false,
- "fields": [
- {
- "name": "pk",
- "is_primary_key": true,
- "data_type": 5
- },
- {
- "name": "example_field",
- "data_type": 101,
- "type_params": [
- {
- "key": "dim",
- "value": "2"
- }
- ]
- }
- ]
- }
- }'
-```
-
-## Insert the first batch of data
-
-Insert random data to simulate the original data (Milvus CLI example uses a pre-built, remote CSV file containing similar data).
-
-
-
-
-```python
-import random
-data = [
- [i for i in range(10)],
- [[random.random() for _ in range(2)] for _ in range(10)],
-]
-batch1 = collection.insert(data)
-```
-
-```javascript
-const entities1 = Array.from({ length: 10 }, (v, k) => ({
- "example_field": Array.from({ length: 2 }, () => Math.random()),
- "pk": k,
-}));
-const batch1 = milvusClient.dataManager.insert({
- collection_name: "test_time_travel",
- fields_data: entities1,
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-import -c test_time_travel https://raw.githubusercontent.com/zilliztech/milvus_cli/main/examples/user_guide/search_with_timetravel_1.csv
-Reading file from remote URL.
-Reading csv rows... [####################################] 100%
-Column names are ['pk', 'example_field']
-Processed 11 lines.
-
-Inserted successfully.
-
--------------------------- ------------------
-Total insert entities: 10
-Total collection entities: 10
-Milvus timestamp: 430390410783752199
--------------------------- ------------------
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/entities' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "fields_data": [
- {
- "field_name": "pk",
- "type": 5,
- "field": [
- 0,1,2,3,4,5,6,7,8,9
- ]
- },
- {
- "field_name": "example_field",
- "type": 101,
- "field": [
- [1,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[9,1],[10,1]
- ]
- }
- ],
- "num_rows": 10
-}'
-```
-
-## Check the timestamp of the first data batch
-
-Check the timestamp of the first data batch for search with Time Travel. Data inserted within the same batch share an identical timestamp.
-
-```python
-batch1.timestamp
-428828271234252802
-```
-
-```javascript
-batch1.timestamp
-428828271234252802
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-# Milvus CLI automatically returns the timestamp as shown in the previous step.
-```
-
-```curl
-# Output:
-{
- "status":{},
- "IDs":{"IdField":{"IntId":{"data":[1,2,3,4,5,6,7,8,9,10]}}},
- "succ_index":[0,1,2,3,4,5,6,7,8,9],
- "insert_cnt":10,
- "timestamp":434575831766925313
-```
-
-
- Milvus adopts a combination of physical clock and logic counter as a hybrid timestamp. The 64-bit timestamp consists of a 46-bit physical part (high-order bits) and an 18-bit logic part (low-order bits). The physical part is the number of milliseconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
-
-
-## Insert the second batch of data
-
-Insert the second batch of data to simulate the dirty data, among which a piece of data with primary key value `19` and vector value `[1.0,1.0]` is appended as the target data to search with in the following step (Milvus CLI example uses a pre-built, remote CSV file containing similar data).
-
-
-
-
-```python
-data = [
- [i for i in range(10, 20)],
- [[random.random() for _ in range(2)] for _ in range(9)],
-]
-data[1].append([1.0,1.0])
-batch2 = collection.insert(data)
-```
-
-```javascript
-const entities2 = Array.from({
- length: 9
-}, (v, k) => ({
- "example_field": Array.from({
- length: 2
- }, () => Math.random()),
- "pk": k + 10,
-}));
-entities2.push({
- "pk": 19,
- "example_field": [1.0, 1.0],
-});
-const batch2 = await milvusClient.dataManager.insert({
- collection_name: "test_time_travel",
- fields_data: entities2,
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-import -c test_time_travel https://raw.githubusercontent.com/zilliztech/milvus_cli/main/examples/user_guide/search_with_timetravel_2.csv
-Reading file from remote URL.
-Reading csv rows... [####################################] 100%
-Column names are ['pk', 'example_field']
-Processed 11 lines.
-
-Inserted successfully.
-
--------------------------- ------------------
-Total insert entities: 10
-Total collection entities: 20
-Milvus timestamp: 430390435713122310
--------------------------- ------------------
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/entities' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "fields_data": [
- {
- "field_name": "pk",
- "type": 5,
- "field": [
- 10,11,12,13,14,15,16,17,18,19
- ]
- },
- {
- "field_name": "example_field",
- "type": 101,
- "field": [
- [11,12],[12,12],[13,12],[14,12],[15,12],[16,12],[17,12],[18,12],[19,12],[1,1]
- ]
- }
- ],
- "num_rows": 10
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "IDs":{"IdField":{"IntId":{"data":[10,11,12,13,14,15,16,17,18,19]}}},
- "succ_index":[0,1,2,3,4,5,6,7,8,9],
- "insert_cnt":10,
- "timestamp":434575834238943233
-}
-```
-
-
-
-## Search with a specified timestamp
-
-Load the collection and search the target data with the timestamp of the first data batch. With the timestamp specified, Milvus only retrieves the data view at the point of time the timestamp indicates.
-
-
-
-
-```python
-collection.load()
-search_param = {
- "data": [[1.0, 1.0]],
- "anns_field": "example_field",
- "param": {"metric_type": "L2"},
- "limit": 10,
- "travel_timestamp": batch1.timestamp,
-}
-res = collection.search(**search_param)
-res[0].ids
-```
-
-```javascript
-await milvusClient.collectionManager.loadCollection({
- collection_name: "test_time_travel",
-});
-const res = await milvusClient.dataManager.search({
- collection_name: "test_time_travel",
- vectors: [
- [1.0, 1.0]
- ],
- travel_timestamp: batch1.timestamp,
- search_params: {
- anns_field: "example_field",
- topk: "10",
- metric_type: "L2",
- params: JSON.stringify({
- nprobe: 10
- }),
- },
- vector_type: 101, // DataType.FloatVector,
-});
-console.log(res1.results)
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-search
-Collection name (test_collection_query, test_time_travel): test_time_travel
-The vectors of search data (the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a CSV file without headers): [[1.0, 1.0]]
-The vector field used to search of collection (example_field): example_field
-The specified number of decimal places of returned distance [-1]:
-The max number of returned record, also known as topk: 10
-The boolean expression used to filter attribute []:
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-Timeout []:
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]: 430390410783752199
-```
-
-```curl
-# Load the collection:
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/collection/load' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel"
- }'
-
-# Conduct a vector search:
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "output_fields": ["pk"],
- "search_params": [
- {"key": "anns_field", "value": "example_field"},
- {"key": "topk", "value": "10"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"}
- ],
- "travel_timestamp": 434575831766925313,
- "vectors": [ [10,10] ],
- "dsl_type": 1
- }'
-```
-
-As shown below, the target data itself and other data inserted later are not returned as results.
-
-```python
-[8, 7, 4, 2, 5, 6, 9, 3, 0, 1]
-```
-
-```javascript
-[8, 7, 4, 2, 5, 6, 9, 3, 0, 1]
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-Search results:
-
-No.1:
-+---------+------+------------+-----------+
-| Index | ID | Distance | Score |
-+=========+======+============+===========+
-| 0 | 2 | 0.0563737 | 0.0563737 |
-+---------+------+------------+-----------+
-| 1 | 5 | 0.122474 | 0.122474 |
-+---------+------+------------+-----------+
-| 2 | 3 | 0.141737 | 0.141737 |
-+---------+------+------------+-----------+
-| 3 | 8 | 0.331008 | 0.331008 |
-+---------+------+------------+-----------+
-| 4 | 0 | 0.618705 | 0.618705 |
-+---------+------+------------+-----------+
-| 5 | 1 | 0.676788 | 0.676788 |
-+---------+------+------------+-----------+
-| 6 | 9 | 0.69871 | 0.69871 |
-+---------+------+------------+-----------+
-| 7 | 6 | 0.706456 | 0.706456 |
-+---------+------+------------+-----------+
-| 8 | 4 | 0.956929 | 0.956929 |
-+---------+------+------------+-----------+
-| 9 | 7 | 1.19445 | 1.19445 |
-+---------+------+------------+-----------+
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":10,
- "fields_data":[
- {
- "type":5,
- "field_name":"pk",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[9,8,7,6,5,4,3,2,1,0]}}}},
- "field_id":100
- }
- ],
- "scores":[81,82,85,90,97,106,117,130,145,162],
- "ids":{"IdField":{"IntId":{"data":[9,8,7,6,5,4,3,2,1,0]}}},
- "topks":[10]
- },
- "collection_name":"test_time_travel"
-}
-```
-
-
-
-If you do not specify the timestamp or specify it with the timestamp of the second data batch, Milvus will return the results from both batches.
-
-
-
-
-```python
-batch2.timestamp
-428828283406123011
-search_param = {
- "data": [[1.0, 1.0]],
- "anns_field": "example_field",
- "param": {"metric_type": "L2"},
- "limit": 10,
- "travel_timestamp": batch2.timestamp,
-}
-res = collection.search(**search_param)
-res[0].ids
-[19, 10, 8, 7, 4, 17, 2, 5, 13, 15]
-```
-
-```javascript
-batch2.timestamp
-428828283406123011
-const res2 = await milvusClient.dataManager.search({
- collection_name: "test_time_travel",
- vectors: [
- [1.0, 1.0]
- ],
- travel_timestamp: batch2.timestamp,
- search_params: {
- anns_field: "example_field",
- topk: "10",
- metric_type: "L2",
- params: JSON.stringify({
- nprobe: 10
- }),
- },
- vector_type: 101, // DataType.FloatVector,
-});
-console.log(res2.results)
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-search
-Collection name (test_collection_query, test_time_travel): test_time_travel
-The vectors of search data (the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a CSV file without headers): [[1.0, 1.0]]
-The vector field used to search of collection (example_field): example_field
-The specified number of decimal places of returned distance [-1]:
-The max number of returned record, also known as topk: 10
-The boolean expression used to filter attribute []:
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-Timeout []:
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
-Search results:
-
-No.1:
-+---------+------+------------+------------+
-| Index | ID | Distance | Score |
-+=========+======+============+============+
-| 0 | 19 | 0 | 0 |
-+---------+------+------------+------------+
-| 1 | 12 | 0.00321393 | 0.00321393 |
-+---------+------+------------+------------+
-| 2 | 2 | 0.0563737 | 0.0563737 |
-+---------+------+------------+------------+
-| 3 | 5 | 0.122474 | 0.122474 |
-+---------+------+------------+------------+
-| 4 | 3 | 0.141737 | 0.141737 |
-+---------+------+------------+------------+
-| 5 | 10 | 0.238646 | 0.238646 |
-+---------+------+------------+------------+
-| 6 | 8 | 0.331008 | 0.331008 |
-+---------+------+------------+------------+
-| 7 | 18 | 0.403166 | 0.403166 |
-+---------+------+------------+------------+
-| 8 | 13 | 0.508617 | 0.508617 |
-+---------+------+------------+------------+
-| 9 | 11 | 0.531529 | 0.531529 |
-+---------+------+------------+------------+
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "output_fields": ["pk"],
- "search_params": [
- {"key": "anns_field", "value": "example_field"},
- {"key": "topk", "value": "10"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"}
- ],
- "vectors": [ [11,11] ],
- "dsl_type": 1
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":10,
- "fields_data":[
- {
- "type":5,
- "field_name":"pk",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[10,11,12,13,14,15,16,17,18,9]}}}},
- "field_id":100
- }
- ],
- "scores":[1,2,5,10,17,26,37,50,65,101],
- "ids":{"IdField":{"IntId":{"data":[10,11,12,13,14,15,16,17,18,9]}}},
- "topks":[10]
- },
- "collection_name":"test_time_travel"
-}
-```
-
-
-
-## Generate a timestamp for search
-
-In the case that the previous timestamp is not recorded, Milvus allows you to generate a timestamp using an existing timestamp, Unix Epoch time, or date time.
-
-The following example simulates an unwanted deletion operation and shows how to generate a timestamp prior to the deletion and search with it.
-
-Generate a timestamp based on the date time or Unix Epoch time prior to the deletion.
-
-```python
-import datetime
-datetime = datetime.datetime.now()
-from pymilvus import utility
-pre_del_timestamp = utility.mkts_from_datetime(datetime)
-```
-
-```javascript
-const { datetimeToHybrids } = require("@zilliz/milvus2-sdk-node/milvus/utils/Format");
-const datetime = new Date().getTime()
-const pre_del_timestamp = datetimeToHybrids(datetime)
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-calc mkts_from_unixtime -e 1641809375
-430390476800000000
-```
-
-```curl
-# This function is not supported. It is suggested to use Milvus_CLI.
-```
-
-Delete part of the data to simulate an accidental deletion operation.
-
-```python
-expr = "pk in [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]"
-collection.delete(expr)
-```
-
-```javascript
-const expr = "pk in [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]"
-await milvusClient.dataManager.deleteEntities({
- collection_name: "test_time_travel",
- expr: expr,
-});
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-delete entities -c test_time_travel
-The expression to specify entities to be deleted, such as "film_id in [ 0, 1 ]": pk in [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
-You are trying to delete the entities of collection. This action cannot be undone!
-
-Do you want to continue? [y/N]: y
-(insert count: 0, delete count: 10, upsert count: 0, timestamp: 430390494161534983)
-```
-
-```curl
-curl -X 'DELETE' \
- 'http://localhost:9091/api/v1/entities' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "expr": "pk in [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]"
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "IDs":{"IdField":{"IntId":{"data":[0,2,4,6,8,10,12,14,16,18]}}},
- "delete_cnt":10,
- "timestamp": 434575874068316161
-}
-```
-
-
-
-As shown below, the deleted entities are not returned in the results if you search without specifying the timestamp.
-
-```python
-search_param = {
- "data": [[1.0, 1.0]],
- "anns_field": "example_field",
- "param": {"metric_type": "L2"},
- "limit": 10,
-}
-res = collection.search(**search_param)
-res[0].ids
-```
-
-```javascript
-const res3 = await milvusClient.dataManager.search({
- collection_name: "test_time_travel",
- vectors: [
- [1.0, 1.0]
- ],
- search_params: {
- anns_field: "example_field",
- topk: "10",
- metric_type: "L2",
- params: JSON.stringify({
- nprobe: 10
- }),
- },
- vector_type: 101, // DataType.FloatVector,
-});
-console.log(res3.results)
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-search
-Collection name (test_collection_query, test_time_travel): test_time_travel
-The vectors of search data (the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a CSV file without headers): [[1.0, 1.0]]
-The vector field used to search of collection (example_field): example_field
-The specified number of decimal places of returned distance [-1]:
-The max number of returned record, also known as topk: 10
-The boolean expression used to filter attribute []:
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-Timeout []:
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
-Search results:
-
-No.1:
-+---------+------+------------+----------+
-| Index | ID | Distance | Score |
-+=========+======+============+==========+
-| 0 | 19 | 0 | 0 |
-+---------+------+------------+----------+
-| 1 | 5 | 0.122474 | 0.122474 |
-+---------+------+------------+----------+
-| 2 | 3 | 0.141737 | 0.141737 |
-+---------+------+------------+----------+
-| 3 | 13 | 0.508617 | 0.508617 |
-+---------+------+------------+----------+
-| 4 | 11 | 0.531529 | 0.531529 |
-+---------+------+------------+----------+
-| 5 | 17 | 0.593702 | 0.593702 |
-+---------+------+------------+----------+
-| 6 | 1 | 0.676788 | 0.676788 |
-+---------+------+------------+----------+
-| 7 | 9 | 0.69871 | 0.69871 |
-+---------+------+------------+----------+
-| 8 | 7 | 1.19445 | 1.19445 |
-+---------+------+------------+----------+
-| 9 | 15 | 1.53964 | 1.53964 |
-+---------+------+------------+----------+
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "output_fields": ["pk"],
- "search_params": [
- {"key": "anns_field", "value": "example_field"},
- {"key": "topk", "value": "10"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"}
- ],
- "vectors": [ [11,11] ],
- "dsl_type": 1
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":10,
- "fields_data":[
- {
- "type":5,
- "field_name":"pk",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[11,13,15,17,9,7,5,3,1,19]}}}},
- "field_id":100
- }
- ],
- "scores":[2,10,26,50,101,109,125,149,181,200],
- "ids":{"IdField":{"IntId":{"data":[11,13,15,17,9,7,5,3,1,19]}}},
- "topks":[10]
- },
- "collection_name":"test_time_travel"
-}
-```
-
-
-
-Search with the prior-to-deletion timestamp. Milvus retrieves entities from the data before the deletion.
-
-```python
-search_param = {
- "data": [[1.0, 1.0]],
- "anns_field": "example_field",
- "param": {"metric_type": "L2"},
- "limit": 10,
- "travel_timestamp": pre_del_timestamp,
-}
-res = collection.search(**search_param)
-res[0].ids
-```
-
-```javascript
-const res4 = await milvusClient.dataManager.search({
- collection_name: "test_time_travel",
- vectors: [
- [1.0, 1.0]
- ],
- travel_timestamp: pre_del_timestamp,
- search_params: {
- anns_field: "example_field",
- topk: "10",
- metric_type: "L2",
- params: JSON.stringify({
- nprobe: 10
- }),
- },
- vector_type: 101, // DataType.FloatVector,
-});
-console.log(res4.results)
-```
-
-```go
-// This function is under active development on the GO client.
-```
-
-```java
-// Java User Guide will be ready soon.
-```
-
-```shell
-search
-Collection name (test_collection_query, test_time_travel): test_time_travel
-The vectors of search data (the length of data is number of query (nq), the dim of every vector in data must be equal to vector field’s of collection. You can also import a CSV file without headers): [[1.0, 1.0]]
-The vector field used to search of collection (example_field): example_field
-The specified number of decimal places of returned distance [-1]:
-The max number of returned record, also known as topk: 10
-The boolean expression used to filter attribute []:
-The names of partitions to search (split by "," if multiple) ['_default'] []:
-Timeout []:
-Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]: 430390476800000000
-Search results:
-
-No.1:
-+---------+------+------------+------------+
-| Index | ID | Distance | Score |
-+=========+======+============+============+
-| 0 | 19 | 0 | 0 |
-+---------+------+------------+------------+
-| 1 | 12 | 0.00321393 | 0.00321393 |
-+---------+------+------------+------------+
-| 2 | 2 | 0.0563737 | 0.0563737 |
-+---------+------+------------+------------+
-| 3 | 5 | 0.122474 | 0.122474 |
-+---------+------+------------+------------+
-| 4 | 3 | 0.141737 | 0.141737 |
-+---------+------+------------+------------+
-| 5 | 10 | 0.238646 | 0.238646 |
-+---------+------+------------+------------+
-| 6 | 8 | 0.331008 | 0.331008 |
-+---------+------+------------+------------+
-| 7 | 18 | 0.403166 | 0.403166 |
-+---------+------+------------+------------+
-| 8 | 13 | 0.508617 | 0.508617 |
-+---------+------+------------+------------+
-| 9 | 11 | 0.531529 | 0.531529 |
-+---------+------+------------+------------+
-```
-
-```curl
-curl -X 'POST' \
- 'http://localhost:9091/api/v1/search' \
- -H 'accept: application/json' \
- -H 'Content-Type: application/json' \
- -d '{
- "collection_name": "test_time_travel",
- "output_fields": ["pk"],
- "search_params": [
- {"key": "anns_field", "value": "example_field"},
- {"key": "topk", "value": "10"},
- {"key": "params", "value": "{\"nprobe\": 10}"},
- {"key": "metric_type", "value": "L2"}
- ],
- "travel_timestamp": 434284782724317186,
- "vectors": [ [10,10] ],
- "dsl_type": 1
- }'
-```
-
-
-Output:
-
-```json
-{
- "status":{},
- "results":{
- "num_queries":1,
- "top_k":10,
- "fields_data":[
- {
- "type":5,
- "field_name":"pk",
- "Field":{"Scalars":{"Data":{"LongData":{"data":[11,12,13,14,15,16,17,18,10,9]}}}},
- "field_id":100}
- ],
- "scores":[5,8,13,20,29,40,53,68,81,82],
- "ids":{"IdField":{"IntId":{"data":[11,12,13,14,15,16,17,18,10,9]}}},
- "topks":[10]
- },
- "collection_name":"test_time_travel"
-}
-```
-
-
-
-## What's next
-
-- Learn more basic operations of Milvus:
- - [Query vectors](query.md)
- - [Conduct a hybrid search](hybridsearch.md)
-
-- Explore API references for Milvus SDKs:
-
- - [PyMilvus API reference](/api-reference/pymilvus/v2.2.2/About.md)
- - [Node.js API reference](/api-reference/node/v2.2.x/About.md)
- - [Go API reference](/api-reference/go/v2.2.0/About.md)
- - [Java API reference](/api-reference/java/v2.2.1/About.md)
-
-
diff --git a/preview/site/en/userGuide/tools/attu.md b/preview/site/en/userGuide/tools/attu.md
deleted file mode 100644
index 14cad1557..000000000
--- a/preview/site/en/userGuide/tools/attu.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-id: attu.md
-related_key: attu
-summary: Attu, an intuitive GUI for Milvus service management.
----
-
-# Attu
-
-[Attu](https://github.com/zilliztech/attu) is an efficient open-source management tool for Milvus. It features an intuitive graphical user interface (GUI), allowing you to easily interact with your databases. With just a few clicks, you can visualize your cluster status, manage metadata, perform data queries, and much more.
-
-Attu is an open source project of [Zilliz](https://zilliz.com/).
-
-![Attu_overview](../../../../assets/attu/insight_overview.png "Attu overview.")
-
-## Features
-
-Attu is under rapid development and new features are added on a weekly basis. We will release a new version every time when a new feature is ready.
-
-Below is the features we have to offer:
-
-- Support username, password, and TLS connection
- ![Attu_Login](../../../../assets/attu/insight_install.png "Connect to the Milvus service.")
- ![Attu_Login_user_pwd](../../../../assets/attu/insight_install_user_pwd.png "Connect to the Milvus service with username and password.")
-- View milvus cluster statistics in a glance.
-
-![view_cluster_statistics](../../../../assets/attu/view_cluster_statistics.png "View cluster statistics.")
-
-- Browse, query, and manage collections in a simple and straightforward way.
-
-![manage_collections](../../../../assets/attu/manage_collections.png "Manage collections.")
-
-- Perform CRUD or bulk operations with just a few clicks.
-
-![attu_operations](../../../../assets/attu/insight_operations.png "CRUD or bulk operations.")
-
-- Create vector index instantly.
-
-![attu_create_index](../../../../assets/attu/insight_create_index.png "Create vector index.")
-
-- Conduct vector searches in a brand new way.
-
-![attu_conduct_search](../../../../assets/attu/insight_conduct_search.png "Conduct vector search.")
-
-- New code-mode provides a better user experience for you.
-
-![code_mode](../../../../assets/attu/code_mode.png "New code-mode.")
-
-Learn more about how to [install Attu](attu_install-docker.md).
-
-## Contribution
-
-Attu is an open-source project. All contributions are welcome. Pleae read our [Contribute guide](https://github.com/zilliztech/attu) before making contributions.
-
-If you find a bug or want to request a new feature, please create a [GitHub Issue](https://github.com/zilliztech/attu), and make sure that the same issue has not been created by someone else.
diff --git a/preview/site/en/userGuide/tools/attu_collection.md b/preview/site/en/userGuide/tools/attu_collection.md
deleted file mode 100644
index bb58f81d0..000000000
--- a/preview/site/en/userGuide/tools/attu_collection.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-id: attu_collection.md
-related_key: attu
-summary: Learn how to manage collections with Attu, an intuitive GUI tool for Milvus.
----
-
-# Manage Collections with Attu
-
-This topic describes how to manage collections with Attu.
-
-## Create a collection
-
-1. Click the **Collection** icon on the left-side navigation pane and then click **Create Collection**. The **Create Collection** dialog box appears as shown below.
-
-![Create Collection dialog box](../../../../assets/attu/create_collection_dialog_box1.png "The Create Collection dialog box.")
-
-2. Enter the required information. This example creates a collection named `test` with a primary key field, a vector field, and a scalar field. You can add scalar fields as needed.
-
-![Create Collection dialog box](../../../../assets/attu/create_collection_dialog_box2.png "Enter required information.")
-
-3. Click **Create** to create a collection.
-
-![Create Collection dialog box](../../../../assets/attu/create_collection_dialog_box3.png "Create a collection.")
-
-## Delete a collection
-
-1. Tick the collection you want to delete in the data grid.
-2. Click the **Trash** icon and the **Delete Collection** dialog box appears as shown below.
-3. Type `delete` to confirm the deletion.
-4. Click **Delete** to delete the collection.
-
-
-Deleting a collection is irreversible.
-
-
-![Delete Collection dialog box](../../../../assets/attu/delete_collection.png "Delete a collection.")
-
-## Load a collection
-
-1. Hover on the collection you want to load, the **Load** icon appears on the right end of the entry.
-
-![Load Collection](../../../../assets/attu/load_collection1.png "The load icon.")
-
-2. Click the **Load** icon and the **Load Collection** dialog box appears.
-3. Click **Load** in the **Load Collection** dialog box.
-
-![Load Collection](../../../../assets/attu/load_collection2.png "Click load button.")
-
-4. Loading a collection might take a while. If successful, Loaded For Search appears in the Status column.
-
-![Load Collection](../../../../assets/attu/load_collection3.png "Load status.")
-
-## Release a collection
-
-1. Hover on the loaded collection you want to release, the **Release** icon appears on the right end of the entry.
-
-![Release Collection](../../../../assets/attu/release_collection1.png "The release icon.")
-
-2. Click the **Release** icon and the **Release Collection** dialog box appears.
-3. Click **Release** in the **Release Collection** dialog box.
-4. If successful, the Status becomes **Unloaded** in the **Status** column.
-
-![Release Collection](../../../../assets/attu/release_collection2.png "Release status.")
-
-## View the schema of a collection
-
-1. Click the name of the collection that you want to view the schema of, and the corresponding detail page appears.
-2. Click **Schema** on the detail page, which lists the information of all fields.
-
-Attributes of a schema include:
-
-- Field Name
-- Field Type
-- Dimension (Only applies to vector fields)
-- Index Type (Only applies to vector fields)
-- Index Parameters (Only applies to vector fields)
-- Collection description
-
-![Collection Schema](../../../../assets/attu/collection_schema.png "View collection schema.")
diff --git a/preview/site/en/userGuide/tools/attu_data.md b/preview/site/en/userGuide/tools/attu_data.md
deleted file mode 100644
index 5bc4898bc..000000000
--- a/preview/site/en/userGuide/tools/attu_data.md
+++ /dev/null
@@ -1,56 +0,0 @@
----
-id: attu_data.md
-related_key: attu
-summary: Learn how to manage data with Attu, an intuitive GUI tool for Milvus.
----
-
-# Manage Data with Attu
-
-This topic describes how to manage data with Attu.
-
-## Import data
-
-This example imports 20,000 rows of data. Importing data appends data instead of overwriting data.
-
-1. Click **Import Data** on the **Collection** page. The **Import Data** dialog box appears as shown below.
-
-![Import Data](../../../../assets/attu/insight_data1.png "The Import Data dialogue box.")
-
-2. Select the collection you want to import data to in the **Collection** dropdown list.
-3. Select the partition you want to import data to in the **Partition** dropdown list.
-4. Click **Choose CSV File** and choose a CSV file.
-
- Ensure that the CSV file meets the following criteria:
-
-- Column names are the same as the field names specified in the schema;
-- The file is smaller than 150MB and the row count is less than 100,000.
-
-
-
-5. After a legal CSV file is selected, you can then proceed by clicking **Next**.
-
-![Import Data](../../../../assets/attu/insight_data2.png "Click Next.")
-
-6. On the new dialog box, you can match the field names by clicking the corresponding cells in the dropdown lists.
-
-
-We recommend making the headers (column names) as the first row in your CSV file.
-
-
-![Import Data](../../../../assets/attu/insight_data3.png "Match the field names.")
-
-7. After confirming the column names corresponding to the field names, click **Import Data** to import the CSV file into Milvus. Importing data might take a while.
-
-![Import Data](../../../../assets/attu/insight_data4.png "Import Data.")
-
-8. If successful, the row count status updates in the Entity Count column of the collection. On the corresponding Partition tab page, the row count status updates in the Entity Count column of the partition your imported data in. It might take a while for the entity count to update.
-
-![Import Data](../../../../assets/attu/insight_data5.png "Data import is successful.")
-
-## Export Data
-
-1. Click **Data Query** on the **Collection** page. On the **Data Query** tab page, enter query conditions in the field and then click **Query** to retrieve all query results that match your query conditions.
-
-2. Click the **Download** icon to download the query results as a CSV file.
-
-![Export Data](../../../../assets/attu/insight_data6.png "Click the Download icon.")
diff --git a/preview/site/en/userGuide/tools/attu_faq.md b/preview/site/en/userGuide/tools/attu_faq.md
deleted file mode 100644
index fbb9c56ec..000000000
--- a/preview/site/en/userGuide/tools/attu_faq.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-id: attu_faq.md
-related_key: attu
-summary: Find the most commonly asked questions about Attu, an intuitive GUI tool for Milvus.
----
-
-# Attu FAQ
-
-#### Why is Attu throwing a network error?
-
-A: Check whether you have assigned a correct value to `HOST_URL` in the `docker run` command. Alternatively, you can enter `{HOST_URL}/api/v1/healthy` in the address bar of your browser to check the network status of Attu.
-
-#### Why did Attu fail to connect to Milvus?
-
-A: Ensure that Milvus and Attu are on the same network.
-
-#### How do I use Attu with K8s?
-
-A: You can [install Attu while deploying Milvus with Helm](attu_install-helm.md).
diff --git a/preview/site/en/userGuide/tools/attu_index.md b/preview/site/en/userGuide/tools/attu_index.md
deleted file mode 100644
index c07144cd2..000000000
--- a/preview/site/en/userGuide/tools/attu_index.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-id: attu_index.md
-related_key: attu
-summary: Learn how to manage indexes with Attu, an intuitive GUI tool for Milvus.
----
-
-# Manage Index with Attu
-
-This topic describes how to manage an index with Attu.
-
-## Create indexes
-
-This example builds an IVF_FLAT index with Euclidean distance as the similarity metrics and an `nlist` value of `1024`.
-
-1. Click **Schema** on the **Collection** page. On the **Schema** tab page, click **CREATE INDEX** and the **Create Index** dialog box appears.
-
-2. In the **Create Index** dialog box, select **IVF_FLAT** from the **Index Type** dropdown list, select **L2** from the **Metric Type** dropdown list, and enter `1024` in the `nlist` field.
-
-3. (Optional) Turn on **View Code** and the **Code View** page appears. You can check the code in Python or Node.js as you want.
-
-4. Click **Create** to create the index.
-
-If successful, the type of the index you created appears in the **Index Type** column for the vector field.
-
-![Create Index](../../../../assets/attu/insight_index1.png "Create an index.")
-
-![Create Index](../../../../assets/attu/insight_index2.png "Index type.")
-
-## Delete indexes
-
-1. Click the **Trash** icon in the **Index Type** column and the **Delete Index** dialog box appears.
-2. Enter `delete` to confirm the deletion and click **Delete** to delete the indexes.
-
-If successful, **CREATE INDEX** button appears in the Index Type column.
-
-![Delete Index](../../../../assets/attu/insight_index3.png "Delete indexes.")
diff --git a/preview/site/en/userGuide/tools/attu_install-docker.md b/preview/site/en/userGuide/tools/attu_install-docker.md
deleted file mode 100644
index 63eb47456..000000000
--- a/preview/site/en/userGuide/tools/attu_install-docker.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-id: attu_install-docker.md
-label: Install with Docker Compose
-order: 0
-group: attu_install-docker.md
-related_key: attu
-summary: Learn how to install Attu with Docker Compose to manage your Milvus service.
----
-
-
-
-# Install Attu with Docker Compose
-
-Attu is an efficient open-source management tool for Milvus. This topic describes how to install Attu with Docker Compose, an efficient open-source management tool for Milvus.
-
-## Prerequisites
-
-- Milvus installed on [your local device](install_standalone-docker.md) or [cluster](install_cluster-docker.md).
-- Docker 19.03 or later
-- Milvus 2.1.0 or later
-
-
-
-## Start an Attu instance
-
-```Apache
-docker run -p 8000:3000 -e MILVUS_URL={your machine IP}:19530 zilliz/attu:latest
-```
-
-Once you start the docker, visit `http://{ your machine IP }:8000` in your browser, and click **Connect** to enter the Attu service.
-And we alsow support TLS connection, username and password.
-
-![Attu_install](../../../../assets/attu/insight_install.png "Connect to the Milvus service.")
-![Attu_Login_user_pwd](../../../../assets/attu/insight_install_user_pwd.png "Connect to the Milvus service with username and password.")
-
-## Contribution
-
-Attu is an open-source project. All contributions are welcome. Please read our [Contribute guide](https://github.com/zilliztech/attu) before making contributions.
-
-If you find a bug or want to request a new feature, please create a [GitHub Issue](https://github.com/zilliztech/attu), and make sure that the same issue has not been created by someone else.
diff --git a/preview/site/en/userGuide/tools/attu_install-helm.md b/preview/site/en/userGuide/tools/attu_install-helm.md
deleted file mode 100644
index 6c3d42641..000000000
--- a/preview/site/en/userGuide/tools/attu_install-helm.md
+++ /dev/null
@@ -1,69 +0,0 @@
----
-id: attu_install-helm.md
-label: Install with Helm Chart
-order: 1
-group: attu_install-docker.md
-related_key: attu
-summary: Learn how to install Attu with Helm Chart to manage your Milvus service.
----
-
-
-
-# Install Attu with Helm Chart
-
-Attu is an efficient open-source management tool for Milvus. This topic describes how to install Attu with Helm Chart.
-
-## Prerequisites
-
-- Kubernetes 1.16 or later
-- Helm 3.0.0 or later
-
-
-Attu only supports Milvus 2.x.
-
-
-## Install Helm Chart for Milvus
-
-Helm is a Kubernetes package manager that can help you deploy Milvus quickly.
-
-1. Add Milvus Helm repository.
-
-```
-$ helm repo add milvus https://milvus-io.github.io/milvus-helm/
-```
-
-2. Update charts locally.
-
-```
-$ helm repo update
-```
-
-## Install Attu while installing Milvus
-
-Start Milvus and Attu with Helm by specifying the release name, the chart, and the parameters that indicate the installation of Attu. This topic uses `my-release` as the release name. To use a different release name, replace `my-release` in the command.
-
-Kubernetes provides four service modes: ClusterIp, Ingress, LoadBalancer, and NodePort. The default service mode of Attu is ClusterIp. You can choose the service mode that suits your application by configuring the parameters `attu.service.type` and `attu.ingress.enable`.
-
-
-1. Install Milvus and Attu
-
-```
-helm install my-release milvus/milvus --set attu.enabled=true
-```
-
-2. Forward the Attu service to local port `3000`.
-
-```
-kubectl port-forward service/my-release-milvus-attu 3000
-```
-
-3. Visit `http://127.0.0.1:3000/connect` in your browser, and click **Connect** to enter the Attu service.
-
-![Attu_install](../../../../assets/attu/insight_install.png "Connect to the Attu service.")
-
-
-## Contribution
-
-Attu is an open-source project. All contributions are welcome. Please read our [Contribute guide](https://github.com/zilliztech/attu) before making contributions.
-
-If you find a bug or want to request a new feature, please create a [GitHub Issue](https://github.com/zilliztech/attu), and make sure that the same issue has not been created by someone else.
diff --git a/preview/site/en/userGuide/tools/attu_install-package.md b/preview/site/en/userGuide/tools/attu_install-package.md
deleted file mode 100644
index d72abf640..000000000
--- a/preview/site/en/userGuide/tools/attu_install-package.md
+++ /dev/null
@@ -1,41 +0,0 @@
----
-id: attu_install-package.md
-label: Install with Package
-order: 2
-group: attu_install-docker.md
-related_key: attu
-summary: Learn how to install Attu with package to manage your Milvus service.
----
-
-
-
-# Install Attu with Pre-built Package
-
-Attu is an efficient open-source management tool for Milvus. This topic describes how to install Attu with the pre-built package.
-
-## Download and run installation package
-
-Download and run an installation package for Attu based on your operating system to install Attu on your device.
-
-
diff --git a/preview/site/en/userGuide/tools/attu_overview.md b/preview/site/en/userGuide/tools/attu_overview.md
deleted file mode 100644
index 8fe91ec85..000000000
--- a/preview/site/en/userGuide/tools/attu_overview.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-id: attu_overview.md
-related_key: attu
-summary: Attu, an intuitive GUI for Milvus service management.
----
-
-# Attu Overview Page
-
-This topic describes the Home page of Attu.
-
-Attu consists of **Overview** page, **Collection** page, **Vector Search** page, and **System View** page, corresponding to the four icons on the left-side navigation pane respectively.
-
-The Overview page lists the following information:
-
-1. Loaded Collections: the number of loaded collections.
-2. All Collections: the total number of collections.
-3. Data: the total number of entities.
-4. **Loaded For Search** card: an interactive shortcut panel that allows you to perform a [vector search](attu_search.md) on or [release the collection](attu_collection.md).
-
-![Attu Overview](../../../../assets/attu/insight_overview_page.png "Attu overview page.")
diff --git a/preview/site/en/userGuide/tools/attu_partition.md b/preview/site/en/userGuide/tools/attu_partition.md
deleted file mode 100644
index d993bec46..000000000
--- a/preview/site/en/userGuide/tools/attu_partition.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-id: attu_partition.md
-related_key: attu
-summary: Learn how to manage partitions with Attu, an intuitive GUI tool for Milvus.
----
-
-# Manage Partitions with Attu
-
-This topic describes how to manage partitions with Attu.
-
-Milvus creates a partition automatically after a collection is created, which cannot be deleted.
-
-## Create a partition
-
-1. Click **Partitions** tab on the **Collection** page.
-2. Click **Create Partition** on the **Partitions** tab page, and the **Create Partition** dialog box appears as shown below.
-3. In the **Create Partition** dialog box, enter the new partition name in the **Name** field.
-4. Click **Create** to create a partition.
-
-![Create Partition](../../../../assets/attu/insight_partition1.png "Create a partition.")
-
-If successful, the new partition appears on the **Partitions** tab page.
-
-![Create Partition](../../../../assets/attu/insight_partition2.png "The newly created partition.")
-
-Choose the Default partition or the newly created partition to store imported data as needed.
-
-## Delete a partition
-
-1. Tick the partition you want to delete.
-2. Click the **Trash** icon and the **Delete Partition** dialog box appears as shown below.
-3. Type `delete` to confirm the deletion.
-4. Click **Delete** to delete the partition.
-
-![Delete Partition](../../../../assets/attu/insight_partition3.png "Delete a partition.")
diff --git a/preview/site/en/userGuide/tools/attu_query.md b/preview/site/en/userGuide/tools/attu_query.md
deleted file mode 100644
index f6935e1e8..000000000
--- a/preview/site/en/userGuide/tools/attu_query.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-id: attu_query.md
-related_key: attu
-summary: Learn how to query data with Attu, an intuitive GUI tool for Milvus.
----
-
-# Query Data with Attu
-
-This topic describes how to query data with Attu.
-
-## Query data with advanced filters
-
-1. Click the entry of the collection that you want to query data in, and the corresponding detail page appears.
-2. On the **Data Query** tab page, click the **Filter** icon and the **Advanced Filter** dialog box appears.
-3. Specify a complicated query condition such as **color > 10 && color < 20** by using the **Field Name** dropdown lists, the **Logic** dropdown lists, the **Value** fields, and the **AND** operator. Then click **Apply** Filter to apply the query condition.
-
-![Query Data](../../../../assets/attu/insight_query1.png "Specify the query condition.")
-
-3. Click **Query** to retrieve all query results that match the query condition.
-
-![Query Data](../../../../assets/attu/insight_query2.png "Retrieve query results.")
-
-## Query data with Time Travel
-
-TBD (Not supported yet)
-
-## Delete data
-
-1. Tick the entities you want to delete and click the **Trash** icon.
-2. Type `delete` to confirm the deletion in the **Delete entities** dialog box.
-3. Click **Delete** to delete the selected entities.
-
-![Delete Data](../../../../assets/attu/insight_query3.png "Delete selected entities.")
-
-You can perform a query to retrieve the deleted entities. No results will be returned if the deletion is successful.
-
-![Delete Data](../../../../assets/attu/insight_query4.png "No results shown when querying deleted entities.")
diff --git a/preview/site/en/userGuide/tools/attu_search.md b/preview/site/en/userGuide/tools/attu_search.md
deleted file mode 100644
index 396549224..000000000
--- a/preview/site/en/userGuide/tools/attu_search.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-id: attu_search.md
-related_key: attu
-summary: Learn how to conduct a vector similarity search using Attu, an intuitive GUI tool for Milvus.
----
-
-# Search Data with Attu
-
-This topic describes how to search data with Attu.
-
-## Conduct a vector similarity search
-
-On the basis of the regular vector similarity search, you can perform hybrid search of search with Time Travel.
-
-### Load the collection to memory
-
-All CRUD operations within Milvus are executed in memory. Load the collection to memory before conducting a vector similarity search. See [Load a collection](attu_collection.md#Load-a-collection) for more instruction.
-
-![Search Data](../../../../assets/attu/insight_search1.png "The search page in Attu.")
-
-### Set search parameters
-
-1. Select the collection and the vector field you wish to search in in the dropdown lists of the **Choose collection and field** section.
-2. In the **Enter vector value** field, enter a vector (or vectors) with the same dimensions of the selected field as the target vector(s) to search with.
-3. In the **Set search parameters** section, specify the specific parameter(s) to the index and other search-related parameters.
-
-![Search Data](../../../../assets/attu/insight_search2.png "Set search parameters.")
-
-### Hybrid search with advanced filters (optional)
-
-Click **Advanced Filter** and the **Advanced Filter** dialog box appears. You can use the **AND** or **OR** operators to combine multiple conditions into a compound condition. The filter expression updates automatically with any changes to the conditions. See [boolean expression rule](boolean.md) for more information.
-
-![Search Data](../../../../assets/attu/insight_search3.png "Advanced filter.")
-
-### Search with Time Travel (optional)
-
-Milvus maintains a timeline for all data insert and delete operations. It allows users to specify a timestamp in a search to retrieve a data view at a specified point in time.
-
-1. Click **Time Travel**, and select a time point in the dialog box that appears.
-
-![Search Data](../../../../assets/attu/insight_search4.png "Time Travel.")
-
-2. Specify the number of search results to return in the **TopK** dropdown list.
-3. Click **Search** to retrieve the nearest search results, which indicate the most similar vectors.
-
-![Search Data](../../../../assets/attu/insight_search5.png "Search results.")
-![Search Data](../../../../assets/attu/insight_search6.png "No search results.")
diff --git a/preview/site/en/userGuide/tools/attu_system.md b/preview/site/en/userGuide/tools/attu_system.md
deleted file mode 100644
index 9d48a02d9..000000000
--- a/preview/site/en/userGuide/tools/attu_system.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-id: attu_system.md
-related_key: attu
-summary: Learn how to monitor your Milvus system with Attu, an intuitive GUI tool for Milvus.
----
-
-# Monitor System with Attu
-
-This topic describes how to monitor your Milvus system with Attu.
-
-## System view
-
-Click the **System View** icon on the left-side navigation pane to visit the System View page.
-
-![System View](../../../../assets/attu/insight_system1.png "The System View icon.")
-
-The System View dashboard consists of the following tiles:
-
-- **Topology**: Shows the structure of your Milvus instance. Click Milvus node or a coordinator node and the corresponding information appears in the Info tile on the right.
-- **Info**: Shows the system and configuration information of the selected node.
-
-## Node list view
-
-All nodes managed by their parent coordinator node are listed in the table. You can sort the nodes by metrics including **CPU Core Count**, **CPU Core Usage**, **Disk Usage**, and **Memory Usage**.
-
-![Node List View](../../../../assets/attu/insight_system4.png "Topology.")
-
-Right to the table is a mini topology showing the selected node and its coordinator node. Under the mini topology is a tile showing relevant information.
-
-Click the down arrow to collapse rows in the table.
diff --git a/preview/site/en/userGuide/tools/birdwatcher_install_guides.md b/preview/site/en/userGuide/tools/birdwatcher_install_guides.md
new file mode 100644
index 000000000..974572db8
--- /dev/null
+++ b/preview/site/en/userGuide/tools/birdwatcher_install_guides.md
@@ -0,0 +1,116 @@
+---
+id: birdwatcher_install_guides.md
+summary: Learn how to install Birdwatch to debug Milvus.
+title: Install Birdwatcher
+---
+
+# Install Birdwatcher
+
+This page demonstrates how to install Birdwatcher.
+
+## Local install
+
+If you have installed Milvus Standalone [using docker](install_standalone-docker.md), you'd better download and install the built binary, install Birdwatcher as a common Go module, or build Birdwatcher from the source.
+
+- Install it as a common Go module.
+
+ ```shell
+ git clone https://github.com/milvus-io/birdwatcher.git
+ cd birdwatcher
+ go install github.com/milvus-io/birdwatcher
+ ```
+
+ Then you can run Birdwatcher as follows:
+
+ ```shell
+ go run main.go
+ ```
+
+- Build it from the source.
+
+ ```shell
+ git clone https://github.com/milvus-io/birdwatcher.git
+ cd birdwatcher
+ go build -o birdwatcher main.go
+ ```
+
+ Then you can run Birdwatcher as follows:
+
+ ```shell
+ ./birdwatcher
+ ```
+
+- Download the already-built binary
+
+ First, open the [latest release page](https://github.com/milvus-io/birdwatcher/releases/latest), and find the prepared binaries.
+
+ ```shell
+ wget -O birdwatcher.tar.gz \
+ https://github.com/milvus-io/birdwatcher/releases/download/latest/birdwatcher__.tar.gz
+ ```
+
+ Then you can decompress the tarball and use Birdwatcher as follows:
+
+ ```shell
+ tar -xvzf birdwatcher.tar.gz
+ ./birdwatcher
+ ```
+
+## Install as a Kubernetes pod
+
+If you have installed either Milvus Standalone [using the Helm charts](install_standalone-helm.md) or [the Milvus Operator](install_standalone-operator.md) or Milvus Cluster [using the Helm charts](install_cluster-helm.md) or [the Milvus Operator](install_cluster-milvusoperator.md), you are advised to install Birdwatcher as a Kubernetes pod.
+
+### Prepare deployment.yml
+
+```yml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: birdwatcher
+spec:
+ selector:
+ matchLabels:
+ app: birdwatcher
+ template:
+ metadata:
+ labels:
+ app: birdwatcher
+ spec:
+ containers:
+ - name: birdwatcher
+ image: milvusdb/birdwatcher
+ resources:
+ limits:
+ memory: "128Mi"
+ cpu: "500m"
+```
+
+
+
+If the image available on DockerHub is not the latest, you can build an image of Birdwatcher using the Dockerfile provided with the source code as follows:
+
+```shell
+git clone https://github.com/milvus-io/birdwatcher.git
+cd birdwatcher
+docker build -t milvusdb/birdwatcher .
+```
+
+To deploy a locally built image, you need to add `imagePullPolicy` to the above specs and set it to `Never`.
+
+```yaml
+...
+ - name: birdwatcher
+ image: milvusdb/birdwatcher
+ imagePullPolicy: Never
+...
+```
+
+
+
+### Apply deployment.yml
+
+Save the above YAML in a file and name it `deployment.yml`, and run the following command
+
+```shell
+kubectl apply -f deployment.yml
+```
diff --git a/preview/site/en/userGuide/tools/birdwatcher_overview.md b/preview/site/en/userGuide/tools/birdwatcher_overview.md
new file mode 100644
index 000000000..a8b4a9767
--- /dev/null
+++ b/preview/site/en/userGuide/tools/birdwatcher_overview.md
@@ -0,0 +1,23 @@
+---
+id: birdwatcher_overview.md
+summary: Birdwatcher is a debug tool for Milvus 2.x. It connects to etcd and inspects the status of the Milvus system.
+title: Birdwatcher
+---
+
+# Birdwatcher
+
+Milvus is a stateless vector database that separates reads and writes and has etcd play the role of the single source of state. All coordinators have to query the state from etcd before they can make any changes to it. Once users need to check or clean the state, they need a tool to communicate with etcd. Here is where Birdwatcher comes to the scene.
+
+Birdwatcher is a debugging tool for Milvus. Using it to connect to etcd, you can check the state of your Milvus system or configure it on the fly.
+
+## Prerequisite
+
+- You have already installed [Go 1.18 or higher](https://go.dev/doc/install).
+
+## Architecture
+
+![Birdwatcher architecture](../../../../assets/birdwatcher_overview.png)
+
+## Latest release
+
+[Release v1.0.2](https://github.com/milvus-io/birdwatcher/releases/tag/v1.0.3)
\ No newline at end of file
diff --git a/preview/site/en/userGuide/tools/birdwatcher_usage_guides.md b/preview/site/en/userGuide/tools/birdwatcher_usage_guides.md
new file mode 100644
index 000000000..fa6267d46
--- /dev/null
+++ b/preview/site/en/userGuide/tools/birdwatcher_usage_guides.md
@@ -0,0 +1,436 @@
+---
+id: birdwatcher_usage_guides.md
+summary: Learn how to use Birdwatch to debug Milvus.
+title: Use Birdwatcher
+---
+
+# Use Birdwatcher
+
+This guide walks you through how to use Birdwatcher to check the state of your Milvus and configure it on the fly.
+
+## Start Birdwatcher
+
+Birdwatcher is a command-line tool, you can start it as follows:
+
+```shell
+./birdwatcher
+```
+
+Then you will be greeted with the following prompt:
+
+```shell
+Offline >
+```
+
+## Connect to etcd
+
+You need to use Birdwatcher to connect to etcd before any other operations.
+
+- Connect with default settings
+
+ ```shell
+ Offline > connect
+ Milvus(by-dev) >
+ ```
+
+- Connect from Birdwatcher in a pod
+
+ If you choose to run Birdwatcher in a Kubernetes pod, you need first obtain the IP address of etcd as follows:
+
+ ```shell
+ kubectl get pod my-release-etcd-0 -o 'jsonpath={.status.podIP}'
+ ```
+
+ Then access the shell of the pod.
+
+ ```shell
+ kubectl exec --stdin --tty birdwatcher-7f48547ddc-zcbxj -- /bin/sh
+ ```
+
+ Finally, use the returned IP address to connect to etcd as follows:
+
+ ```shell
+ Offline > connect --etcd ${ETCD_IP_ADDR}:2379
+ Milvus(by-dev)
+ ```
+
+- Connect with a different root path
+
+ If the root path of your Milvus is different from `by-dev` and you are prompted with an error reporting about an incorrect root path, you can connect to etcd as follows:
+
+ ```shell
+ Offline > connect --rootPath my-release
+ Milvus(my-release) >
+ ```
+
+ If you do not know the root path of your Milvus, connect to etcd as follows:
+
+ ```shell
+ Offline > connect --dry
+ using dry mode, ignore rootPath and metaPath
+ Etcd(127.0.0.1:2379) > find-milvus
+ 1 candidates found:
+ my-release
+ Etcd(127.0.0.1:2379) > use my-release
+ Milvus(my-release) >
+ ```
+
+## Check Milvus status
+
+You can use the `show` commands to check Milvus status.
+
+```shell
+Milvus(my-release) > show -h
+Usage:
+ show [command]
+
+Available Commands:
+ alias list alias meta info
+ channel-watch display channel watching info from data coord meta store
+ checkpoint list checkpoint collection vchannels
+ collection-history display collection change history
+ collection-loaded display information of loaded collection from querycoord
+ collections list current available collection from RootCoord
+ config-etcd list configuations set by etcd source
+ configurations iterate all online components and inspect configuration
+ current-version
+ database display Database info from rootcoord meta
+ index
+ partition list partitions of provided collection
+ querycoord-channel display querynode information from querycoord cluster
+ querycoord-cluster display querynode information from querycoord cluster
+ querycoord-task display task information from querycoord
+ replica list current replica information from QueryCoord
+ segment display segment information from data coord meta store
+ segment-index display segment index information
+ segment-loaded display segment information from querycoordv1 meta
+ segment-loaded-grpc list segments loaded information
+ session list online milvus components
+
+Flags:
+ -h, --help help for show
+
+Use " show [command] --help" for more information about a command.
+```
+
+### List sessions
+
+You can list all etcd sessions as follows:
+
+```shell
+Milvus(by-dev) > show session
+Session:datacoord, ServerID: 3, Version: 2.2.11, Address: 10.244.0.8:13333
+Session:datanode, ServerID: 6, Version: 2.2.11, Address: 10.244.0.8:21124
+Session:indexcoord, ServerID: 4, Version: 2.2.11, Address: 10.244.0.8:31000
+Session:indexnode, ServerID: 5, Version: 2.2.11, Address: 10.244.0.8:21121
+Session:proxy, ServerID: 8, Version: 2.2.11, Address: 10.244.0.8:19529
+Session:querycoord, ServerID: 7, Version: 2.2.11, Address: 10.244.0.8:19531
+Session:querynode, ServerID: 2, Version: 2.2.11, Address: 10.244.0.8:21123
+Session:rootcoord, ServerID: 1, Version: 2.2.11, Address: 10.244.0.8:53100
+```
+
+In the command output, you can find sessions from all Milvus components to etcd.
+
+### Check databases and collections
+
+You can list all databases and collections.
+
+- List databases
+
+ In the command output, you can find information about every database.
+
+ ```shell
+ Milvus(by-dev) > show database
+ =============================
+ ID: 1 Name: default
+ TenantID: State: DatabaseCreated
+ --- Total Database(s): 1
+ ```
+
+- List collections
+
+ In the command output, you can find detailed information about every collection.
+
+ ```shell
+ Milvus(by-dev) > show collections
+ ================================================================================
+ DBID: 1
+ Collection ID: 443407225551410746 Collection Name: medium_articles_2020
+ Collection State: CollectionCreated Create Time: 2023-08-08 09:27:08
+ Fields:
+ - Field ID: 0 Field Name: RowID Field Type: Int64
+ - Field ID: 1 Field Name: Timestamp Field Type: Int64
+ - Field ID: 100 Field Name: id Field Type: Int64
+ - Primary Key: true, AutoID: false
+ - Field ID: 101 Field Name: title Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 102 Field Name: title_vector Field Type: FloatVector
+ - Type Param dim: 768
+ - Field ID: 103 Field Name: link Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 104 Field Name: reading_time Field Type: Int64
+ - Field ID: 105 Field Name: publication Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 106 Field Name: claps Field Type: Int64
+ - Field ID: 107 Field Name: responses Field Type: Int64
+ Enable Dynamic Schema: false
+ Consistency Level: Bounded
+ Start position for channel by-dev-rootcoord-dml_0(by-dev-rootcoord-dml_0_443407225551410746v0): [1 0 28 175 133 76 39 6]
+ --- Total collections: 1 Matched collections: 1
+ --- Total channel: 1 Healthy collections: 1
+ ================================================================================
+ ```
+
+- View a specific collection
+
+ You can view a specific collection by specifying its ID.
+
+ ```shell
+ Milvus(by-dev) > show collection-history --id 443407225551410746
+ ================================================================================
+ DBID: 1
+ Collection ID: 443407225551410746 Collection Name: medium_articles_2020
+ Collection State: CollectionCreated Create Time: 2023-08-08 09:27:08
+ Fields:
+ - Field ID: 0 Field Name: RowID Field Type: Int64
+ - Field ID: 1 Field Name: Timestamp Field Type: Int64
+ - Field ID: 100 Field Name: id Field Type: Int64
+ - Primary Key: true, AutoID: false
+ - Field ID: 101 Field Name: title Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 102 Field Name: title_vector Field Type: FloatVector
+ - Type Param dim: 768
+ - Field ID: 103 Field Name: link Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 104 Field Name: reading_time Field Type: Int64
+ - Field ID: 105 Field Name: publication Field Type: VarChar
+ - Type Param max_length: 512
+ - Field ID: 106 Field Name: claps Field Type: Int64
+ - Field ID: 107 Field Name: responses Field Type: Int64
+ Enable Dynamic Schema: false
+ Consistency Level: Bounded
+ Start position for channel by-dev-rootcoord-dml_0(by-dev-rootcoord-dml_0_443407225551410746v0): [1 0 28 175 133 76 39 6]
+ ```
+
+- View all loaded collections
+
+ You can have Birdwatcher filter all loaded collections.
+
+ ```shell
+ Milvus(by-dev) > show collection-loaded
+ Version: [>= 2.2.0] CollectionID: 443407225551410746
+ ReplicaNumber: 1 LoadStatus: Loaded
+ --- Collections Loaded: 1
+ ```
+
+- List all channel checkpoints of a collection
+
+ You can have Birdwatcher list all checkpoints of a specific collection.
+
+ ```shell
+ Milvus(by-dev) > show checkpoint --collection 443407225551410746
+ vchannel by-dev-rootcoord-dml_0_443407225551410746v0 seek to 2023-08-08 09:36:09.54 +0000 UTC, cp channel: by-dev-rootcoord-dml_0_443407225551410746v0, Source: Channel Checkpoint
+ ```
+
+### Check index details
+
+Run the following command to list all index files in detail.
+
+```shell
+Milvus(by-dev) > show index
+*************2.1.x***************
+*************2.2.x***************
+==================================================================
+Index ID: 443407225551410801 Index Name: _default_idx_102 CollectionID:443407225551410746
+Create Time: 2023-08-08 09:27:19.139 +0000 Deleted: false
+Index Type: HNSW Metric Type: L2
+Index Params:
+==================================================================
+```
+
+### List partitions
+
+Run the following command to list all partitions in a specific collection.
+
+```shell
+Milvus(by-dev) > show partition --collection 443407225551410746
+Parition ID: 443407225551410747 Name: _default State: PartitionCreated
+--- Total Database(s): 1
+```
+
+### Check channel status
+
+Run the following command to view channel status
+
+```shell
+Milvus(by-dev) > show channel-watch
+=============================
+key: by-dev/meta/channelwatch/6/by-dev-rootcoord-dml_0_443407225551410746v0
+Channel Name:by-dev-rootcoord-dml_0_443407225551410746v0 WatchState: WatchSuccess
+Channel Watch start from: 2023-08-08 09:27:09 +0000, timeout at: 1970-01-01 00:00:00 +0000
+Start Position ID: [1 0 28 175 133 76 39 6], time: 1970-01-01 00:00:00 +0000
+Unflushed segments: []
+Flushed segments: []
+Dropped segments: []
+--- Total Channels: 1
+```
+
+### List all replicas and segments
+
+- List all replicas
+
+ Run the following command to list all replicas and their corresponding collections.
+
+ ```shell
+ Milvus(by-dev) > show replica
+ ================================================================================
+ ReplicaID: 443407225685278721 CollectionID: 443407225551410746 version:>=2.2.0
+ All Nodes:[2]
+ ```
+
+- List all segments
+
+ Run the following command to list all segments and their status
+
+ ```shell
+ SegmentID: 443407225551610865 State: Flushed, Row Count:5979
+ --- Growing: 0, Sealed: 0, Flushed: 1
+ --- Total Segments: 1, row count: 5979
+ ```
+
+ Run the following command to list all loaded segments in detail. For Milvus 2.1.x, use `show segment-loaded` instead.
+
+ ```shell
+ Milvus(by-dev) > show segment-loaded-grpc
+ ===========
+ ServerID 2
+ Channel by-dev-rootcoord-dml_0_443407225551410746v0, collection: 443407225551410746, version 1691486840680656937
+ Leader view for channel: by-dev-rootcoord-dml_0_443407225551410746v0
+ Growing segments number: 0 , ids: []
+ SegmentID: 443407225551610865 CollectionID: 443407225551410746 Channel: by-dev-rootcoord-dml_0_443407225551410746v0
+ Sealed segments number: 1
+ ```
+
+### List configurations
+
+You can have Birdwatcher list the current configurations of each Milvus component.
+
+```shell
+Milvus(by-dev) > show configurations
+client nil Session:proxy, ServerID: 8, Version: 2.2.11, Address: 10.244.0.8:19529
+Component rootcoord-1
+rootcoord.importtaskexpiration: 900
+rootcoord.enableactivestandby: false
+rootcoord.importtaskretention: 86400
+rootcoord.maxpartitionnum: 4096
+rootcoord.dmlchannelnum: 16
+rootcoord.minsegmentsizetoenableindex: 1024
+rootcoord.port: 53100
+rootcoord.address: localhost
+rootcoord.maxdatabasenum: 64
+Component datacoord-3
+...
+querynode.gracefulstoptimeout: 30
+querynode.cache.enabled: true
+querynode.cache.memorylimit: 2147483648
+querynode.scheduler.maxreadconcurrentratio: 2
+```
+
+As an alternative, you can visit each Milvus component to find its configuration. The following demonstrates how to list the configuration of the QueryCoord with ID 7.
+
+```shell
+Milvus(by-dev) > show session
+Session:datacoord, ServerID: 3, Version: 2.2.11, Address: 10.244.0.8:13333
+Session:datanode, ServerID: 6, Version: 2.2.11, Address: 10.244.0.8:21124
+Session:indexcoord, ServerID: 4, Version: 2.2.11, Address: 10.244.0.8:31000
+Session:indexnode, ServerID: 5, Version: 2.2.11, Address: 10.244.0.8:21121
+Session:proxy, ServerID: 8, Version: 2.2.11, Address: 10.244.0.8:19529
+Session:querycoord, ServerID: 7, Version: 2.2.11, Address: 10.244.0.8:19531
+Session:querynode, ServerID: 2, Version: 2.2.11, Address: 10.244.0.8:21123
+Session:rootcoord, ServerID: 1, Version: 2.2.11, Address: 10.244.0.8:53100
+
+Milvus(by-dev) > visit querycoord 7
+QueryCoord-7(10.244.0.8:19531) > configuration
+Key: querycoord.enableactivestandby, Value: false
+Key: querycoord.channeltasktimeout, Value: 60000
+Key: querycoord.overloadedmemorythresholdpercentage, Value: 90
+Key: querycoord.distpullinterval, Value: 500
+Key: querycoord.checkinterval, Value: 10000
+Key: querycoord.checkhandoffinterval, Value: 5000
+Key: querycoord.taskexecutioncap, Value: 256
+Key: querycoord.taskmergecap, Value: 8
+Key: querycoord.autohandoff, Value: true
+Key: querycoord.address, Value: localhost
+Key: querycoord.port, Value: 19531
+Key: querycoord.memoryusagemaxdifferencepercentage, Value: 30
+Key: querycoord.refreshtargetsintervalseconds, Value: 300
+Key: querycoord.balanceintervalseconds, Value: 60
+Key: querycoord.loadtimeoutseconds, Value: 1800
+Key: querycoord.globalrowcountfactor, Value: 0.1
+Key: querycoord.scoreunbalancetolerationfactor, Value: 0.05
+Key: querycoord.reverseunbalancetolerationfactor, Value: 1.3
+Key: querycoord.balancer, Value: ScoreBasedBalancer
+Key: querycoord.autobalance, Value: true
+Key: querycoord.segmenttasktimeout, Value: 120000
+```
+
+## Backup metrics
+
+You can have Birdwatcher back up metrics of all components
+
+```shell
+Milvus(my-release) > backup
+Backing up ... 100%(2452/2451)
+backup etcd for prefix done
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+http://10.244.0.10:9091/metrics
+backup for prefix done, stored in file: bw_etcd_ALL.230810-075211.bak.gz
+```
+
+Then you can check the file in the directory where you start Birdwatcher.
+
+## Probe collections
+
+You can have Birdwatcher probe the status of loaded collections with specified primary keys or mock queries.
+
+### Probe collection with known primary key
+
+In the `probe` command, you should specify the primary key using the `pk` flag, and the collection ID using the `collection` flag.
+
+```shell
+Milvus(by-dev) > probe pk --pk 110 --collection 442844725212299747
+PK 110 found on segment 442844725212299830
+Field id, value: &{long_data: }
+Field title, value: &{string_data: }
+Field title_vector, value: &{dim:768 float_vector: }
+Field article_meta, value: &{json_data: }
+```
+
+### Probe all collections with mock queries
+
+You can also have Birdwatcher probe all collections with mock queries.
+
+```shell
+Milvus(by-dev) > probe query
+probing collection 442682158191982314
+Found vector field vector(103) with dim[384], indexID: 442682158191990455
+failed to generated mock request probing index type IVF_FLAT not supported yet
+probing collection 442844725212086932
+Found vector field title_vector(102) with dim[768], indexID: 442844725212086936
+Shard my-release-rootcoord-dml_1_442844725212086932v0 leader[298] probe with search success.
+probing collection 442844725212299747
+Found vector field title_vector(102) with dim[768], indexID: 442844725212299751
+Shard my-release-rootcoord-dml_4_442844725212299747v0 leader[298] probe with search success.
+probing collection 443294505839900248
+Found vector field vector(101) with dim[256], indexID: 443294505839900251
+Shard my-release-rootcoord-dml_5_443294505839900248v0 leader[298] probe with search success.
+```
+
+
+
diff --git a/preview/site/en/userGuide/tools/cli_commands.md b/preview/site/en/userGuide/tools/cli_commands.md
index 33eb8beef..100664cad 100644
--- a/preview/site/en/userGuide/tools/cli_commands.md
+++ b/preview/site/en/userGuide/tools/cli_commands.md
@@ -1,6 +1,7 @@
---
id: cli_commands.md
summary: Interact with Milvus using commands.
+title: Milvus_CLI Command Reference
---
# Milvus_CLI Command Reference
@@ -9,164 +10,144 @@ Milvus Command-Line Interface (CLI) is a command-line tool that supports databas
This topic introduces all supported commands and the corresponding options. Some examples are also included for your reference.
-## calc distance
+## clear
-Calculates the distance between two vector arrays.
+Clears the screen.
-Syntax
+Syntax
```shell
-calc distance
+clear
```
-Options
+Options
| Option | Full name | Description |
| :----- | :-------- | :----------------------------------- |
| --help | n/a | Displays help for using the command. |
-Example
+## connect
+
+Connects to Milvus.
-To calculate the distance between two vector arrays and be prompted for the required input:
+Syntax
```shell
-milvus_cli > calc distance
+connect [-uri (text)] [-t (text)]
+```
-Import left operator vectors from existing collection? [y/N]: n
+Options
-The vector's type (float_vectors, bin_vectors): float_vectors
+| Option | Full name | Description |
+| :----- | :----------- | :---------------------------------------------------------------------------------------------------------- |
+| -uri | --uri | (Optional) The uri name. The default is "http://127.0.0.1:19530". |
+| -t | --token | (Optional) The zilliz cloud apikey or `username:password`. The default is None. |
+| --help | n/a | Displays help for using the command. |
-Left vectors:
- [[0.083, 0.992, 0.931, 0.433, 0.93, 0.706, 0.668, 0.481, 0.255, 0.088, 0.121, 0.701, 0.935, 0.142, 0.012, 0.197, 0.066, 0.864, 0.263, 0.732, 0.445, 0.672, 0.184, 0.675, 0.361, 0.115, 0.396, 0.206, 0.084, 0.274, 0.523, 0.958, 0.071, 0.646, 0.864, 0.434, 0.212, 0.5, 0.319, 0.608, 0.356, 0.745, 0.672, 0.488, 0.221, 0.485, 0.193, 0.557, 0.546, 0.626, 0.593, 0.526, 0.404, 0.795, 0.076, 0.156, 0.231, 0.1, 0.18, 0.796, 0.716, 0.752, 0.816, 0.363], [0.284, 0.135, 0.172, 0.198, 0.752, 0.174, 0.314, 0.18, 0.672, 0.727, 0.062, 0.611, 0.921, 0.851, 0.238, 0.648, 0.794, 0.177, 0.639, 0.339, 0.402, 0.977, 0.887, 0.528, 0.768, 0.16, 0.698, 0.016, 0.906, 0.261, 0.902, 0.93, 0.547, 0.146, 0.65, 0.072, 0.876, 0.645, 0.303, 0.922, 0.807, 0.093, 0.063, 0.344, 0.667, 0.81, 0.662, 0.147, 0.242, 0.641, 0.903, 0.714, 0.637, 0.365, 0.512, 0.267, 0.577, 0.809, 0.698, 0.62, 0.768, 0.402, 0.922, 0.592]]
+Example
-Import right operator vectors from existing collection? [y/N]: n
+```shell
+milvus_cli > connect -uri http://127.0.0.1:19530
+```
-The vector's type (float_vectors, bin_vectors): float_vectors
+## create Database
-Right vectors:
- [[0.518, 0.034, 0.786, 0.251, 0.04, 0.247, 0.55, 0.595, 0.638, 0.957, 0.303, 0.023, 0.007, 0.712, 0.841, 0.648, 0.807, 0.429, 0.402, 0.904, 0.002, 0.882, 0.69, 0.268, 0.732, 0.511, 0.942, 0.202, 0.749, 0.234, 0.666, 0.517, 0.787, 0.399, 0.565, 0.457, 0.57, 0.937, 0.712, 0.981, 0.928, 0.678, 0.154, 0.775, 0.754, 0.532, 0.074, 0.493, 0.288, 0.229, 0.9, 0.657, 0.936, 0.184, 0.478, 0.587, 0.592, 0.84, 0.793, 0.985, 0.826, 0.595, 0.947, 0.175], [0.704, 0.02, 0.937, 0.249, 0.431, 0.99, 0.779, 0.855, 0.731, 0.665, 0.773, 0.647, 0.135, 0.44, 0.621, 0.329, 0.718, 0.003, 0.927, 0.511, 0.515, 0.359, 0.744, 0.828, 0.31, 0.161, 0.605, 0.539, 0.331, 0.077, 0.503, 0.668, 0.275, 0.72, 0.172, 0.035, 0.88, 0.762, 0.646, 0.727, 0.83, 0.001, 0.085, 0.188, 0.583, 0.709, 0.134, 0.683, 0.246, 0.214, 0.863, 0.109, 0.168, 0.539, 0.451, 0.303, 0.064, 0.575, 0.547, 0.85, 0.75, 0.789, 0.681, 0.735], [0.648, 0.769, 0.525, 0.716, 0.752, 0.199, 0.095, 0.222, 0.767, 0.029, 0.244, 0.527, 0.496, 0.691, 0.487, 0.83, 0.546, 0.102, 0.845, 0.096, 0.744, 0.758, 0.092, 0.289, 0.139, 0.005, 0.204, 0.245, 0.528, 0.607, 0.446, 0.029, 0.686, 0.558, 0.705, 0.451, 0.87, 0.404, 0.824, 0.727, 0.058, 0.283, 0.512, 0.682, 0.027, 0.026, 0.809, 0.669, 0.241, 0.103, 0.101, 0.225, 0.989, 0.662, 0.917, 0.972, 0.93, 0.447, 0.318, 0.434, 0.437, 0.036, 0.009, 0.96], [0.726, 0.418, 0.404, 0.244, 0.618, 0.356, 0.07, 0.842, 0.137, 0.967, 0.465, 0.811, 0.027, 0.704, 0.935, 0.546, 0.92, 0.125, 0.917, 0.089, 0.463, 0.929, 0.289, 0.721, 0.368, 0.837, 0.14, 0.431, 0.495, 0.75, 0.484, 0.083, 0.431, 0.392, 0.177, 0.303, 0.013, 0.317, 0.593, 0.047, 0.695, 0.185, 0.633, 0.825, 0.203, 0.619, 0.597, 0.152, 0.899, 0.061, 0.512, 0.67, 0.82, 0.52, 0.743, 0.07, 0.99, 0.119, 0.949, 0.284, 0.529, 0.65, 0.523, 0.059]]
+Create Database in Milvus
-Supported metric type. Default is "L2" (L2, IP, HAMMING, TANIMOTO) [L2]:
-L2
+Syntax
-sqrt [False]: True
+```shell
+create database -db (text)
+```
+
+### Options
-Timeout(optional) []:
+| Option | Full name | Description |
+| :----- | :--------- | :-------------------------------------------------- |
+| -db | --database | [Required] The database name in milvus. |
+| --help | n/a | Displays help for using the command. |
-======
-Return type:
-Assume the vectors_left: L_1, L_2, L_3
-Assume the vectors_right: R_a, R_b
-Distance between L_n and R_m we called "D_n_m"
-The returned distances are arranged like this:
-[[D_1_a, D_1_b],
-[D_2_a, D_2_b],
-[D_3_a, D_3_b]]
+### Examples
-Note: if some vectors do not exist in collection, the returned distance is "-1.0"
-======
+#### Example 1
-Result:
+The following example create the database testdb
in milvus.
-[[3.625464916229248, 3.234992742538452, 3.568333148956299, 3.694913148880005], [2.556027889251709, 2.8901233673095703, 3.385758399963379, 3.3239054679870605]]
+```shell
+milvus_cli > create database -db testdb
```
-## calc mkts_from_hybridts
+## use Database
-Generates a hybrid timestamp based on an existing hybrid timestamp, timedelta, and incremental time interval.
+Use Database in Milvus
-Syntax
+Syntax
```shell
-calc mkts_from_hybridts -h (int) -m (float)
+use database -db (text)
```
-Options
+### Options
-| Option | Full name | Description |
-| :----- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
-| -h | --hybridts | The original hybrid timestamp used to generate a new hybrid timestamp. A non-negative integer that ranges from 0 to 18446744073709551615. |
-| -m | --milliseconds | The incremental interval in milliseconds. |
-| --help | n/a | Displays help for using the command. |
+| Option | Full name | Description |
+| :----- | :--------- | :-------------------------------------------------- |
+| -db | --database | [Required] The database name in milvus. |
+| --help | n/a | Displays help for using the command. |
-## calc mkts_from_unixtime
+### Examples
-Generates a hybrid timestamp based on the Unix Epoch time, timedelta, and incremental time interval.
+#### Example 1
-Syntax
+The following example use the database testdb
in milvus.
```shell
-calc mkts_from_unixtime -e (float) -m (float)
+milvus_cli > use database -db testdb
```
-Options
-
-| Option | Full name | Description |
-| :----- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| -e | --epoch | The known Unix timestamp used to generate a hybrid timestamp. The Unix epoch is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). |
-| -m | --milliseconds | The incremental interval in milliseconds. |
-| --help | n/a | Displays help for using the command. |
-
-## calc hybridts_to_unixtime
+## List Databases
-Converts a hybrid timestamp to the UNIX timestamp ignoring the logic part.
+List Databases in Milvus
-Syntax
+Syntax
```shell
-calc hybridts_to_unixtime -h (int)
+list databases
```
+### Examples
-Options
-
-| Option | Full name | Description |
-| :----- | :--------- | :--------------------------------------------------------------------------------------------------------------------------------- |
-| -h | --hybridts | The known hybrid timestamp to be converted to a UNIX timestamp. A non-negative integer that ranges from 0 to 18446744073709551615. |
-| --help | n/a | Displays help for using the command. |
-
-## clear
-
-Clears the screen.
+#### Example 1
-Syntax
+The following example list the databases in milvus.
```shell
-clear
+milvus_cli > list databases
```
-Options
+## Delete Database
-| Option | Full name | Description |
-| :----- | :-------- | :----------------------------------- |
-| --help | n/a | Displays help for using the command. |
-
-## connect
-
-Connects to Milvus.
+Delete Database in Milvus
-Syntax
+Syntax
```shell
-connect [-h (text)] [-p (int)] [-a (text)] [-s (text)] [-u (text)] [-pwd (text)] [-D]
+delete database -db (text)
```
-Options
+### Options
-| Option | Full name | Description |
-| :----- | :----------- | :---------------------------------------------------------------------------------------------------------- |
-| -h | --host | (Optional) The host name. The default is "127.0.0.1". |
-| -p | --port | (Optional) The port number. The default is "19530". |
-| -a | --alias | (Optional) The alias name of the Milvus link. The default is "default". |
-| -s | --secure | (Optional) Whether to enable secure connection or not. The default is "False". |
-| -pwd | --password | (Optional) The user password in Milvus. The default is "None". |
-| -u | --username | (Optional) The username in Milvus. The default is "None". |
-| -D | --disconnect | (Optional) Flag to disconnect from the Milvus server specified by an alias. The default alias is "default". |
-| --help | n/a | Displays help for using the command. |
+| Option | Full name | Description |
+| :----- | :--------- | :-------------------------------------------------- |
+| -db | --database | [Required] The database name in milvus. |
+| --help | n/a | Displays help for using the command. |
-Example
+### Examples
+
+#### Example 1
+
+The following example delete the database testdb
in milvus.
```shell
-milvus_cli > connect -h 127.0.0.1 -p 19530 -a default
+milvus_cli > delete database -db testdb
```
## create user
@@ -206,7 +187,7 @@ Specifies unique aliases for a collection.
Syntax
```shell
-create alias -c (text) -a (text) [-A] [-t (float)]
+create alias -c (text) -a (text) [-A]
```
Options
@@ -216,27 +197,26 @@ create alias -c (text) -a (text) [-A] [-t (float)]
| -c | --collection-name | The name of the collection. |
| -a | --alias-name | The alias. |
| -A | --alter | (Optional) Flag to transfer the alias to a specified collection. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
Examples
-Example 1
+Example 1
The following example creates the carAlias1
and carAlias2
aliases for the car
collection.
```shell
-milvus_cli > create alias -c car -a carAlias1 -a carAlias2
+milvus_cli > create alias -c car -a carAlias1
```
-Example 2
+Example 2
Example 2 is based on Example 1.
-The following example transfers the carAlias1
and carAlias2
aliases from the car
collection to the car2
collection.
+The following example transfers the carAlias1
alias from the car
collection to the car2
collection.
```shell
-milvus_cli > create alias -c car2 -A -a carAlias -a carAlias2
+milvus_cli > create alias -c car2 -A -a carAlias1
```
## create collection
@@ -257,13 +237,18 @@ create collection -c (text) -f (text) -p (text) [-a] [-d (text)]
| -f | --schema-field | (Multiple) The field schema in the `::` format. |
| -p | --schema-primary-field | The name of the primary key field. |
| -a | --schema-auto-id | (Optional) Flag to generate IDs automatically. |
-| -d | --schema-description | (Optional) The description of the collection. |
+| -desc | --schema-description | (Optional) The description of the collection. |
+| -level | --consistency-level | (Optional) Consistency level: Bounded,Session,Strong, Eventual . |
+| -d | --is-dynamic | (Optional) Collection schema supports dynamic fields or not. |
+| -s | --shards-num | (Optional) Shards number |
| --help | n/a | Displays help for using the command. |
Example
```shell
-milvus_cli > create collection -c car -f id:INT64:primary_field -f vector:FLOAT_VECTOR:128 -f color:INT64:color -f brand:INT64:brand -p id -a -d 'car_collection'
+## For array field: --schema-field support :::(:if Varchar)
+
+milvus_cli > create collection -c car -f id:INT64:primary_field -f vector:FLOAT_VECTOR:128 -f color:INT64:color -f brand:ARRAY:64:VARCHAR:128 -p id -A -d 'car_collection'
```
## create partition
@@ -322,11 +307,11 @@ The name of the field to create an index for (vector): vector
Index name: vectorIndex
-Index type (FLAT, IVF_FLAT, IVF_SQ8, IVF_PQ, RNSG, HNSW, ANNOY): IVF_FLAT
+# Default is ''
+Index type FLAT, IVF_FLAT, IVF_SQ8, IVF_PQ, RNSG, HNSW, ANNOY, AUTOINDEX, DISKANN, GPU_IVF_FLAT, GPU_IVF_PQ, SPARSE_INVERTED_INDEX, SPARSE_WAND, SCANN, STL_SORT, Trie, INVERTED, ) []: IVF_FLAT
-Index metric type (L2, IP, HAMMING, TANIMOTO): L2
-
-Index params nlist: 2
+# Default is ''
+Index metric type (L2, IP, HAMMING, TANIMOTO, COSINE, ) []:
Timeout []:
```
@@ -338,20 +323,20 @@ Deletes a user
### Syntax
```shell
-delete alias -p (text)
+delete user -u (text)
```
### Options
| Option | Full name | Description |
| :----- | :--------- | :----------------------------------- |
-| -u | --usernmae | The username. |
+| -u | --username | The username. |
| --help | n/a | Displays help for using the command. |
### Example
```shell
-milvus_cli > delete user -p zilliz
+milvus_cli > delete user -u zilliz
```
## delete alias
@@ -361,7 +346,7 @@ Deletes an alias.
Syntax
```shell
-delete alias -a (text) [-t (float)]
+delete alias -a (text)
```
Options
@@ -369,7 +354,6 @@ delete alias -a (text) [-t (float)]
| Option | Full name | Description |
| :----- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -a | --alias-name | The alias. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
| |
@@ -380,7 +364,7 @@ Deletes a collection.
Syntax
```shell
-delete collection -c (text) [-t (float)]
+delete collection -c (text)
```
Options
@@ -388,7 +372,6 @@ delete collection -c (text) [-t (float)]
| Option | Full name | Description |
| :----- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -c | --collection-name | The name of the collection to be deleted. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
Example
@@ -404,7 +387,7 @@ Deletes entities.
Syntax
```
-delete entities -c (text) -p (text) [-t (float)]
+delete entities -c (text) -p (text)
```
Options
@@ -413,7 +396,6 @@ delete entities -c (text) -p (text) [-t (float)]
| :----- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -c | --collection-name | The name of the collection that entities to be deleted belongs to. |
| -p | --partition | (Optional) The name of the partition to be deleted. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
Example
@@ -435,7 +417,7 @@ Deletes a partition.
Syntax
```shell
-delete partition -c (text) -p (text) [-t (float)]
+delete partition -c (text) -p (text)
```
Options
@@ -443,7 +425,6 @@ delete partition -c (text) -p (text) [-t (float)]
| Option | Full name | Description |
| :----- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -c | --collection-name | The name of the collection that the partition to be deleted belongs to. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| -p | --partition | The name of the partition to be deleted. |
| --help | n/a | Displays help for using the command. |
@@ -462,7 +443,7 @@ Deletes an index and the corresponding index files.
Syntax
```shell
-delete index -c (text) -in (text) [-t (float)]
+delete index -c (text) -in (text)
```
Options
@@ -471,7 +452,6 @@ delete index -c (text) -in (text) [-t (float)]
| :----- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -c | --collection-name | The name of the collection. |
| -in | --index-name | The name of the index name. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
Example
@@ -480,40 +460,40 @@ delete index -c (text) -in (text) [-t (float)]
milvus_cli > delete index -c car -in indexName
```
-## describe collection
+## show collection
Shows the detailed information of a collection.
-Syntax
+Syntax
```shell
-describe collection -c (text)
+show collection -c (text)
```
-Options
+Options
| Option | Full name | Description |
| :----- | :---------------- | :----------------------------------- |
| -c | --collection-name | The name of the collection. |
| --help | n/a | Displays help for using the command. |
-Example
+Example
```shell
-milvus_cli > describe collection -c test_collection_insert
+milvus_cli > show collection -c test_collection_insert
```
-## describe partition
+## show partition
Shows the detailed information of a partition.
-Syntax
+Syntax
```shell
-describe partition -c (text) -p (text)
+show partition -c (text) -p (text)
```
-Options
+Options
| Option | Full name | Description |
| :----- | :---------------- | :-------------------------------------------------------- |
@@ -521,23 +501,23 @@ describe partition -c (text) -p (text)
| -p | --partition | The name of the partition. |
| --help | n/a | Displays help for using the command. |
-Example
+Example
```shell
-milvus_cli > describe partition -c test_collection_insert -p _default
+milvus_cli > show partition -c test_collection_insert -p _default
```
-## describe index
+## show index
Shows the detailed information of an index.
-Syntax
+Syntax
```shell
-describe index -c (text) -in (text)
+show index -c (text) -in (text)
```
-Options
+Options
| Option | Full name | Description |
| :----- | :---------------- | :-------------------------- |
@@ -546,6 +526,11 @@ describe index -c (text) -in (text)
| --help | n/a | Displays help for using the command. |
+Example
+
+```shell
+milvus_cli > show index -c test_collection -in index_name
+```
## exit
Closes the command line window.
@@ -576,22 +561,21 @@ help
| Command | Description |
| :----------- | :------------------------------------------------------------------------------------------------------------------ |
-| calc | Calculates the distance between two vector arrays, mkts_from_hybridts, mkts_from_unixtime, or hybridts_to_unixtime. |
| clear | Clears the screen. |
| connect | Connects to Milvus. |
-| create | Creates a collection, partition, index, or alias. |
-| delete | Deletes a collection, partition, index, entity, or alias. |
-| describe | Describes a collection, partition, or index. |
+| create | Create collection, database, partition,user and index. |
+| delete | Delete collection, database, partition,alias,user or index. |
| exit | Closes the command line window. |
| help | Displays help for using a command. |
-| import | Imports data into a partition. |
-| list | Lists collections, partitions, or indexes. |
+| insert | Imports data into a partition. |
+| list | List collections,databases, partitions,users or indexes. |
| load | Loads a collection or partition. |
-| load_balance | Performs load balancing on a query node. |
| query | Shows query results that match all the criteria that you enter. |
| release | Releases a collection or partition. |
| search | Performs a vector similarity search or hybrid search. |
-| show | Shows the current collection, progress of entity loading, progress of entity indexing, or segment information. |
+| show | Show connection, database,collection, loading_progress or index_progress. |
+| rename | Rename collection |
+| use | Use database |
| version | Shows the version of Milvus_CLI. |
## import
@@ -601,7 +585,7 @@ Imports local or remote data into a partition.
Syntax
```shell
-import -c (text)[-p (text)][-t (float)]
+import -c (text)[-p (text)]
```
Options
@@ -610,7 +594,6 @@ import -c (text)[-p (text)][-t (float)]
| :----- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -c | --collection-name | The name of the collection that the data are inserted into. |
| -p | --partition | (Optional) The name of the partition that the data are inserted into. Not passing this partition option indicates choosing the "\_default" partition. |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
| --help | n/a | Displays help for using the command. |
Example 1
@@ -683,15 +666,13 @@ Lists all collections.
Syntax
```shell
-list collections [-t (float)][-l (boolean)]
+list collections
```
Options
| Option | Full name | Description |
| :----- | :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| -t | --timeout | (Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs. |
-| -l | --show-loaded | (Optional) Shows the loaded collections only. |
| --help | n/a | Displays help for using the command. |
## list indexes
@@ -748,26 +729,6 @@ load -c (text) [-p (text)]
| -p | --partition | (Optional/Multiple) The name of the partition. |
| --help | n/a | Displays help for using the command. |
-## load_balance
-
-Performs load balancing by transferring segments from a source query node to a destination one.
-
-Syntax
-
-```shell
-load_balance -s (int) -d (int) -ss (int) [-t (int)]
-```
-
-Options
-
-| Option | Full name | Description |
-| :----- | :------------------- | :----------------------------------------------------------------------- |
-| -s | --src-node-id | The ID of the source query node to be balanced. |
-| -d | --dst-node-id | (Multiple) The ID of the destination query node to transfer segments to. |
-| -ss | --sealed-segment-ids | (Multiple) The ID of the sealed segment to be transferred. |
-| -t | --timeout | (Optional) The timeout in seconds. |
-| --help | n/a | Displays help for using the command. |
-
## query
Shows query results that match all the criteria that you enter.
@@ -806,7 +767,6 @@ timeout []:
Guarantee timestamp. This instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date. [0]:
Graceful time. Only used in bounded consistency level. If graceful_time is set, PyMilvus will use current timestamp minus the graceful_time as the guarantee_timestamp. This option is 5s by default if not set. [5]:
-Travel timestamp. Users can specify a timestamp in a search to get results based on a data view at a specified point in time. [0]: 428960801420883491
```
Example 2
@@ -830,7 +790,6 @@ timeout []:
Guarantee timestamp. This instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date. [0]:
Graceful time. Only used in bounded consistency level. If graceful_time is set, PyMilvus will use current timestamp minus the graceful_time as the guarantee_timestamp. This option is 5s by default if not set. [5]:
-Travel timestamp. Users can specify a timestamp in a search to get results based on a data view at a specified point in time. [0]: 428960801420883491
```
## release
@@ -882,8 +841,6 @@ out headers): examples/import_csv/search_vectors.csv
The vector field used to search of collection (vector): vector
-Metric type: L2
-
Search parameter nprobe's value: 10
The max number of returned record, also known as topk: 2
@@ -896,7 +853,6 @@ timeout []:
Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
```
Example 2
@@ -913,8 +869,6 @@ The vectors of search data(the length of data is number of query (nq), the dim o
The vector field used to search of collection (vector): vector
-Metric type: L2
-
Search parameter nprobe's value: 10
The specified number of decimal places of returned distance [-1]: 5
@@ -929,7 +883,6 @@ timeout []:
Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
```
Example 3
@@ -957,24 +910,22 @@ timeout []:
Guarantee Timestamp(It instructs Milvus to see all operations performed before a provided timestamp. If no such timestamp is provided, then Milvus will search all operations performed to date) [0]:
-Travel Timestamp(Specify a timestamp in a search to get results based on a data view) [0]:
```
-## show connection
+## List connection
-Shows the current connection.
+List connections.
Syntax
```shell
-show connection [-a]
+list connections
```
Options
| Option | Full name | Description |
| :----- | :-------- | :---------------------------------------- |
-| -a | --all | (Optional) Flag to show all connections. |
| --help | n/a | Displays help for using the command. |
## show index_progress
@@ -1012,23 +963,6 @@ show loading_progress -c (text) [-p (text)]
|-p|--partition|(Optional/Multiple) The name of the loading partition.|
|--help|n/a|Displays help for using the command.|
-## show query_segment
-
-Shows the segment information of a collection.
-
-Syntax
-
-```shell
-show query_segment -c (text) [-t (float)]
-```
-
-Options
-
-|Option|Full name|Description
-|:---|:---|:---|
-|-c|--collection-name|The name of the collection.|
-|-t|--timeout|(Optional) The maximum allowed duration in seconds of an RPC call. Not passing this option indicates that the client keeps waiting until the server responds or an error occurs.|
-|--help|n/a|Displays help for using the command.|
## version
@@ -1051,5 +985,5 @@ version
```shell
$ milvus_cli --version
-Milvus_CLI v0.1.7
+Milvus_CLI v0.4.0
```
diff --git a/preview/site/en/userGuide/tools/cli_overview.md b/preview/site/en/userGuide/tools/cli_overview.md
index 0ebbc2794..29321f455 100644
--- a/preview/site/en/userGuide/tools/cli_overview.md
+++ b/preview/site/en/userGuide/tools/cli_overview.md
@@ -1,6 +1,7 @@
---
id: cli_overview.md
summary: Milvus Command-Line Interface (CLI) is a command-line tool that supports database connection, data operations, and import and export of data.
+title: Milvus Command-Line Interface
---
# Milvus Command-Line Interface
@@ -24,11 +25,15 @@ In the following table, you can find the recommended versions of PyMilvus and Mi
| 2.0.0-RC8 | 2.0.0rc8 | 0.1.8 |
| 2.0.0-RC9 | 2.0.0rc9 | 0.1.9 |
| 2.1.0 | 2.1.0 | 0.3.0 |
-| 2.2.x | 2.2.x | 0.3.2 |
+| 2.2.x | 2.2.x | 0.4.0 |
+| 2.3.x | 2.3.x | 0.4.2 |
+| 2.4.x | 2.4.x | 1.0.0 |
+
+
Milvus 2.0.0-RC7 and later are not backward compatible with 2.0.0-RC6 and earlier due to changes made to storage formats.
## Current version
-The current version of Milvus_CLI is 0.3.2.
+The current version of Milvus_CLI is 1.0.0.
To find your installed version and see if you need to update, run `milvus_cli --version`.
diff --git a/preview/site/en/userGuide/tools/install_cli.md b/preview/site/en/userGuide/tools/install_cli.md
index 467178de5..c1d6fdf4b 100644
--- a/preview/site/en/userGuide/tools/install_cli.md
+++ b/preview/site/en/userGuide/tools/install_cli.md
@@ -1,6 +1,7 @@
---
id: install_cli.md
summary: Learn how to install Milvus_CLI.
+title: Install Milvus_CLI
---
# Install Milvus_CLI
diff --git a/preview/site/en/userGuide/tools/milvus-cdc/cdc-monitoring.md b/preview/site/en/userGuide/tools/milvus-cdc/cdc-monitoring.md
new file mode 100644
index 000000000..74f4ffd42
--- /dev/null
+++ b/preview/site/en/userGuide/tools/milvus-cdc/cdc-monitoring.md
@@ -0,0 +1,43 @@
+---
+id: cdc-monitoring.md
+order: 4
+summary: Milvus-CDC provides comprehensive monitoring capabilities through Grafana dashboards.
+title: Monitoring
+---
+
+# Monitoring
+
+Milvus-CDC provides comprehensive monitoring capabilities through Grafana dashboards, allowing you to visualize key metrics and ensure the smooth operation of your Change Data Capture (CDC) tasks and server health.
+
+### Metrics for CDC tasks
+
+To get started, import the [cdc-grafana.json](https://github.com/zilliztech/milvus-cdc/blob/main/server/configs/cdc-grafana.json) file into Grafana. This will add a dashboard specifically designed for monitoring the status of CDC tasks.
+
+__CDC Grafana Dashboard Overview__:
+
+![milvus-cdc-dashboard](../../../../../assets/milvus-cdc-dashboard.png)
+
+__Key Metrics Explained:__
+
+- __Task__: Number of CDC tasks in different states, including __Initial__, __Running__, and __Paused__.
+
+- __Request Total__: Total number of requests received by Milvus-CDC.
+
+- __Request Success__: Number of successful requests received by Milvus-CDC.
+
+- __task num__: Number of tasks in __Initial__, __Paused__, and __Running__ states over time.
+
+- __task state__: State of individual tasks.
+
+- __request count__: Number of successful and total requests
+
+- __request latency__: Latency of requests through p99, average and other statistics.
+
+- __replicate data rate__: Replication data rate for read/write operations
+
+- __replicate tt lag__: Replication time lag for read/write operations.
+
+- __api execute count__: Number of times different Milvus-CDC APIs were executed.
+
+- __center ts__: Timestamp for read/write tasks.
+
diff --git a/preview/site/en/userGuide/tools/milvus-cdc/deploy-cdc-server.md b/preview/site/en/userGuide/tools/milvus-cdc/deploy-cdc-server.md
new file mode 100644
index 000000000..74d5d505c
--- /dev/null
+++ b/preview/site/en/userGuide/tools/milvus-cdc/deploy-cdc-server.md
@@ -0,0 +1,151 @@
+---
+id: deploy-cdc-server.md
+order: 2
+summary: This guide provides a step-by-step process for deploying a Milvus-CDC server.
+title: Deploy CDC Server
+---
+
+# Deploy CDC Server
+
+This guide provides a step-by-step process for deploying a Milvus-CDC server.
+
+## Prerequisites
+
+Ensure the following conditions are met before deploying a Milvus-CDC server:
+
+- __Milvus Instances__: Both the source Milvus and at least one target Milvus should be deployed and operational.
+
+ - Both the source and target Milvus versions must be 2.3.2 or higher, preferably 2.4.x. We recommend uisng the same version for the source and target Milvus to ensure compatibility.
+
+ - Set the `common.ttMsgEnabled` configuration of the target Milvus to `false`.
+
+ - Configure the source and target Milvus with distinct meta and message storage settings to prevent conflicts. For instance, avoid using the same etcd and rootPath configurations, as well as identical Pulsar services and `chanNamePrefix` in multiple Milvus instances.
+
+- __Metastore__: Have an etcd or MySQL database ready for the Milvus-CDC metastore.
+
+## Steps
+
+### Obtain the Milvus-CDC config file
+
+Clone the [Milvus-CDC repo](https://github.com/zilliztech/milvus-cdc) and navigate to the `milvus-cdc/server/configs` directory to access the `cdc.yaml` config file.
+
+```bash
+git clone https://github.com/zilliztech/milvus-cdc.git
+
+cd milvus-cdc/server/configs
+```
+
+### Edit the config file
+
+In the `milvus-cdc/server/configs` directory, modify the `cdc.yaml` file to customize configurations related to the Milvus-CDC metastore and connection details of the source Milvus.
+
+- __Metastore Configuration__:
+
+ - `metaStoreConfig.storeType`: Type of metastore for Milvus-CDC. Possible values are `etcd` or `mysql`.
+
+ - `metaStoreConfig.etcdEndpoints`: Address for connecting to the etcd of Milvus-CDC. Required if `storeType` is set to `etcd`.
+
+ - `metaStoreConfig.mysqlSourceUrl`: Connection address of the MySQL database for the Milvus-CDC server. Required if `storeType` is set to `mysql`.
+
+ - `metaStoreConfig.rootPath`: Root path of the Milvus-CDC metastore. This configuration enables multi-tenancy, allowing multiple CDC services to utilize the same etcd or MySQL instance while achieving isolation through different root paths.
+
+ Example configuration:
+
+ ```yaml
+ # cdc meta data config
+ metaStoreConfig:
+ # the metastore type, available value: etcd, mysql
+ storeType: etcd
+ # etcd address
+ etcdEndpoints:
+ - localhost:2379
+ # mysql connection address
+ # mysqlSourceUrl: root:root@tcp(127.0.0.1:3306)/milvus-cdc?charset=utf8
+ # meta data prefix, if multiple cdc services use the same store service, you can set different rootPaths to achieve multi-tenancy
+ rootPath: cdc
+ ```
+
+- __Source Milvus Configuration:__
+
+ Specify the connection details of the source Milvus, including etcd and message storage, to establish a connection between the Milvus-CDC server and the source Milvus.
+
+ - `sourceConfig.etcdAddress`: Address for connecting to the etcd of the source Milvus. For more information, refer to [etcd-related Configurations](https://milvus.io/docs/configure_etcd.md#etcd-related-Configurations).
+
+ - `sourceConfig.etcdRootPath`: Root prefix of the key where the source Milvus stores data in etcd. The value may vary based on the deployment method of the Milvus instance:
+
+ - __Helm__ or __Docker Compose__: Defaults to `by-dev`.
+
+ - __Operator__: Defaults to ``.
+
+ - `sourceConfig.pulsar`: Pulsar configurations for the source Milvus. If the source Milvus uses Kafka for message storage, remove all Pulsar-related configurations. For more information, refer to [Pulsar-related Configurations](https://milvus.io/docs/configure_pulsar.md).
+
+ - `sourceConfig.kafka.address`: Kafka address for the source Milvus. Uncomment this configuration if the source Milvus uses Kafka for message storage. For more information, refer to [Kafka-related Configurations](https://milvus.io/docs/configure_kafka.md).
+
+Example configuration:
+
+```yaml
+# milvus-source config, these settings are basically the same as the corresponding configuration of milvus.yaml in milvus source.
+sourceConfig:
+ # etcd config
+ etcdAddress:
+ - localhost:2379
+ etcdRootPath: by-dev
+ etcdMetaSubPath: meta
+ # default partition name
+ defaultPartitionName: _default
+ # read buffer length, mainly used for buffering if writing data to milvus-target is slow.
+ readChanLen: 10
+ # milvus-source mq config, which is pulsar or kafka
+ pulsar:
+ address: pulsar://localhost:6650
+ webAddress: localhost:80
+ maxMessageSize: 5242880
+ tenant: public
+ namespace: default
+# authPlugin: org.apache.pulsar.client.impl.auth.AuthenticationToken
+# authParams: token:xxx
+# kafka:
+# address: 127.0.0.1:9092
+```
+
+### Compile the Milvus-CDC server
+
+After saving the `cdc.yaml` file, navigate to the `milvus-cdc` directory and run one of the following commands to compile the server:
+
+- For a binary file:
+
+ ```bash
+ make build
+ ```
+
+- For a Docker image:
+
+ ```bash
+ bash build_image.sh
+ ```
+
+ For a Docker image, mount the compiled file to `/app/server/configs/cdc.yaml` within the container.
+
+### Start the server
+
+- Using the binary
+
+ Navigate to the directory containing the `milvus-cdc` binary and the `configs` directory with the `cdc.yaml` file, then start the server:
+
+ ```bash
+ # dir tree
+ .
+ ├── milvus-cdc # build from source code or download from release page
+ ├── configs
+ │ └── cdc.yaml # config for cdc and source milvus
+
+ # start milvus cdc
+ ./milvus-cdc server
+ ```
+
+- Using Docker Compose:
+
+ ```bash
+ docker-compose up -d
+ ```
+
diff --git a/preview/site/en/userGuide/tools/milvus-cdc/manage-cdc-tasks.md b/preview/site/en/userGuide/tools/milvus-cdc/manage-cdc-tasks.md
new file mode 100644
index 000000000..bdec15b94
--- /dev/null
+++ b/preview/site/en/userGuide/tools/milvus-cdc/manage-cdc-tasks.md
@@ -0,0 +1,244 @@
+---
+id: manage-cdc-tasks.md
+order: 3
+summary: A Capture Data Change (CDC) task enables the synchronization of data from a source Milvus instance to a target Milvus instance.
+title: Manage CDC Tasks
+---
+
+# Manage CDC Tasks
+
+A Capture Data Change (CDC) task enables the synchronization of data from a source Milvus instance to a target Milvus instance. It monitors operation logs from the source and replicates data changes such as insertions, deletions, and index operations to the target in real-time. This facilitates real-time disaster recovery or active-active load balancing between Milvus deployments.
+
+This guide covers how to manage CDC tasks, including creation, pausing, resuming, retrieving details, listing, and deletion through HTTP requests.
+
+## Create a task
+
+Creating a CDC task allows data change operations in the source Milvus to be synced to the target Milvus.
+
+To create a CDC task:
+
+```bash
+curl -X POST http:_//localhost:8444/cdc \
+-H "Content-Type: application/json" \
+-d '{
+ "request_type": "create",
+ "request_data": {
+ "milvus_connect_param": {
+ "host": "localhost",
+ "port": 19530,
+ "username": "root",
+ "password": "Milvus",
+ "enable_tls": false,
+ "connect_timeout": 10
+ },
+ "collection_infos": [
+ {
+ "name": "*"
+ }
+ ],
+ "rpc_channel_info": {
+ "name": "by-dev-replicate-msg"
+ }
+ }
+}'
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+__Parameters__:
+
+- __milvus_connect_param__: Connection parameters of the target Milvus.
+
+ - __host__: Hostname or IP address of the Milvus server.
+
+ - __port__: Port number the Milvus server listens on.
+
+ - __username__: Username for authenticating with the Milvus server.
+
+ - __password__: Password for authenticating with the Milvus server.
+
+ - __enable_tls__: Whether to use TLS/SSL encryption for the connection.
+
+ - __connect_timeout__: Timeout period in seconds for establishing the connection.
+
+- __collection_infos__: Collections to synchronize. Currently, only an asterisk (__*__) is supported, as Milvus-CDC synchronizes at the cluster level, not individual collections.
+
+- __rpc_channel_info__: RPC channel name for synchronization, constructed by concatenating the values of __common.chanNamePrefix.cluster__ and __common.chanNamePrefix.replicateMsg__ from the source Milvus configuration, separated by a hyphen (__-__).
+
+Expected response:
+
+```json
+{
+ "code": 200,
+ "data": {
+ "task_id":"xxxx"
+ }
+}
+```
+
+## List tasks
+
+To list all created CDC tasks:
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{
+ "request_type": "list"
+}' http://localhost:8444/cdc
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+Expected response:
+
+```json
+{
+ "code": 200,
+ "data": {
+ "tasks": [
+ {
+ "task_id": "xxxxx",
+ "milvus_connect_param": {
+ "host": "localhost",
+ "port": 19530,
+ "connect_timeout": 10
+ },
+ "collection_infos": [
+ {
+ "name": "*"
+ }
+ ],
+ "state": "Running"
+ }
+ ]
+ }
+}
+```
+
+## Pause a task
+
+To pause a CDC task:
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{
+ "request_type":"pause",
+ "request_data": {
+ "task_id": "xxxx"
+ }
+}' http://localhost:8444/cdc
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+__Parameters__:
+
+- __task_id__: ID of the CDC task to pause.
+
+Expected response:
+
+```bash
+{
+ "code": 200,
+ "data": {}
+}
+```
+
+## Resume a task
+
+To resume a paused CDC task:
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{
+ "request_type":"resume",
+ "request_data": {
+ "task_id": "xxxx"
+ }
+}' http://localhost:8444/cdc
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+__Parameters__:
+
+- __task_id__: ID of the CDC task to resume.
+
+Expected response:
+
+```bash
+{
+ "code": 200,
+ "data": {}
+}
+```
+
+## Retrieve task details
+
+To retrieve the details of a specific CDC task:
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{
+ "request_type":"get",
+ "request_data": {
+ "task_id": "xxxx"
+ }
+}' http://localhost:8444/cdc
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+__Parameters__:
+
+- __task_id__: ID of the CDC task to query.
+
+Expected response:
+
+```bash
+{
+ "code": 200,
+ "data": {
+ "Task": {
+ "collection_infos": [
+ {
+ "name": "*"
+ }
+ ],
+ "milvus_connect_param": {
+ "connect_timeout": 10,
+ "enable_tls": true,
+ "host": "localhost",
+ "port": 19530
+ },
+ "state": "Running",
+ "task_id": "xxxx"
+ }
+ }
+}
+```
+
+## Delete a task
+
+To delete a CDC task:
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{
+ "request_type":"delete",
+ "request_data": {
+ "task_id": "30d1e325df604ebb99e14c2a335a1421"
+ }
+}' http://localhost:8444/cdc
+```
+
+Replace __localhost__ with the IP address of the target Milvus server.
+
+__Parameters__:
+
+- __task_id__: ID of the CDC task to delete.
+
+Expected response:
+
+```json
+{
+ "code": 200,
+ "data": {}
+}
+```
+
diff --git a/preview/site/en/userGuide/tools/milvus-cdc/milvus-cdc-overview.md b/preview/site/en/userGuide/tools/milvus-cdc/milvus-cdc-overview.md
new file mode 100644
index 000000000..3b2548125
--- /dev/null
+++ b/preview/site/en/userGuide/tools/milvus-cdc/milvus-cdc-overview.md
@@ -0,0 +1,69 @@
+---
+id: milvus-cdc-overview.md
+order: 1
+summary: Milvus-CDC is a user-friendly tool that can capture and synchronize incremental data in Milvus instances.
+title: CDC Overview
+---
+
+# Overview
+
+Milvus-CDC is a user-friendly tool that can capture and synchronize incremental data in Milvus instances. It ensures the reliability of business data by seamlessly transferring it between source and target instances, allowing for easy incremental backup and disaster recovery.
+
+## Key capabilities
+
+- __Sequential Data Synchronization__: Ensures data integrity and consistency by synchronizing data changes sequentially between Milvus instances.
+
+- __Incremental Data Replication__: Replicates incremental data, including insertions and deletions, from source Milvus to target Milvus, offering persistent storage.
+
+- __CDC Task Management__: Allows for the management of CDC tasks through OpenAPI requests, including creating, querying status, and deleting CDC tasks.
+
+Additionally, we are planning to expand our capabilities to include support for integration with stream processing systems in the future.
+
+## Architecture
+
+Milvus-CDC adopts an architecture with two main components - an HTTP server that manages tasks and metadata, and __corelib__ that synchronizes task execution with a reader that obtains data from the source Milvus instance and a writer that sends processed data to the target Milvus instance.
+
+![milvus-cdc-architecture](../../../../../assets/milvus-cdc-architecture.png)
+
+In the preceding diagram,
+
+- __HTTP server__: Handles user requests, executes tasks, and maintains metadata. It serves as the control plane for task orchestration within the Milvus-CDC system.
+
+- __Corelib__: Responsible for the actual synchronization of tasks. It includes a reader component that retrieves information from the source Milvus's etcd and message queue (MQ), and a writer component that translates messages from the MQ into API parameters for the Milvus system and sends these requests to the target Milvus to complete the synchronization process.
+
+## Workflow
+
+The Milvus-CDC data processing flow involves the following steps:
+
+1. __Task creation__: Users initiate a CDC task via HTTP requests.
+
+1. __Metadata retrieval__: The system fetches collection-specific metadata from the source Milvus's etcd, including channel and checkpoint information for the collection.
+
+1. __MQ connection__: With the metadata at hand, the system connects to the MQ to begin subscribing to the data stream.
+
+1. __Data processing__: Data from MQ is read, parsed, and either passed on using the Go SDK or processed to replicate operations performed in the source Milvus.
+
+![milvus-cdc-workflow](../../../../../assets/milvus-cdc-workflow.png)
+
+## Limits
+
+- __Incremental Data Synchronization__: As of now, Milvus-CDC is designed to synchronize only incremental data. If your business requires a full data backup, please [reach out to us](https://milvus.io/community) for assistance.
+
+- __Synchronization Scope__: Currently, Milvus-CDC can synchronize data at the cluster level. We are working on adding support for collection-level data synchronization in upcoming releases.
+
+- __Supported API Requests__: Milvus-CDC currently supports the following API requests. We plan to extend support to additional requests in future releases:
+
+ - Create/Drop Collection
+
+ - Insert/Delete/Upsert
+
+ - Create/Drop Partition
+
+ - Create/Drop Index
+
+ - Load/Release/Flush
+
+ - Load/Release Partition
+
+ - Create/Drop Database
+
diff --git a/preview/site/en/userGuide/tools/milvus_backup-api.md b/preview/site/en/userGuide/tools/milvus_backup_api.md
similarity index 97%
rename from preview/site/en/userGuide/tools/milvus_backup-api.md
rename to preview/site/en/userGuide/tools/milvus_backup_api.md
index 71861c36c..7d9715430 100644
--- a/preview/site/en/userGuide/tools/milvus_backup-api.md
+++ b/preview/site/en/userGuide/tools/milvus_backup_api.md
@@ -1,6 +1,7 @@
---
-id: milvus_backup-api.md
+id: milvus_backup_api.md
summary: Learn how to use Milvus Backup through API
+title: Back up and Restore Data Using APIs
---
# Back up and Restore Data Using APIs
@@ -79,6 +80,8 @@ This step is optional. If you skip this, ensure that you already have some data
## Back up data
+
+
Note that running Milvus Backup against a Milvus instance will not normally affect the running of the instance. Your Milvus instance is fully functional during backup or restore.
Run the following command to create a backup. Change `collection_names` and `backup_name` if necessary.
@@ -115,6 +118,8 @@ Now, you can save the backup files to a safe place for restoration in the future
## Restore data
+
+
You can call the restore API command with a `collection_suffix` option to create a new collection by restoring the data from the backup. Change `collection_names` and `backup_name` if necessary.
```shell
@@ -172,4 +177,3 @@ python example/verify_data.py
Note that the above script assumes that you have run the `restore` command with the `-s` flag and the suffix is set to `-recover`. Feel free to make necessary changes to the script to fit your need.
-
diff --git a/preview/site/en/userGuide/tools/milvus_backup-cli.md b/preview/site/en/userGuide/tools/milvus_backup_cli.md
similarity index 83%
rename from preview/site/en/userGuide/tools/milvus_backup-cli.md
rename to preview/site/en/userGuide/tools/milvus_backup_cli.md
index 3ee182d8b..14fc32e74 100644
--- a/preview/site/en/userGuide/tools/milvus_backup-cli.md
+++ b/preview/site/en/userGuide/tools/milvus_backup_cli.md
@@ -1,6 +1,7 @@
---
-id: milvus_backup-cli.md
+id: milvus_backup_cli.md
summary: Learn how to use Milvus Backup through CLI
+title: Back up and Restore Data Using Commands
---
# Back up and Restore Data Using Commands
@@ -45,7 +46,7 @@ The name of the default Minio bucket varies with the way you install Milvus. Whe
| field | Docker Compose | Helm / Milvus Operator |
| --------------- | -------------- | ---------------------- |
| `bucketName` | a-bucket | milvus-bucket |
-| `rootPath` | files | file |
+| `rootPath` | files | file |
@@ -65,7 +66,7 @@ This step is optional. If you skip this, ensure that you already have some data
Note that running Milvus Backup against a Milvus instance will not normally affect the running of the instance. Your Milvus instance is fully functional during backup or restore.
-
Use
-- [Create a Collection](create_collection.md) -- [Manage Data](insert_data.md) -- [Build an Index](build_index.md) -- [Search](search.md) -- [Query](query.md) +- [Manage Collections](manage-collections.md) +- [Insert, Upsert, and Delete](insert-update-delete.md) +- [Index Vector Fields](index-vector-fields.md) +- [Single-Vector Search](single-vector-search.md) +- [Get & Scalar Query](get-and-scalar-query.md)