Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This class enables the system to perform query searches in the tables specified by their IDs. Use the SimpleSearch methods in your server-side scriptsЭтот класс позволяет системе выполнять поиск запросов в таблицах по их ID. Используйте методы SimpleSearch в скриптах на стороне сервера.


recreateAllIndiсes()


This method reindexes all columns with the active Используйте этот метод, чтобы переиндексировать все колонки с активным атрибутом Full Text Search attribute in the systemв системе.

ReturnВозвращаемое значение:

TypeТип

DescriptionОписание

VoidThis method does not return a valueМетод не возвращает значение.

ExampleПример:

Code Block
languagejs
titlesearch
linenumberstrue
const simpleSearch = new SimpleSearch();
simpleSearch.recreateAllIndices();

recreateIndicesByTableName(tableName)

This method reindexes all columns with the active Full Text Search attribute within the table specified and its child tables.

Parameter(s):


Используйте этот метод, чтобы переиндексировать все колонки с активным атрибутом Full Text Search внутри указанной таблицы и ее дочерних таблиц.

Параметры:

Название

Тип

Обязательный

Значение по умолчанию

Name

Type

Mandatory

Default Value

tableNameStringYДаNНет

ExampleПример:

Code Block
languagejs
titlesearch
linenumberstrue
const simpleSearch = new SimpleSearch();
simpleSearch.recreateIndicesByTableName('task');

recreateIndicesByColumnId(columnId)


This method reindexes a column and its child entities based on its Этот метод переиндексирует колонку и ее дочерние элементы на основе ее ID.

Parameter(s)Параметры:

NameНазвание

TypeТип

Mandatory

Обязательный

Значение по умолчаниюDefault Value

columnIDStringYДаNНет

ReturnВозвращаемое значение:

TypeТип

DescriptionОписание

VoidThis method does not return a valueМетод не возвращает значение.

ExampleПример:

Code Block
languagejs
titlesearch
linenumberstrue
const simpleSearch = new SimpleSearch();
simpleSearch.recreateIndicesByColumnId(155931135900001085); // recreating indices for Descriptiondescription column of Task table

search(text, tableIDs)


This method performs a search query against tables. The tableIDs parameter is an array of the Этот метод выполняет поисковый запрос по таблицам. Параметр tableIDs представляет собой массив типа sys_id type.


Parameter(s)Параметры:

NameНазваниеTypeТипMandatoryОбязательныйЗначение по умолчаниюDefault Value
textStringYДаNНет
tableIDsArrayYДаNНет


ReturnВозвращаемое значение:

TypeТипDescriptionОписание
ArrayThis method returns an array of the SimpleRecord typeМетод возвращает массив типа SimpleRecord.

ExampleПример:

Code Block
languagejs
titlesearch
linenumberstrue
const searchManager = new SimpleSearch();
const results = searchManager.search('email', ['155931135900000083'/* task */]);
results.map(foundRecord => {
  ss.info(`/record/${foundRecord.getTableName()}/${foundRecord.sys_id}`);
});
//Info: /record/task/164579004293577819
//Info: /record/task/163696164398828017
//...


Table of Contents
absoluteUrltrue
classfixedPosition