Perform a vector similarity search over the specified vector table.

post

http://localhost:8080/ords/pdbdba/_/db-api/stable/vecdb/vector-tables/{vector_table_name}/query

Perform a vector similarity search using text, a vector or an ID returning the most similar records as well as their distance.

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Example:
{
    "queryBy":{
        "text":"leave policy"
    },
    "topK":5,
    "outputSelector":[
        "tenant",
        "title"
    ],
    "filters":{
        "tenant":"acme",
        "category":{
            "$in":[
                "hr",
                "benefits"
            ]
        }
    },
    "advancedOptions":{
        "distance_metric":"COSINE",
        "efsearch":64
    },
    "includeVectors":false
}
Nested Schema : advancedOptions
Type: object
Search tuning options such as distance_metric, efsearch, neighbor partition probes, rescore factor, or rescore_factor.
Nested Schema : VectorDebugFlags
Type: object
Debug flags to be used to trace vector modules
Show Source
Nested Schema : filters
Type: object
QBE-style metadata filters applied over vector table metadata.
Nested Schema : outputSelector
Type: array
Top-level metadata keys to project in each result. Null returns full metadata; an empty array returns an empty metadata object.
Show Source
Nested Schema : queryBy
Type: object
Query by text, vector or id.
Security
Back to Top

Response

Supported Media Types

200 Response

List of vectors.
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : results
Type: array
Show Source
Nested Schema : VecDBSearchItem
Type: object
Show Source
Nested Schema : metadata
Type: object
Nested Schema : vector
Type: array
Show Source

400 Response

The request body included invalid parameters.
Body ()
Root Schema : ORDSErrorResponse
Type: object
Show Source

404 Response

The specified vector table does not exists.
Body ()
Root Schema : ORDSErrorResponse
Type: object
Show Source
Back to Top