Skip to content

Commit 626c573

Browse files
authored
feat: add STRUCT level mmap config [2.6] (#3037)
master: #3036 issue: milvus-io/milvus#42148 Signed-off-by: SpadeA <[email protected]>
1 parent ba0a92c commit 626c573

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pymilvus/orm/schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ def add_field(self, field_name: str, datatype: DataType, **kwargs):
408408
raise ParamError(message="Param max_capacity is required when datatype is STRUCT")
409409
struct_schema.max_capacity = kwargs["max_capacity"]
410410

411+
if "mmap_enabled" in kwargs:
412+
for field in struct_schema.fields:
413+
field._type_params["mmap_enabled"] = kwargs["mmap_enabled"]
414+
411415
self._struct_fields.append(struct_schema)
412416
return self
413417

0 commit comments

Comments
 (0)