Saltar al contendio prinicipal

Search Engines Data Model

Advertencia

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

COTCompany

Description

Within the COTCompany data model, the searchEngines field is an array of objects that permits configuring search query responses made through the platform's UI search tool. The search configuration is applied to all user search queries made within the company's Cotalker platform.

info
  • Search Engine objects have the following general structure:
    {"searchEngines": [{"name": string, "options": object}]}.
  • The searchEngines field's default value is an empty array: {"searchEngines": []}
  • If left empty, all search engines will search through their corresponding categories.
  • When search engine objects are placed in the array, only the specified search engines will be used in the UI search tool.

JSON Sample

In the companies sample below, you can find the searchEngines object array on lines 11 to 27.

{
"defaultCountry": "US",
"defaultLanguage": "en",
"isActive": true,
"_id": "62fcdc16e341c5b6f2a23992",
"subdomain": "lorem",
"displayName": "lorem",
"legalName": "lorem",
"createdAt": "2022-07-01T20:49:32.158Z",
"modifiedAt": "2022-08-17T12:03:42.726Z",
"searchEngines": [
{
"_id": "62fcdc22739ece121e506876",
"name": "users",
"options": {
"limit": 100,
"orderBy": "asc"
}
},
{
"_id": "62fcdc297daf1a16d4c6e78c",
"name": "tasksElastic",
"options": {
"entityType": "hedgedoc"
}
}
]
}

Fields

FieldDescriptionTypeNotes
nameIndicates the search category or type that is being configured.
Options are:
users | public-tasks | channels | properties | tasksElastic
stringtasksElastic is a "smarter" search engine, i.e., it enables flexible search rules that allows the engine to return additional results that are not exact but similar to the search query.

public-tasks is still in beta.
optionsIndicates the parameters used to filter searches in the given category or type.objectParameters are relative to the category, e.g., the parameters for searching for properties recur to the query parameters available in the Properties API.
options.createdDisplays results created on the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.createdGtDisplays results created after the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.createdGteDisplays results created on or after the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.createdLtDisplays results created before the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.createdLteDisplays results created on or before the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.disableSerialBy default, if a query begins with a number, e.g., #18 or 18, tasks with that serial number will be returned in the response. If activated, this behavoir is disabled.booleanThis allows you to search through task names that have numbers in them and avoid including the automatically generated task serial number.
options.entityTypeAvailable only when name is set to tasksElastic. Indicates the task-associated category or type in which to carry out the "elastic" (smart) search. If no entityType is given, the taskElastic engine will search through all its categories.stringOptions are:
task | hedgedoc | property | channel | user

hedgedoc refers to notes contained within tasks.
options.groupsLimits search queries to the groups indicated in the array.COTGroup<\ObjectId>[ ]Available only when name is set to tasksElastic, channels.
options.isActiveDisplays results depending on their isActive status.boolean or all,
options.limitLimits the number of search results returned in a single page.numberBy default, limit is set to 2.
options.modifiedDisplays results based on the date and time they were modified.DateAccepts either ISODate or Unix Epoch Time format.
options.modifiedGtDisplays results modified after the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.modifiedGteDisplays results modified on or after the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.modifiedLtDisplays results modified before the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.modifiedLteDisplays results modified on or before the indicated date and time.DateAccepts either ISODate or Unix Epoch Time format.
options.orderByOrders results in ascending or descending order.asc or desc,
options.sortBySorts results by the indicated field. Sorting is carried out using the available parameter options in the respective API request, i.e., channels can be sorted according to the sortBy options in the Channels API.string

Additional Resources