Class ParamUtils

java.lang.Object
io.milvus.param.ParamUtils

public class ParamUtils extends Object
Utility functions for param classes
  • Constructor Details

    • ParamUtils

      public ParamUtils()
  • Method Details

    • checkFieldData

      public static void checkFieldData(FieldType fieldSchema, InsertParam.Field fieldData)
    • checkFieldData

      public static void checkFieldData(FieldType fieldSchema, List<?> values, boolean verifyElementType)
    • checkFieldValue

      public static Object checkFieldValue(FieldType fieldSchema, com.google.gson.JsonElement value)
    • convertJsonArray

      public static List<Object> convertJsonArray(com.google.gson.JsonArray jsonArray, DataType elementType, String fieldName)
    • CheckNullEmptyString

      public static void CheckNullEmptyString(String target, String name) throws ParamException
      Checks if a string is empty or null. Throws ParamException if the string is empty of null.
      Parameters:
      target - target string
      name - a name to describe this string
      Throws:
      ParamException
    • CheckNullString

      public static void CheckNullString(String target, String name) throws ParamException
      Checks if a string is null. Throws ParamException if the string is null.
      Parameters:
      target - target string
      name - a name to describe this string
      Throws:
      ParamException
    • convertPlaceholder

      public static com.google.protobuf.ByteString convertPlaceholder(List<?> vectors, PlaceholderType placeType) throws ParamException
      Throws:
      ParamException
    • convertSearchParam

      public static SearchRequest convertSearchParam(@NonNull @NonNull SearchParam requestParam) throws ParamException
      Throws:
      ParamException
    • convertQueryParam

      public static QueryRequest convertQueryParam(@NonNull @NonNull QueryParam requestParam)
    • isVectorDataType

      public static boolean isVectorDataType(DataType dataType)
    • genFieldData

      public static FieldData genFieldData(FieldType fieldType, List<?> objects)
    • genFieldData

      public static FieldData genFieldData(FieldType fieldType, List<?> objects, boolean isDynamic)
    • ConvertField

      public static FieldType ConvertField(@NonNull @NonNull FieldSchema field)
      Convert a grpc field schema to client field schema
      Parameters:
      field - FieldSchema object
      Returns:
      FieldType schema of the field
    • ConvertField

      public static FieldSchema ConvertField(@NonNull @NonNull FieldType field)
      Convert a client field schema to grpc field schema
      Parameters:
      field - FieldType object
      Returns:
      FieldSchema schema of the field
    • AssembleKvPair

      public static List<KeyValuePair> AssembleKvPair(Map<String,String> sourceMap)