tencent cloud

Cloud Infinite

Supported Scalar Filter Fields and Operators

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-09-08 16:24:29
Diterjemahkan oleh AI

Introduction

This document helps you understand the fields supported by scalar filtering and the support status of corresponding operators.

Logical Operation Expression

The supported logical operators include and, or, and not, as shown in the following table.
Operator
Description
Example
$and
And
{"$and":[{"field1":{"$in":["value1","value2"]}},{"field2":{"$gt":123}}]}
$or
or
{"$or":[{"field1":{"$in":["value1","value2"]}},{"field2":{"$gt":123}}]}
$not
Not
{"$not":{"field1":{"$eq":"value1"}}}

Character String Type Expression

Values of the string type must be enclosed in English double quotation marks. The string type can be matched with a single value or multiple values. The currently supported operators for the string type are shown in the following table.
Operator
Description
Example
$in
Match any character string value
{"field1":{"$in":["value1","value2"]}}
$nin
Exclude all character string values
{"field1":{"$nin":["value1","value2"]}}
$eq
Match a single character string value
{"field1":{"$eq":"value1"}}
$ne
Exclude a single character string value
{"field1":{"$ne":"value1"}}

Value Type Expression

The numeric type of scalar index fields supports uint64, int64, and double. The operators supported by the numeric type in a Filter expression are shown in the following table.
Operator
Description
Example
$gt
Greater than
{"field1":{"$gt":123}}
$gte
Greater than or equal to
{"field1":{"$gte":123}}
$eq
Equal to
{"field1":{"$eq":123}}
$lt
Less than
{"field1":{"$lt":123}}
$lte
Less than or equal to
{"field1":{"$lte":123}}
$ne
Not equal to
{"field1":{"$ne":123}}
$in
Matching any numeric value
{"field1":{"$in":[123,456]}}
$nin
Exclude all numeric values
{"field1":{"$nin":[123,456]}}

Supported Scalar Fields in Filters

Scalar data that every data object must have, specifically the fields supported by field1 and field2 mentioned above.
Field Name
Type
Description
ContentType
String
Object metadata type, such as JPEG, specified by the customer during upload.
MediaType
String
File media type. Enumerated values:
image: image
other: other
document: document
archive: archive
audio: audio
video: video
CustomId
String
Random Id provided by the customer to identify an object.
Size
Int
Object size
FileModifiedTime
Int
Last modified timestamp of the object
COSUserMeta
Json
COS custom headers. Stores the key names and key-value pairs of your business on COS objects, which can be used as filter criteria for search during queries. For example: COSUserMeta.xxx
COSTagging
Json
COS custom tags. Stores the key names and key-value pairs of your business custom tags on COS objects, which can be used as filter criteria for search during queries. For example: COSTagging.xxx
CustomLabels
Json
Custom tag list of the file. Stores the key names and key-value pairs defined by your business, which can be used as filter criteria for search during queries. For example: CustomLabels.xxx


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan