This class provides methods that help the system to perform query searches in the tables specified by their IDs and reindex columns.
This method reindexes all columns with the active Full text search attribute in the system.
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
const simpleSearch = new SimpleSearch(); simpleSearch.recreateAllIndices(); |
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 |
---|---|---|---|
tableName | String | Y | N |
Example:
const simpleSearch = new SimpleSearch(); simpleSearch.recreateIndicesByTableName('task'); |
This method reindexes a column and its child entities based on its ID.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
columnID | String | Y | N |
Return:
Type | Description |
---|---|
Void | This method does not return a value. |
Example:
const simpleSearch = new SimpleSearch(); simpleSearch.recreateIndicesByColumnId(155931135900001085); // recreating indices for Description column of Task table |
Use this method to perform a search query against tables. The tableIDs parameter is an array of the ID type.
Parameter(s):
Name | Type | Mandatory | Default value |
---|---|---|---|
text | String | Y | N |
tableIDs | Array of Strings | Y | N |
Return:
Type | Description |
---|---|
Array of Objects | This method returns an array of the SimpleRecord type. |
Example:
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 //... |