You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
General search
Lance General Search
Copy page
Download PDF
Lance General Search

The Lance general search operator provides unified and efficient search capabilities for Lance and LanceDB format data stored in Volcano Engine Object Storage (TOS). It supports vector search, full-text search, hybrid search, and scalar queries, making it suitable for large-scale structured and unstructured data retrieval scenarios.

Operator introduction

Key features

  • Multi-mode search support: Supports four search modes—vector search (vector), full-text search (fts), hybrid search (hybrid), and scalar query (scalar)

    Search modes

    Details

    Vector search

    Supports similarity search based on vector columns and supports distance calculation methods such as cosine.

    Full-text search

    Supports full-text search on text columns with established full-text indexes.

    Hybrid search

    Performs vector search and full-text search simultaneously, and supports merging results using the RRF re-ranking algorithm.

    Scalar query

    Supports SQL SELECT queries for pure data filtering and extraction.

  • Multimodal input: Vector search supports three input types—vector arrays, text strings, and Base64-encoded images

  • Data filtering: Supports SQL WHERE clauses for pre-filter or post-filter data filtering

  • Result re-ranking: Hybrid search mode supports the RRF (Reciprocal Rank Fusion) re-ranking algorithm

  • Column selection: Supports specifying returned columns to reduce data transfer

Supported regions

  • Beijing: cn-beijing
  • Shanghai: cn-shanghai
  • Guangzhou: cn-guangzhou

Billing description
  • 计费标准

    细分项
    计费标准说明

    计费项

    • 与调用算子时选择的检索方式有关:
      • 当选择向量检索、混合检索时,会触发使用 doubao-embedding-vision 向量模型,产生费用。
      • 非向量检索、混合检索时,则调用算子不会产生算子服务的费用。

    单价

    与使用 doubao-embedding-vision 模型时的输入类型有关,详情请参见模型计费详情:方舟模型中关于 doubao-embedding-vision 模型的单价说明。

Performance
Detailed item
Performance impact description

Maximum concurrency

5

Rest API invocation

Use this operator to perform vector search, full-text search, hybrid search, or scalar queries on Lance/LanceDB data.

Prerequisites

Before using this operator for Lance data search, you need to first upload data in Lance format to TOS, or create a Lance-format dataset in LAS and use the dataset as the operator's input data. For instructions on creating a LAS dataset, see Dataset management.

Request parameters

const properties = ({
  "columns": [
{ "title": "Parameter", "dataIndex": "column_0", "key": "column_0", "width": 300 },
{ "title": "Type", "dataIndex": "column_1", "key": "column_1", "width": 150 },
{ "title": "Required", "dataIndex": "column_2", "key": "column_2", "width": 80 },
{ "title": "Example value", "dataIndex": "column_3", "key": "column_3", "width": 150 },
{ "title": "Description", "dataIndex": "column_4", "key": "column_4" }
  ],
  "data": [
    {
      "key": "1",
      "column_0": "operator_id",
      "column_1": "string",
"column_2": "Yes",
      "column_3": "las_lance_search",
"column_4": "The operator's id is las_lance_search"
    },
    {
      "key": "2",
      "column_0": "operator_version",
      "column_1": "string",
"column_2": "Yes",
      "column_3": "v1",
"column_4": "Currently only v1 is supported."
    },
    {
      "key": "3",
      "column_0": "data",
      "column_1": "LanceSearchReqParams",
"column_2": "Yes",
      "column_3": "",
"column_4": "Operator parameters",
      "children": [
        {
          "key": "3-1",
          "column_0": "dataset",
          "column_1": "dataset",
"column_2": "Yes",
          "column_3": "",
"column_4": "Dataset location information object",
          "children": [
            {
              "key": "3-1-1",
              "column_0": "tos_uri",
              "column_1": "string",
"column_2": "Optional",
              "column_3": "tos://your-bucket/path/to/your-dataset.lance",
"column_4": < div> Dataset TOS URI. At least one of < code> dataset_name</ code> must be provided; when passing in, it must start with < code> tos://</ code> and end with < code>.lance</ code>; if both are provided, < code> tos_uri</ code> div> will be used with priority.
            },
            {
              "key": "3-1-2",
              "column_0": "dataset_name",
              "column_1": "string",
"column_2": "Optional",
              "column_3": "your_table_name",
"column_4": < div> Dataset name. < code> tos_uri</ code> is required if not provided; the service will query the dataset by name and current account and use its Lance data path</ div>
            }
          ]
        },
        {
          "key": "3-2",
          "column_0": "query",
          "column_1": "query",
"column_2": "Yes",
          "column_3": "",
"column_4": "Search condition object",
          "children": [
            {
              "key": "3-2-1",
              "column_0": "mode",
              "column_1": "string",
"column_2": "Yes",
              "column_3": "hybrid",
"column_4": "Search mode. Supported: vector (vector search), fts (full-text search), hybrid (hybrid search), scalar (scalar query)"
            },
            {
              "key": "3-2-2",
              "column_0": "filter",
              "column_1": "filter",
"column_2": "Optional",
              "column_3": "{\"where\": \"category = 'pets'\"}",
"column_4": "Filter configuration",
              "children": [
                {
                  "key": "3-2-2-1",
                  "column_0": "where",
                  "column_1": "string",
"column_2": "Optional",
                  "column_3": "\"label > 2\"",
"column_4": "SQL WHERE filter condition"
                },
                {
                  "key": "3-2-2-2",
                  "column_0": "prefilter",
                  "column_1": "boolean",
"column_2": "Optional",
                  "column_3": "",
"column_4": "Whether to apply the filter condition before search; this field will be passed downstream"
                }
              ]
            },
            {
              "key": "3-2-3",
              "column_0": "select",
              "column_1": "list of string",
"column_2": "Optional",
              "column_3": "[\"image_path\", \"description\"]",
"column_4": "String array used to specify the column names to return; if not provided, all columns will be returned"
            },
            {
              "key": "3-2-4",
              "column_0": "limit",
              "column_1": "integer",
"column_2": "Optional",
              "column_3": "10",
"column_4": "Number of results to return, integer range 1 to 500, default is 10"
            },
            {
              "key": "3-2-5",
              "column_0": "params",
              "column_1": "params",
"column_2": "Yes",
              "column_3": "{\"hybrid\": {...}}",
"column_4": < div> Search parameter container object; only fill in the sub-object corresponding to < code> query.mode</ code>; see the params table below for each sub-object's fields</ div>,
              "children": [
                {
                  "key": "3-2-5-1",
                  "column_0": "vector",
                  "column_1": "vector_params",
"column_2": "Optional",
                  "column_3": "",
"column_4": < div>< code> query.mode = "vector"</ code> is required; vector search parameter object</ div>,
                  "children": [
                    {
                      "key": "3-2-5-1-1",
                      "column_0": "vector_column_name",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "vector",
"column_4": "Vector column name for vector search"
                    },
                    {
                      "key": "3-2-5-1-2",
                      "column_0": "content",
                      "column_1": "string/list of float",
"column_2": "Required",
                      "column_3": "\"white cat\"",
"column_4": < div> Query input. For text search, pass the text string directly and do not pass < code> type</ code>; for image search, pass the Base64 string and set < code> type=base64</ code>; for raw vector search, pass the floating-point vector array directly and do not pass < code> type</ code> div>
                    },
                    {
                      "key": "3-2-5-1-3",
                      "column_0": "type",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "base64",
"column_4": < div> Input type field. Only pass < code> base64</ code> for Base64 image input; do not pass this field for text string and floating-point vector array input</ div>
                    },
                    {
                      "key": "3-2-5-1-4",
                      "column_0": "embedding_model",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "doubao-embedding-vision-250615",
"column_4": < div> Embedding model name. Required when < code> content</ code> is a text string or a < code> type=base64</ code> Base64 image; not required when directly passing a floating-point vector array. Supported models include: doubao-embedding-vision-250615 (multimodal visual embedding), doubao-embedding-large-text-240915 (large-scale text embedding), doubao-embedding-text-240715 (text embedding), and more</ div>
                    },
                    {
                      "key": "3-2-5-1-5",
                      "column_0": "distance_type",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "cosine",
"column_4": "Vector distance calculation method, for example, cosine"
                    },
                    {
                      "key": "3-2-5-1-6",
                      "column_0": "nprobes",
                      "column_1": "integer",
"column_2": "Optional",
                      "column_3": "",
"column_4": "Number of cluster centers probed during query, used to balance recall and performance"
                    },
                    {
                      "key": "3-2-5-1-7",
                      "column_0": "refine_factor",
                      "column_1": "integer",
"column_2": "Optional",
                      "column_3": "",
"column_4": "Result refinement factor, used to improve reranking quality"
                    },
                    {
                      "key": "3-2-5-1-8",
                      "column_0": "distance_range",
                      "column_1": "object",
"column_2": "Optional",
                      "column_3": "{\"lower_bound\": 0, \"upper_bound\": 1}",
"column_4": < div> Distance filter range object, can include < code> lower_bound code> and < code> upper_bound code> div>
                    }
                  ]
                },
                {
                  "key": "3-2-5-2",
                  "column_0": "fts",
                  "column_1": "fts_params",
"column_2": "Optional",
                  "column_3": "",
"column_4": < div>< code> query.mode = "fts"</ code> is required, full-text search parameter object div>,
                  "children": [
                    {
                      "key": "3-2-5-2-1",
                      "column_0": "fts_column_name",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "description",
"column_4": "Text column name for full-text search"
                    },
                    {
                      "key": "3-2-5-2-2",
                      "column_0": "content",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "white cat",
"column_4": "Query text for full-text search, cannot be empty"
                    },
                    {
                      "key": "3-2-5-2-3",
                      "column_0": "match_query",
                      "column_1": "object",
"column_2": "Optional",
                      "column_3": "{\"fuzziness\": \"AUTO\", \"max_expansions\": 50}",
"column_4": "Advanced match query configuration, will be passed downstream"
                    }
                  ]
                },
                {
                  "key": "3-2-5-3",
                  "column_0": "hybrid",
                  "column_1": "hybrid_params",
"column_2": "Optional",
                  "column_3": "{...}",
"column_4": < div>< code> query.mode = "hybrid"</ code> is required, hybrid search parameter object div>,
                  "children": [
                    {
                      "key": "3-2-5-3-1",
                      "column_0": "vector_column_name",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "vector",
"column_4": "Vector column name for vector search"
                    },
                    {
                      "key": "3-2-5-3-2",
                      "column_0": "fts_column_name",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "description",
"column_4": "Text column name for full-text search"
                    },
                    {
                      "key": "3-2-5-3-3",
                      "column_0": "content",
                      "column_1": "string/list of float",
"column_2": "Required",
                      "column_3": "\"white cat\"",
"column_4": < div> Input for vector search. Supports text strings, Base64 strings, or floating-point vector arrays. If < code> fts_content</ code> is not provided, this field must be a non-empty text string and is used for both vector search and full-text search div>
                    },
                    {
                      "key": "3-2-5-3-4",
                      "column_0": "fts_content",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "white cat",
"column_4": < div> Text for full-text search. After being provided, < code> content</ code> and < code> fts_content</ code> are used as inputs for vector search and full-text search, respectively div>
                    },
                    {
                      "key": "3-2-5-3-5",
                      "column_0": "type",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "base64/text",
"column_4": < div> Input type field. When passing < code> fts_content</ code>, only Base64 image input requires < code> base64</ code>; text string and floating-point vector array inputs do not require this field. If < code> fts_content</ code> is not provided, < code> text</ code> must be provided>
                    },
                    {
                      "key": "3-2-5-3-6",
                      "column_0": "embedding_model",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "doubao-embedding-vision-250615",
"column_4": < div> Embedding model name. Required if < code> fts_content</ code> is not provided; when < code> fts_content</ code> is provided, required when < code> content</ code> is a text string or a < code> type=base64 code> Base64 image; not required when directly passing a floating-point vector array. Supported models include: doubao-embedding-vision-250615 (multimodal visual embedding), doubao-embedding-large-text-240915 (large-scale text embedding), doubao-embedding-text-240715 (text embedding), and more div>
                    },
                    {
                      "key": "3-2-5-3-7",
                      "column_0": "rerank",
                      "column_1": "object",
"column_2": "Optional",
                      "column_3": "{\"type\": \"rrf\"}",
"column_4": < div> Reranking configuration, < code> type code> supports < code>"rrf" code> div>
                    },
                    {
                      "key": "3-2-5-3-8",
                      "column_0": "distance_type",
                      "column_1": "string",
"column_2": "Optional",
                      "column_3": "cosine",
"column_4": "Vector distance calculation method, for example, cosine"
                    },
                    {
                      "key": "3-2-5-3-9",
                      "column_0": "nprobes",
                      "column_1": "integer",
"column_2": "Optional",
                      "column_3": "",
"column_4": "Number of cluster centers probed during query"
                    },
                    {
                      "key": "3-2-5-3-10",
                      "column_0": "refine_factor",
                      "column_1": "integer",
"column_2": "Optional",
                      "column_3": "",
"column_4": "Result refinement factor"
                    },
                    {
                      "key": "3-2-5-3-11",
                      "column_0": "distance_range",
                      "column_1": "object",
"column_2": "Optional",
                      "column_3": "{\"lower_bound\": 0, \"upper_bound\": 1}",
"column_4": < div> Distance filter range object, can include < code> lower_bound code> and < code> upper_bound code> div>
                    }
                  ]
                },
                {
                  "key": "3-2-5-4",
                  "column_0": "scalar",
                  "column_1": "scalar_params",
"column_2": "Optional",
                  "column_3": "",
"column_4": < div>< code> query.mode = "scalar" code> is required, scalar query parameter object div>,
                  "children": [
                    {
                      "key": "3-2-5-4-1",
                      "column_0": "sql",
                      "column_1": "string",
"column_2": "Required",
                      "column_3": "SELECT * FROM table WHERE category = 'pets' LIMIT 10",
"column_4": < div> SQL query statement to be executed, cannot be empty. The number of returned results is still subject to the maximum value of < code> query.limit code> div>
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "key": "3-3",
          "column_0": "options",
          "column_1": "options",
"column_2": "Optional",
          "column_3": "{\"timeout_ms\": 10000}",
"column_4": "Request options object",
          "children": [
            {
              "key": "3-3-1",
              "column_0": "timeout_ms",
              "column_1": "integer",
"column_2": "Optional",
              "column_3": "10000",
"column_4": < div> Request timeout (milliseconds), integer range 1 to 30000, default is 10000. If < code> options code> is provided but this field is not, the default value will be used div>
            }
          ]
        }
      ]
    }
  ]
}); 
return <Table border={{ cell: true, wrapper: true }} pagination={false} {...properties} />;

Response parameters

const properties = ({
  "columns": [
{ "title": "Parameter", "dataIndex": "column_0", "key": "column_0", "width": 300 },
{ "title": "Type", "dataIndex": "column_1", "key": "column_1", "width": 150 },
{ "title": "Example value", "dataIndex": "column_2", "key": "column_2", "width": 150 },
{ "title": "Description", "dataIndex": "column_3", "key": "column_3" }
  ],
  "data": [
    {
      "key": "1",
      "column_0": "metadata",
      "column_1": "metadata",
      "column_2": "",
"column_3": "Metadata of the request.",
      "children": [
        {
          "key": "1-1",
          "column_0": "task_status",
          "column_1": "string",
          "column_2": "COMPLETED",
"column_3": < div> Task status. < br/>< ul>< li> ACCEPTED, request received</ li>< li> RUNNING, in progress</ li>< li> COMPLETED, task completed</ li>< li> FAILED, failed</ li></ ul> div>
        },
        {
          "key": "1-2",
          "column_0": "business_code",
          "column_1": "string",
          "column_2": "0",
"column_3": "Business code. 0 indicates a normal return."
        },
        {
          "key": "1-3",
          "column_0": "error_msg",
          "column_1": "string",
          "column_2": "",
"column_3": "If an exception occurs, detailed exception information will be returned."
        },
        {
          "key": "1-4",
          "column_0": "request_id",
          "column_1": "string",
          "column_2": "7f1d560dce21c7e4c0ce2f495bfa50b5",
"column_3": "The request ID."
        }
      ]
    },
    {
      "key": "2",
      "column_0": "data",
      "column_1": "LanceSearchResponse",
      "column_2": "",
"column_3": "Returned data, with different modes depending on the operator.",
      "children": [
        {
          "key": "2-1",
          "column_0": "rows",
          "column_1": "list of object",
          "column_2": "",
"column_3": < div> Array of objects, each row is a search result,< code>_distance</ code> is a distance metric column automatically added by the system</ div>
        },
        {
          "key": "2-2",
          "column_0": "column_names",
          "column_1": "list of string",
          "column_2": "[\"text\", \"label\", \"_distance\"]",
"column_3": "All column names included in the returned result"
        }
      ]
    }
  ]
}); 
return <Table border={{ cell: true, wrapper: true }} pagination={false} {...properties} />;

Examples

Request example

# Initiate operator service request
curl --location "https://operator.las.cn-beijing.volces.com/api/v1/process" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LAS_API_KEY" \
--data '{
    "operator_id": "las_lance_search",
    "operator_version": "v1",
    "data": {
        "dataset": {
            "tos_uri": "tos://your-bucket/path/to/your-db/",
            "dataset_name": "your_table_name"
        },
        "query": {
            "mode": "hybrid",
            "filter": {
                "where": "category = 'pets'"
            },
            "select": [
                "image_path",
                "description"
            ],
            "limit": 5,
            "params": {
                "hybrid": {
                    "vector_column_name": "vector",
                    "content": [0.12, -0.05, 0.98],
                    "type": "vector",
                    "fts_column_name": "description",
                    "fts_content": "white cat",
                    "rerank": {
                        "type": "rrf"
                    }
                }
            }
        }
    }
  }
}'

Response example

{
    "metadata": {
        "task_status": "COMPLETED",
        "business_code": "0",
        "request_id": "8a2b...e4f1"
    },
    "data": {
        "rows": [
            {
                "image_path": "images/cat_01.jpg",
                "description": "A fluffy white cat sleeping.",
                "_distance": 0.08
            },
            {
                "image_path": "images/cat_02.jpg",
                "description": "A playful white cat with a toy.",
                "_distance": 0.11
            }
        ],
        "column_names": [
            "image_path",
            "description",
            "_distance"
        ]
    }
}

Error code

HttpStatusCode

Error code

Error message

Description

200

0

OK

Normal return

Last updated: 2026.08.09 16:19:34