Skip to content

Commit be4ecf2

Browse files
Milvus-doc-botMilvus-doc-bot
authored andcommitted
Release new docs to master
1 parent 84b29a4 commit be4ecf2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

v2.5.x/site/en/userGuide/collections/modify-collection.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ curl --request POST \​
122122

123123
## Set Collection TTL​
124124

125-
If a collection needs to be dropped for a specific period, consider setting its Time-To-Live (TTL) in seconds. Once the TTL times out, Milvus deletes entities in the collection and drops the collection. The deletion is asynchronous, indicating that searches and queries are still possible before the deletion is complete.​
125+
If a collection needs to be dropped for a specific period, consider setting its Time-To-Live (TTL) in seconds. Once the TTL times out, Milvus deletes entities in the collection. The deletion is asynchronous, indicating that searches and queries are still possible before the deletion is complete.​
126126

127127
The following code snippet demonstrates how to change the TTL of a collection.​
128128

@@ -135,8 +135,12 @@ The following code snippet demonstrates how to change the TTL of a collection.
135135
</div>
136136

137137
```python
138-
# Currently not available for Python
138+
from pymilvus import MilvusClient
139139

140+
client.alter_collection_properties(
141+
collection_name="collection_name",
142+
properties = {"collection.ttl.seconds": 500}
143+
)
140144
```
141145

142146
```java

0 commit comments

Comments
 (0)