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 и переиндексации колонок.

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.

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

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

Тип

Описание

VoidМетод не возвращает значение.

ПримерExample:

Code Block
languagejs
titlesearchrecreateAllIndiсes()
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):


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

Параметры:

Название

Тип

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

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

Name

Type

Mandatory

Default Value

tableNameString
Y
Да
N
Нет

ExampleПример:

Code Block
languagejs
titlesearchrecreateIndicesByTableName()
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):


Используйте метод для переиндексации колонки, включая значения записей дочерних таблиц, на основе ее ID.

Параметры:

Название

Тип

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

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

Name

Type

Mandatory

Default Value

columnIDString
Y
Да
N
Нет

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

Type

Тип

Description

Описание

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

ExampleПример:

Code Block
languagejs
titlesearchrecreateIndicesByColumnId()
linenumberstrue
const simpleSearch = new SimpleSearch();
simpleSearch.recreateIndicesByColumnId('155931135900001085'); // recreatingПереиндексация indicesколонки for"Описание" Descriptionв columnтаблице of Task table"Задачи" 

search(text, tableIDs)

This method performs a search query against tables. The tableIDs parameter is an array of the sys_id type.

Parameter(s):


Используйте метод, чтобы выполнить поисковый запрос по таблицам. Параметр tableIDs представляет собой массив значений ID.

Параметры:

НазваниеТипОбязательныйЗначение по умолчанию
NameTypeMandatoryDefault Value
textString
Y
Да
N
Нет
tableIDsArray of Strings
Y
Да
N
Нет

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

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

ПримерExample:

Code Block
languagejs
titlesearch()
linenumberstrue
const searchManager = new SimpleSearch();
const results = searchManager.search('email', ['155931135900000083'/* task */]);
results.mapforEach(foundRecord => {
  ss.info(`/record/${foundRecord.getTableName()}/${foundRecord.sys_id}`);
});
//Info Информация: /record/task/164579004293577819
//Info Информация: /record/task/163696164398828017
//...


Table of Contents
absoluteUrltrue
classfixedPosition