getAdminsByVectorSearch
Semantic (vector) search for admins.
Description
This method performs a semantic (vector) search for admins from a natural-language query - it matches on meaning rather than exact keywords. It returns a Promise that resolves to an IAdminsResponse object - a container with items (the admins) and total - not a bare array.
.getAdminsByVectorSearch(
,
,
,
);
Parameters schema
Schema
body(required): IAdminsVectorSearch
Vector search body
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
Top-K candidates fetched before pagination. Default: 100. Max: 500.
example: 10
body.debug: boolean
When true, each returned item gets a distance field.
example: false
langCode: string
Language code. Default: "en_US"
example: "en_US"
offset: number
Parameter for pagination. Default: 0
example: 0
limit: number
Parameter for pagination. Default: 30
example: 30
Examples
Minimal example
const response = await Admins.getAdminsByVectorSearch({ queryText: 'content manager' });
Example with attributes
const response = await Admins.getAdminsByVectorSearch(
{
queryText: 'content manager',
vectorDistanceThreshold: 0.3,
maxHits: 50,
debug: true,
},
'en_US',
0,
30,
);
Example response
{
"items": [],
"total": 0
}
Response schema
Schema: IAdminsResponse
items: IAdminEntity[]
Array of found admin objects.
items.id: number
The identifier of the object.
example: 1764
items.attributeSetId: number | null
The identifier of the attribute set being used.
example: 120
items.identifier: string
The textual identifier for the record field.
example: "admin1"
items.attributeSetIdentifier: string | null
The identifier of the attribute set.
example: "admins"
items.position: number | null
Position number (for sorting).
example: 1
items.isSync: boolean
Page indexing flag (true or false).
example: true
items.attributeValues: IAttributeValues
Array of attribute values from the index (presented as a pair of user attribute identifier: attribute value).
example:
[
{
"marker": {
"type": "string",
"value": "Some value"
}
}
]
items.moduleFormConfigs: IFormConfig[]
Array of module form configurations associated with the admin.
items.distance: number
Cosine distance to the query. Returned only by the semantic (vector) search endpoint when debug: true is passed in the search body.
example: 0.12
total: number
Total number of found records.
example: 100
ℹ️ Semantic search matches on meaning, not on the literal text. For keyword matching across every entity type at once use globalSearch().