Use data indexing for multi-modal search

更新时间:
复制 MD 格式

OSS data indexing lets you perform semantic searches across multi-modal data, including images, videos, audio files, and documents.

Use case

A media company, Company B, stores a large volume of multimedia assets in a bucket named mybucket in the China (Guangzhou) region. Because the object names lack meaningful information, asset retrieval is inefficient, slowing down advertising and content creation workflows.

With OSS data indexing, Company B achieves the following goals:

image

  • Multi-modal search: Enter keywords such as "summer beach" and apply filters (for example, image size greater than 500 KB, width greater than 100 px, and height greater than 100 px) to quickly find relevant images, videos, and audio files.

  • Easy to use: Call the OSS API to run searches, making it straightforward to build an enterprise AI assistant.

  • Real-time updates: Search results refresh in near real-time as new files are uploaded, keeping results current.

Step 1: Enable data indexing

  1. Log in to the OSS console.

  2. Click Buckets, and then click the name of the target bucket.

  3. In the navigation pane on the left, choose Object Management > Data Indexing.

  4. On the Data Indexing page, if you are using the feature for the first time, follow the prompts to authorize AliyunMetaQueryDefaultRole. This lets OSS manage the data in your bucket. After authorizing the role, click Enable data indexing.

  5. Select AISearch, and then click Enable.

Step 2: Initiate a query request

Configure search conditions based on Company B's requirements.

  1. In the navigation pane on the left, choose Object Management > Data Indexing.

  2. In the Search Content field, enter summer beach.

  3. Set Object Size to greater than 500 KB.

  4. Set Multimedia Type to Image.

    • Set Format to JPG/JPEG.

    • Set Image Width to greater than 100 px.

    • Set Image Height to greater than 100 px.

  5. Click Query Now.

Step 3: Verify the results

The query returns four objects: VCG41N1498525200.jpg (576.77 KB), VCG41N827059086.jpg (1.04 MB), vcg_VCG219357bf056_RF.jpg (684.17 KB), and vcg_VCG41N686948000_RF.jpg (743.53 KB). For all these objects, the upload type is Normal, the storage class is Standard, the access permissions are Inherit from Bucket, and the last modified time is 2024-12-23 22:50.

Learn more

  • To call the REST API directly for advanced customization, you need to calculate the signature in your code. For more information, see V4 signature and DoMetaQuery API.