{
"type": "object",
"properties": {
"username": {
"type": "string",
"x-index": "single_field"
},
"description": {
"type": "string",
"x-index": "text"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-index": "multikey"
}
}
}
# Заголовки запроса:
SBRS-Correlation-Id: uuid
SBRS-Originator: web-interface
SBRS-Message-Id: uuid
SBRS-Schema-Name: collection_name (опционально)
# Пример ответа:
{
"collections": [
{
"collectionName": "users",
"indexes": [
{
"name": "username_single_idx",
"type": "single",
"fields": [
"username"
]
},
{
"name": "description_text_idx",
"type": "text",
"fields": [
"description"
]
}
]
}
],
"sbrsMessageType": "success",
"sbrsStatusMessage": "Index data retrieved successfully..."
}
# Это позволяет выполнять быстрые запросы по любым полям в справочниках, даже если структура документов может различаться.
{
"$**": 1
}
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"x-index": "single_field",
"description": "Уникальный идентификатор пользователя"
},
"email": {
"type": "string",
"format": "email",
"x-index": "single_field",
"description": "Email для быстрого поиска"
},
"fullText": {
"type": "string",
"x-index": "text",
"description": "Полнотекстовый поиск по содержимому"
},
"categories": {
"type": "array",
"items": {
"type": "string"
},
"x-index": "multikey",
"description": "Поиск по категориям"
},
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string",
"x-index": "single_field"
}
}
}
},
"required": [
"userId",
"email"
]
}