Updated on 2022-08-08 GMT+08:00

Customized Fields

Data Type

The String, Integer, Float, Double, Boolean, and Long types are supported.

  1. external_image_id, bounding_box, similarity, face_id, create_time, vector, _id, _all, and _source are built-in fields that cannot be customized.
  2. The number of customized fields cannot exceed 10. The key value contains 1 to 36 characters, including digits, letters, underscores (_), and hyphens (-).
  3. The value of the String type contains 1 to 256 characters, including digits, letters, underscores (_), and hyphens (-).
  4. Duplicate fields will be overwritten.
  5. You are not allowed to add a suffix to a value of the numeral type. For example, 1.0f, 100L, and 1.0d are incorrect.

Syntax Logic

external_fields is defined in JSON format and the name corresponds to the data type.

Request Body:
{
    "face_set_name": "test",
    "face_set_capacity": "100000",
    "external_fields": {
        "location": {
            "type": "long"
        },
        "timestamp": {
            "type": "integer"
        },
        "male": {
            "type": "boolean"
        },
        "title": {
            "type": "string"
        },
        "weight": {
            "type": "double"
        },
        "score": {
            "type": "float"
        }
    }
}