人脸识别服务 FRS-filter语法:数值类型

时间:2024-08-09 14:28:00

数值类型

  1. 数值类型的范围查询,[]包含两端点值,{}不包含两端点值。
        rowkey:[1 TO *] 大于等于1  
        rowkey:[* TO 1] 小于等于1
        rowkey:[1 TO 10] 1到10

    Request Body示例:

    {
      "image_base64":"/9j/4AAQSkZJRgABAQAAAQABAAD...",
      "filter" : "number:[1 TO *]"
    }

  2. 单值。
        rowkey:1 值为1

    Request Body示例:

    {
      "image_base64":"/9j/4AAQSkZJRgABAQAAAQABAAD...",
      "filter" : "number:10"
    }

  3. 多条件,使用()区分优先级。
        rowkey:[1 TO *] && externalImageID:1
        (rowkey:[1 TO *] && externalImageID:1) || timestamp:1000 
        rowkey:[1 TO *] && (externalImageID:1 || timestamp:1000)

    Request Body示例:

    {
      "image_base64":"/9j/4AAQSkZJRgABAQAAAQABAAD...",
      "filter" : "number:[1 TO 20] && external_image_id:test"
    }

  4. 非,需要在非语句前后加括号。
        externalImageID:1 && (!rowkey:2)

    Request Body示例:

    {
      "image_base64":"/9j/4AAQSkZJRgABAQAAAQABAAD...",
      "filter" : "external_image_id:test && (!number:10)"
    }

support.huaweicloud.com/api-face/face_02_0014.html