All Products
Search
Document Center

Object Storage Service:OpenMetaQuery

Last Updated:Oct 09, 2024

Enables the metadata management feature and select the retrieval mode for a bucket. After you enable the metadata management feature and select the retrieval mode for a bucket, Object Storage Service (OSS) creates a metadata index library for the bucket and creates metadata indexes for all objects in the bucket. After the metadata index library is created, OSS continues to perform quasi-real-time scans on incremental objects in the bucket and creates metadata indexes for the incremental objects.

Usage notes

  • By default, an Alibaba Cloud account has the permissions to enable the metadata management feature. To enable the metadata management feature as a RAM user, make sure that the RAM user has the oss:OpenMetaQuery permission. For more information, see Attach a custom policy to a RAM user.

Request syntax

POST /?metaQuery&comp=add&mode=basic HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

Name

Type

Required

Example

Description

mode

string

yes

basic

Valid values of the retrieval modes:

  • basic (default value): scalar search

  • semantic: vector search

Response headers

All headers in the response to a DescribeRegions request are common response headers. For more information, see Common response headers.

Examples

Sample request

POST /?metaQuery&comp=add&mode=basic HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 26 Jul 2021 13:08:38 GMT
Authorization: OSS qn6q**************:77Dv**************** 

Sample response

HTTP/1.1 200 OK
x-oss-request-id: 5C1B138A109F4E405B2D****
Date: Mon, 26 Jul 2021 13:08:38 GMT
Content-Length: 0
Connection: keep-alive
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422299D
x-oss-server-time: 544