Skip to content

Commit

Permalink
Release new docs to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Milvus-doc-bot authored and Milvus-doc-bot committed Dec 3, 2024
1 parent a66bddb commit c225601
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions v2.5.x/site/en/reference/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ To reduce the complexity in data inserts, Milvus allows you to specify a default
Create a regular field schema:

```python
from pymilvus import FieldSchema
from pymilvus import DataType, FieldSchema
id_field = FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, description="primary id")
age_field = FieldSchema(name="age", dtype=DataType.INT64, description="age")
embedding_field = FieldSchema(name="embedding", dtype=DataType.FLOAT_VECTOR, dim=128, description="vector")
Expand All @@ -89,7 +89,7 @@ position_field = FieldSchema(name="position", dtype=DataType.VARCHAR, max_length
Create a field schema with default field values:

```python
from pymilvus import FieldSchema
from pymilvus import DataType, FieldSchema

fields = [
FieldSchema(name="id", dtype=DataType.INT64, is_primary=True),
Expand Down Expand Up @@ -174,7 +174,7 @@ A collection schema is the logical definition of a collection. Usually you need
</div>

```python
from pymilvus import FieldSchema, CollectionSchema
from pymilvus import DataType, FieldSchema, CollectionSchema
id_field = FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, description="primary id")
age_field = FieldSchema(name="age", dtype=DataType.INT64, description="age")
embedding_field = FieldSchema(name="embedding", dtype=DataType.FLOAT_VECTOR, dim=128, description="vector")
Expand All @@ -189,7 +189,7 @@ schema = CollectionSchema(fields=[id_field, age_field, embedding_field], auto_id
Create a collection with the schema specified:

```python
from pymilvus import Collection,connections
from pymilvus import Collection, connections
conn = connections.connect(host="127.0.0.1", port=19530)
collection_name1 = "tutorial_1"
collection1 = Collection(name=collection_name1, schema=schema, using='default', shards_num=2)
Expand All @@ -207,6 +207,7 @@ collection1 = Collection(name=collection_name1, schema=schema, using='default',
You can also create a collection with <code>Collection.construct_from_dataframe</code>, which automatically generates a collection schema from DataFrame and creates a collection.

```python
from pymilvus import Collection
import pandas as pd
df = pd.DataFrame({
"id": [i for i in range(nb)],
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "v2.4.x",
"version": "v2.5.x",
"released": "yes"
}

0 comments on commit c225601

Please sign in to comment.