Saltar al contendio prinicipal

Search Category Results Model

Advertencia

Esta página aún no se encuentra traducida al español.

API Search Category Results

Description

The Search Category Results Model is used by the system for returning results when using the Search API.

JSON Sample

The categories field is an array of objects that contain returned search results by category.

{
"categories": [
{
"name": "channels",
"results": [
{
"_id": "62fe8218a1a3eb0008eb0432",
"name": "chat",
"image": "",
"type": "channel",
"action": {
"channel": "62fe8218a1a3eb0008eb0432",
"group": "62ebcc5c5c14300008d38063"
},
"weight": 1,
"modifiedAt": "2022-08-18T18:16:56.473Z",
"tags": [
{
"type": "group",
"value": "62ebcc5c5c14300008d38063"
}
],
"highlights": []
},
{
"_id": "62fe81b5a1a3eb0008eb03be",
"name": "chat 0",
"image": "",
"type": "channel",
"action": {
"channel": "62fe81b5a1a3eb0008eb03be",
"group": "62ebcc5c5c14300008d38063"
},
"weight": 0.6666666666666666,
"modifiedAt": "2022-08-18T18:15:17.699Z",
"tags": [
{
"type": "group",
"value": "62ebcc5c5c14300008d38063"
}
],
"highlights": []
},
{
"_id": "62fe819ba1a3eb0008eb0384",
"name": "chat 1",
"image": "",
"type": "channel",
"action": {
"channel": "62fe819ba1a3eb0008eb0384",
"group": "62ebcc5c5c14300008d38063"
},
"weight": 0.3333333333333333,
"modifiedAt": "2022-08-18T18:14:51.829Z",
"tags": [
{
"type": "group",
"value": "62ebcc5c5c14300008d38063"
}
],
"highlights": []
}
],
"facets": []
}
]
}

Fields

FieldDescriptionTypeNotes
nameIndicates the search type or category.string
resultsArray of results returned according to the category.object[ ]
results[x]._idId of the returned search result.string
results[x].nameCorresponds to the display name of the returned result.string
results[x].imageIndicates an image associated with the result.string
results[x].typeIndicates the type or category of the search query.string
results[x].actionObject containing result context data, i.e., the ObjectIds related to the result.objectThe object's fields vary depending on the result type.
results[x].weight.Number that indicates the result's position in the list of returned results.number
results[x].modifiedAtIndicates the date and time the result was last modified.ISODate"YYYY-MM-DDTHH:mm:ss.SSSZ"
results[x].tagsArray of result data.object[ ]Objects depend on the result type.
results[x].highlightsArray displaying snippets of found keywords in their context.
facetsReturns details of search results based on tags, e.g., how many results have the same tag.[ ]