Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pymilvus/client/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Any, Dict, Iterable, List, Mapping, Optional, Union

import numpy as np
import ujson

from pymilvus.exceptions import DataNotMatchException, ExceptionsMessage, ParamError
from pymilvus.grpc_gen import common_pb2 as common_types
Expand Down Expand Up @@ -134,7 +135,7 @@ def get_schema_from_collection_schema(
)
for k, v in f.params.items():
kv_pair = common_types.KeyValuePair(
key=str(k) if k != "mmap_enabled" else "mmap.enabled", value=str(v)
key=str(k) if k != "mmap_enabled" else "mmap.enabled", value=ujson.dumps(v)
)
field_schema.type_params.append(kv_pair)

Expand Down
2 changes: 1 addition & 1 deletion pymilvus/orm/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.

COMMON_TYPE_PARAMS = ("dim", "max_length", "max_capacity")
COMMON_TYPE_PARAMS = ("dim", "max_length", "max_capacity", "enable_match", "analyzer_params")

CALC_DIST_IDS = "ids"
CALC_DIST_FLOAT_VEC = "float_vectors"
Expand Down
2 changes: 1 addition & 1 deletion pymilvus/orm/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def _parse_type_params(self):
if k in self._kwargs:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment in line 357

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

if self._type_params is None:
self._type_params = {}
self._type_params[k] = int(self._kwargs[k])
self._type_params[k] = self._kwargs[k]
Copy link
Contributor

@czs007 czs007 Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need modify is_legal_dimision to cover string format.


@classmethod
def construct_from_dict(cls, raw: Dict):
Expand Down