本文介绍OSS向量检索模式支持检索的字段和操作符。
支持检索的字段
使用
OSSUserMeta.*
字段搜索文件时,请替换星号(*)为用户自定义元数据的Key,系统会按照用户自定义元数据的Key-Value来搜索文件。用户自定义元数据的Key不区分大小写,Value区分大小写。例如要搜索包含
x-oss-meta-location=hangzhou
用户自定义元数据的文件,您需要设置查询条件为{"Field": "OSSUserMeta.x-oss-meta-location", "Value": "hangzhou", "Operation": "eq"}
。使用
OSSTagging.*
字段搜索文件时,请替换星号(*)为对象标签的Key,系统会按照对象标签的Key-Value来搜索文件。对象标签的Key和Value均区分大小写。例如要搜索包含
owner=John
标签的文件,您需要设置查询条件为{"Field": "OSSTagging.owner", "Value": "John", "Operation": "eq"}
。
分类 | Field(字段) | 字段说明 | 是否允许检索该字段 | 检索结果可能包含的字段 | ||
语义内容检索(不区分文件数量) | 元数据检索(文件数量<1亿) | 元数据检索(1亿<文件数量<100亿) | ||||
基本信息 | URI | 对象路径 | ✓ | ✓ | ✓ | ✓ |
FileModifiedTime | 文件修改时间* | ✓ | ✓ | ✓ | ✓ | |
Filename | 文件名* | ✓ | ✓ | ✓ | ✓ | |
Size | 文件大小* | ✓ | ✓ | ✓ | ✓ | |
MediaType | 媒体类型* | ✓ | ✓ | × | × | |
ContentType | MIME类型* | ✓ | ✓ | × | × | |
ProduceTime | 创作时间 | ✓ | ✓ | × | × | |
LatLong | 经纬度 | ✓ | ✓ | × | × | |
Title | 标题 | ✓ | ✓ | × | × | |
OSS对象信息 | ObjectACL | 对象读写权限 | ✓ | ✓ | ✓ | ✓ |
ETag | ETag | ✓ | ✓ | ✓ | ✓ | |
OSSCRC64 | CRC64 | ✓ | ✓ | ✓ | ✓ | |
OSSObjectType | 对象类型 | ✓ | ✓ | ✓ | ✓ | |
OSSStorageClass | 存储类型 | ✓ | ✓ | ✓ | ✓ | |
OSSTagging.* | 对象标签 | ✓ | ✓ | ✓ | ✓ | |
OSSTaggingCount | 标签数量 | ✓ | ✓ | ✓ | ✓ | |
OSSUserMeta.* | 自定义信息 | ✓ | ✓ | ✓ | × | |
OSSExpiration | 过期时间 | ✓ | ✓ | ✓ | × | |
AccessControlAllowOrigin | 允许的跨域请求来源 | ✓ | ✓ | ✓ | × | |
AccessControlRequestMethod | 允许的跨域请求方法 | ✓ | ✓ | ✓ | × | |
ServerSideDataEncryption | Object的加密算法 | ✓ | ✓ | ✓ | × | |
ServerSideEncryption | Object的加密方式 | ✓ | ✓ | ✓ | × | |
ServerSideEncryptionCustomerAlgorithm | 客户自定义服务端加密算法 | ✓ | ✓ | ✓ | × | |
ServerSideEncryptionKeyId | 服务端加密密钥 | ✓ | ✓ | ✓ | × | |
CacheControl | HTTP可缓存性 | ✓ | ✓ | ✓ | × | |
ContentDisposition | HTTP响应处理方式 | ✓ | ✓ | ✓ | × | |
ContentEncoding | HTTP响应编码方式 | ✓ | ✓ | ✓ | × | |
ContentLanguage | HTTP响应语言 | ✓ | ✓ | ✓ | × | |
图片信息 | ImageHeight | 图片高度 | ✓ | ✓ | × | × |
ImageWidth | 图片宽度 | ✓ | ✓ | × | × | |
视频信息 | VideoHeight | 视频高度 | ✓ | ✓ | × | × |
VideoWidth | 视频宽度 | ✓ | ✓ | × | × | |
VideoStreams.CodecName | 编码器名称 | ✓ | ✓ | × | × | |
VideoStreams.Language | 语言 | ✓ | ✓ | × | × | |
VideoStreams.Bitrate | 码率 | × | ✓ | × | × | |
VideoStreams.FrameRate | 帧率 | × | ✓ | × | × | |
VideoStreams.StartTime | 起始时间 | × | ✓ | × | × | |
VideoStreams.Duration | 时长 | × | ✓ | × | × | |
VideoStreams.FrameCount | 帧数 | × | ✓ | × | × | |
VideoStreams.BitDepth | 像素位宽 | × | ✓ | × | × | |
VideoStreams.PixelFormat | 像素格式 | × | ✓ | × | × | |
VideoStreams.ColorSpace | 色彩空间 | × | ✓ | × | × | |
VideoStreams.Height | 视频分辨率高度 | × | ✓ | × | × | |
VideoStreams.Width | 视频分辨率宽度 | × | ✓ | × | × | |
音频信息 | AudioStreams.CodecName | 编码器名称 | ✓ | ✓ | × | × |
AudioStreams.Bitrate | 码率 | × | ✓ | × | × | |
AudioStreams.SampleRate | 采样率 | × | ✓ | × | × | |
AudioStreams.StartTime | 起始时间 | × | ✓ | × | × | |
AudioStreams.Duration | 时长 | × | ✓ | × | × | |
AudioStreams.Channels | 声道数 | × | ✓ | × | × | |
AudioStreams.Language | 语言 | ✓ | ✓ | × | × | |
字幕信息 | Subtitles.CodecName | 编码器名称 | ✓ | ✓ | × | × |
Subtitles.Language | 字幕语言 | ✓ | ✓ | × | × | |
Subtitles.StartTime | 起始时间 | × | ✓ | × | × | |
Subtitles.Duration | 时长 | × | ✓ | × | × | |
媒体信息 | Bitrate | 码率 | ✓ | ✓ | × | × |
Artist | 艺术家 | ✓ | ✓ | × | × | |
AlbumArtist | 专辑艺术家 | ✓ | ✓ | × | × | |
Composer | 作曲家 | ✓ | ✓ | × | × | |
Performer | 演奏家 | ✓ | ✓ | × | × | |
Album | 专辑 | ✓ | ✓ | × | × | |
Duration | 媒体时长 | ✓ | ✓ | × | × | |
地理信息 | Addresses.AddressLine | 详细地址 | ✓ | ✓ | × | × |
Addresses.City | 城市 | ✓ | ✓ | × | × | |
Addresses.Country | 国家 | ✓ | ✓ | × | × | |
Addresses.District | 行政区域 | ✓ | ✓ | × | × | |
Addresses.Language | 地址语言 | ✓ | ✓ | × | × | |
Addresses.Province | 省份 | ✓ | ✓ | × | × | |
Addresses.Township | 乡镇 | ✓ | ✓ | × | × |
字段支持的操作符
字段支持的查询操作符包含eq(等于)、gt(大于)、gte(大于等于)、lt(小于)、lte(小于等于)、match-phrase(字符串匹配查询)和prefix(前缀查询),nested(字段为数组时,其中同一对象内逻辑条件查询。)、exist(存在性查询)。
字段支持的聚合操作符包含min(最小值)、max(最大值)、average(平均数)、sum(求和)、count(计数)、distinct(去重统计)和group(分组计数)。
分类 | Field(字段) | 字段说明 | 查询操作符 | 聚合操作符 | 排序(Sort) | |||||||
eq、gt、 gte、lt、lte | match-phrase | prefix | nested | exist | min、max、 sum、average | count | distinct | group | ||||
基本信息 | URI | 对象路径 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ |
FileModifiedTime | 文件修改时间* | ✓ | × | × | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Filename | 文件名* | ✓ | ✓ | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Size | 文件大小* | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ | |
MediaType | 媒体类型* | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ContentType | MIME类型* | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ProduceTime | 创作时间 | ✓ | × | × | × | × | × | ✓ | ✓ | ✓ | ✓ | |
LatLong | 经纬度 | ✓ | × | × | × | × | × | ✓ | ✓ | × | × | |
Title | 标题 | ✓ | ✓ | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
OSS对象信息 | ObjectACL | 对象读写权限 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ |
ETag | ETag | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
OSSCRC64 | CRC64 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
OSSObjectType | 对象类型 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
OSSStorageClass | 存储类型 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
OSSTagging.* | 对象标签 | ✓ | × | ✓ | × | ✓ | × | × | × | × | × | |
OSSTaggingCount | 标签数量 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ | |
OSSUserMeta.* | 自定义信息 | ✓ | × | ✓ | × | ✓ | × | × | × | × | × | |
OSSExpiration | 过期时间 | ✓ | × | × | × | × | × | ✓ | ✓ | ✓ | ✓ | |
AccessControlAllowOrigin | 允许的跨域请求来源 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
AccessControlRequestMethod | 允许的跨域请求方法 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ServerSideDataEncryption | 服务端数据加密 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ServerSideEncryption | 服务端加密 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ServerSideEncryptionCustomerAlgorithm | 客户自定义服务端加密算法 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ServerSideEncryptionKeyId | 服务端加密密钥 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
CacheControl | HTTP可缓存性 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ContentDisposition | HTTP响应处理方式 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ContentEncoding | HTTP响应编码方式 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
ContentLanguage | HTTP响应语言 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
图片信息 | ImageHeight | 图片高度 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ |
ImageWidth | 图片宽度 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ | |
视频信息 | VideoHeight | 视频高度 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ |
VideoWidth | 视频宽度 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ | |
VideoStreams.CodecName | 编码器名称 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
VideoStreams.Language | 语言 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
VideoStreams.Bitrate | 码率 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.FrameRate | 帧率 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.StartTime | 起始时间 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.Duration | 时长 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.FrameCount | 帧数 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.BitDepth | 像素位宽 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.PixelFormat | 像素格式 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.ColorSpace | 色彩空间 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.Height | 视频分辨率高度 | × | × | × | × | × | × | × | × | × | × | |
VideoStreams.Width | 视频分辨率宽度 | × | × | × | × | × | × | × | × | × | × | |
音频信息 | AudioStreams.CodecName | 编码器名称 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | ||
AudioStreams.Bitrate | 码率 | × | × | × | × | × | × | × | × | × | × | |
AudioStreams.SampleRate | 采样率 | × | × | × | × | × | × | × | × | × | × | |
AudioStreams.StartTime | 起始时间 | × | × | × | × | × | × | × | × | × | × | |
AudioStreams.Duration | 时长 | × | × | × | × | × | × | × | × | × | × | |
AudioStreams.Channels | 声道数 | × | × | × | × | × | × | × | × | × | × | |
AudioStreams.Language | 语言 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
字幕信息 | Subtitles.CodecName | 编码器名称 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × |
Subtitles.Language | 字幕语言 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Subtitles.StartTime | 起始时间 | × | × | × | × | × | × | × | × | × | × | |
Subtitles.Duration | 时长 | × | × | × | × | × | × | × | × | × | × | |
媒体信息 | Bitrate | 码率 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ |
Artist | 艺术家 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
AlbumArtist | 专辑艺术家 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Composer | 作曲家 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Performer | 演奏家 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Album | 专辑 | ✓ | × | ✓ | × | × | × | ✓ | ✓ | ✓ | ✓ | |
Duration | 媒体时长 | ✓ | × | × | × | × | ✓ | ✓ | ✓ | ✓ | ✓ | |
地理信息 | Addresses.AddressLine | 详细地址 | × | ✓ | × | ✓ | ✓ | × | × | × | × | × |
Addresses.City | 城市 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Addresses.Country | 国家 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Addresses.District | 行政区域 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Addresses.Language | 地址语言 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Addresses.Province | 省份 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × | |
Addresses.Township | 乡镇 | ✓ | × | ✓ | ✓ | ✓ | × | × | × | × | × |