Image search

更新时间:
复制 MD 格式

The AnalyticDB for MySQL image search service supports search by image, search by text, and tag filtering for e-commerce, content recommendation, and security applications.

Important

The image search feature is in private preview. To use it, submit a ticket or contact technical support.

Key features

Multi-mode search engine

The image search service provides three working modes. Specify a mode when creating an image library. The mode cannot be changed after creation.

Mode

Use cases

Core capabilities

Item Search (item_search)

E-commerce product retrieval, fashion design

Automatically identifies and extracts item-level embeddings for precise item matching.

General Search (general_search)

Content recommendation, image library management

Generates full-image semantic embeddings. Supports both search by image and search by text.

Adaptive Search (adaptive_search)

Security surveillance, identity recognition

Uses dual-path extraction: optimizes facial features for face images and full-image semantics for non-face images.

Note: The service automatically converts images and text into embeddings during import and retrieval, then uses vector similarity for semantic matching. You do not need to call an embedding model.

Tag filtering

  • Custom tags: Attach key-value tags such as color, season, or category during import.

  • Compound filter syntax: Supports exact match, contains match, multi-value match, and logical combinations (AND/OR).

  • Filter during retrieval: Combine tag conditions with vector similarity search to refine results.

Multiple image libraries

Create multiple image libraries with isolated data for multi-tenant SaaS scenarios.

Feature overview

Feature

Description

Image library management

Create, query, and delete image libraries. Specify a working mode (Item Search, General Search, or Adaptive Search) at creation. The mode cannot be changed later.

Image import

Import images into a library. Supports single synchronous and batch asynchronous imports from OSS JSONL files. Custom tags can be included for filtering.

Image retrieval

Retrieve similar images from an image library.

  • Search by image: Find visually similar images in the library. Supports item-level precision matching and full-image semantic matching.

  • Search by text: Retrieve images by text description, such as "white short-sleeve t-shirt". Supports multilingual automatic translation.

  • Tag filtering: Apply compound filter conditions on custom tags with AND/OR logic.

API overview

All APIs use the prefix: /api/v1/operators/image-search

Image library management

API

Method

Path

Create image library

POST

/library/create

List image libraries

GET

/library/list

Delete image library

POST

/library/delete

Image import

API

Method

Path

Single import (synchronous)

POST

/image/add

Batch import (asynchronous)

POST

/image/tasks/create

Query batch import task status

GET

/image/tasks/results/{task_id}

Image retrieval

API

Method

Path

Search by image

POST

/search/by-image

Search by text

POST

/search/by-text

Common response structure

All APIs return a unified JSON structure:

{
  "status": "SUCCESS",
  "message": null,
  "data": { ... }
}

Field

Type

Description

status

string

Business status code. "SUCCESS" indicates success. Other values indicate error types.

message

string / null

Status description. null on success; error reason on failure.

data

object / null

Business data payload. null on failure. May also be null for some successful calls.

Standard HTTP status codes (200, 400, 403, 404, 409, 500) provide coarse-grained status. The status and message fields provide fine-grained error details.

Use cases

E-commerce product retrieval

Build a "find similar by photo" feature. When a user uploads a product photo, the system identifies the main object (such as a dress or shoes), retrieves visually similar items, and supports filtering by tags like color and size.

Content recommendation

On a content platform, extract semantic features from viewed images to retrieve similar content and rank results by user profile.

Image asset management

Batch import historical images with categorical tags. Find assets through text descriptions or example images.

Limitations

Item

Description

Working mode

The working mode cannot be changed after creation. To switch modes, delete the library and create a new one.

Number of image libraries

A single AnalyticDB for MySQL instance supports up to 5 image libraries. To request an increase, contact technical support.

Search by text

Only available for image libraries in general_search (General Search) mode.