All Products
Search
Document Center

Object Storage Service:Appendix: Fields and operators supported in scalar search

Last Updated:Sep 29, 2024

This topic describes the fields and operators that are supported in scalar search.

Usage notes

  • The following operators are supported in simple query conditions: eq (equal to), gt (greater than), gte (greater than or equal to), lt (less than), lte (less than or equal to), match (fuzzy query), and prefix (prefix query). The following operators are supported in aggregation operations: min (minimum), max (maximum), average (average), sum (sum), count (count), distinct (distinct count), and group (group count).

  • When you use the OSSUserMeta.* field to query objects, replace the asterisk (*) with the key of the user metadata. The system queries objects based on the key-value of the user metadata. The key of a user metadata field is not case-sensitive. However, the value is case-sensitive.

    For example, if you want to query objects that contain the x-oss-meta-location=hangzhou user metadata field, set the query condition to {"Field": "OSSUserMeta.x-oss-meta-location", "Value": "hangzhou", "Operation": "eq"}.

  • When you use the OSSTagging.* field to query an object, replace the asterisk (*) with the key of an object tag. The system queries the object based on the key-value of the object tag. The keys and values of object tags are case-sensitive.

    For example, if you want to query objects that contain the owner=John tag, set the query condition to {"Field": "OSSTagging.owner", "Value": "John", "Operation": "eq"}.

Supported fields and operators

The following table describes the fields and operators that are supported in simple query conditions, aggregation operations, and sorting operations.

In the following table, the check mark (✓) indicates that the operators are supported for the corresponding fields, and the cross mark (×) indicates that the operators are not supported for the fields.

Field

Description

Operator in simple query conditions

Operator in aggregation operations

Sorting

eq, gt,

gte, lt, and lte

match

prefix

min, max,

sum, and average

count,

distinct, and group

ETag

The identifier of the object content.

×

×

FileModifiedTime

The time when the object was last modified.

×

×

×

Filename

The object name with the complete path to the object included.

×

ObjectACL

The access control list (ACL) of the object.

×

×

OSSCRC64

The CRC-64 value of the object.

×

×

OSSObjectType

The type of the object.

×

×

OSSStorageClass

The storage class of the object.

×

×

OSSTagging.*

The tags of the object.

×

×

×

×

OSSTaggingCount

The number of tags of the object.

×

×

ServerSideEncryption

The server-side encryption algorithm for the object.

×

×

Size

The size of the object.

×

×