Batch creation and updating of Elasticsearch index files from the command line
You can perform batch indexing of Rule, Data, and Work classes from the command line by using the FullTextIndexer utility. This procedure is useful when the index file has been accidentally deleted, has been corrupted, or if search needs to be enabled after being disabled after the application has been in production for some time. The FullTextIndexer utility performs batch indexing by connecting to an existing cluster.
Setting up the command-line environment
- Extract the contents of the coreBuildDistributionImage.zip file into a directory. The FullTextIndexer utility is run from the prpcUtils.bat file in the scripts/utils subdirectory.
- On the node that you want to index, update the following general parameters in the scripts/utils/prpcUtils.properties file:
- pega.jdbc.driver.jar=<path to jdbc jar>
- pega.jdbc.driver.class=<jdbc class>
The valid values are: oracle.jdbc.OracleDriver, com.ibm.db2.jcc.DB2Driver, com.microsoft.sqlserver.jdbc.SQLServerDriver, and org.postgresql.Driver - pega.database.type=<database type>
The valid values are: mssql, oracledate, udb, db2zos, and postgres - pega.jdbc.url=jdbc:<jdbc url>
- pega.jdbc.username=<database username>
- pega.jdbc.password=<database password>
- Update the indexing parameters in the SETTINGS FOR FULL TEXT INDEXER TOOL section of the scripts/utils/prpcUtils.properties file:
- indexing.username=<username> (not required as of Pega® 7.2)
- indexing.password=<password> (not required as of Pega 7.2)
- Indexing.indextype=<type>
The valid values are: Rule, Data, and Work. - indexing.classes=<class1,class2>
- indexing.messagesfrequency=<frequency in seconds>
- indexing.indexdirectory=<Path to the index Directory> (available starting with Pega 7.2.2)
Running the utility
Run the utility script by using indexing
as an argument to prpcUtils, for example:
prpcUtils.bat indexing
When the utility finishes running, the following message is displayed:
PegaRULES Process Commander Indexing complete.
Command-line parameters
Option | Property name | Description |
---|---|---|
-u | indexing.username | Specify the Pega 7 Platform user name. Not required as of Pega 7.2. |
-p | indexing.password | Specify the Pega 7 Platform user's password. Not required as of Pega 7.2. |
-i | indexing.indextype | Specifies what to index. The valid values are Rule, Data, and Work. |
-c | indexing.classes | Specifies the list of classes, separated by a comma, to index. |
-x | indexing.exclude | Indexes all class types except those specified in the indexing.classes property. An error is displayed if these class types are not specified. |
-m | indexing.messagesfrequency | Specifies the frequency, in seconds, with which to display progress messages. The default is 10 seconds. |
-d | indexing.indexdirectory | Specifies the directory index in which to store the indexes. For example, c:\myIndexDirectory. If no value is specified, indexes are stored in the temp directory. |
-h | indexing.help | Displays the help for this utility. |
For more information, see System Settings - Search tab.