getAdminsByVectorSearch
Search admins by meaning (semantic vector search).
Description
Searches admins by the meaning of a natural-language query rather than by exact keywords. Resolves to an IVectorSearchResponse<IAdminsResponse>, not an array: the admins are in items, the count in total.
indexReady: false means the search index for this entity and language isn't built yet, so empty items don't mean that nothing matched.
.getAdminsByVectorSearch(
,
,
,
);
Parameters schema
Schema
body(required): IAdminsVectorSearch
Vector search parameters.
example:
{ queryText: "content manager" }
body.queryText(required): string
Natural-language search query.
example: "content manager"
body.vectorDistanceThreshold: number
Override of the cosine distance threshold (0..2).
example: 0.3
body.maxHits: number
Number of top candidates fetched before pagination. Default: 100. Maximum: 500.
example: 10
body.debug: boolean
Deprecated and ignored: the API no longer reads debug and returns distance on every item.
example: false
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
example: 0
limit: number
Maximum number of records to return. Default: 30.
example: 30
Examples
Minimal example
const response = await Admins.getAdminsByVectorSearch({ queryText: 'content manager' });
Example with all parameters
const response = await Admins.getAdminsByVectorSearch(
{
queryText: 'content manager',
vectorDistanceThreshold: 0.3,
maxHits: 50,
},
'en_US',
0,
30,
);
Example response
{
"items": [],
"total": 0,
"indexReady": false
}
Response schema
Schema: IVectorSearchResponse<IAdminsResponse>
items: IAdminEntity[]
Admins that match the query.
items.id: number
Object ID.
example: 1764
items.attributeSetId: number | null
ID of the attribute set in use.
example: 120
items.identifier: string
Not returned by the Content API: it was the admin's sign-in login, and the platform no longer sends it. Kept optional for compatibility.
items.attributeSetIdentifier: string | null
Marker of the attribute set.
example: "admins"
items.position: number | null
Position used for sorting.
example: 1
items.isSync: boolean
Whether the admin has attribute data in the requested language (false with empty attributeValues otherwise).
example: true
items.attributeValues: IAttributeValues
Attribute values keyed by attribute marker.
example:
{
"marker": {
"type": "string",
"value": "Some value"
}
}
items.formModuleConfigs: IFormConfig[]
Form configurations of the module associated with the admin (the API key is formModuleConfigs).
example: []
items.distance: number
Cosine distance to the query. Returned on every item by the semantic (vector) search endpoint.
example: 0.12
total: number
Total number of found records.
example: 100
indexReady: boolean
false when no vectors are built yet for this entity and language: the query was not embedded, so empty items do not mean that nothing matched. true means the result comes from a real search.
Semantic search matches on meaning, not on the literal text. Keyword search with globalSearch() covers only products, pages, blocks and discounts, not admins.