indexRegenerator.sh script
Use the indexRegenerator.sh
script to regenerate indexes for entities
such as items and categories. If you change the index option for an attribute of the spec that is
associated with the item or category after creating some other items or categories, then you must
run this script to regenerate indexes. Regenerating indexes ensures that you get correct search
results based on the changed attribute. You can use only one run_options combination at a time.
However, you can use zero or more tuning_options together.
Note: Before running the
indexRegenerator.sh
script, stop the IBM® Product Master instance.Note: The time that it takes to complete the script depends on the number of items in the
instance.
Syntax
indexRegenerator.sh --company=company_name run_options [tuning_options]
Parameters
- company
- Specify the company name.
- run_options:
- Full Container
- --catalog=CATALOG_NAME
- --hierarchy=HIERARCHY_NAME
- Container subset
- --items=FULL_PATH_CSV_FILE (two columns: PK, CATALOG_NAME)
- --categories=FULL_PATH_CSV_FILE (two columns: PK, HIERARCHY_NAME)
- Generate PK files for multiple systems (numFiles - default is
1)
- --catalog=NAME
- --items=FULL_PATH_TO_DESIRED_FILE
- --numFiles=NUMBER_FILES
- --hierarchy=NAME
- --categories=FULL_PATH_TO_DESIRED_FILE
- --numFiles=NUMBER_FILES
- Full Container
- tuning_options
- Specify one from this list:
- --nodePaths=FULL_PATH_TO_NODES_SEPARATED_BY_COLONS. Choose this option to improve speed by specifying node paths. The default is all paths. For example, --nodePaths="SpecName/Node1:SpecName/Node2"
- --lockContainer=[YES|NO] Choose this option to improve speed by locking the container. This option has the disadvantage of locking out the other users. The default is YES.
- --threads=NUMBER_THREADS. Choose this option to improve speed by using more than one thread, but ensure that enough DB connections exist. The default is 1.
- file_encoding
- Sets the file encoding pattern value. The default is ISO8859_1. Value can be different encoding
standards, for example "UTF-8 for double byte character environments". Many scripts use the value of
this parameter to set -Dfile.encoding parameter.
- --encoding=Runtime option sets the file encoding type to
indexRegenerator.sh
script command.
- --encoding=Runtime option sets the file encoding type to
Note:
- You must enclose parameters that contain spaces and special characters within escaped quotation marks (\"). You must escape special characters by a backslash (\). If you specify more than one file, the file number is placed before the file extension. For example,items.csv becomes items-1.csv.
- You cannot use --catalog and --hierarchy, and --catalog and --categories arguments together. If you use --catalog and --items arguments together, only PK files are generated and no indexes are regenerated.
Example
In this example, the indexRegenerator.sh
script
is run:
$<install directory>/bin/indexRegenerator.sh --company=acme --catalog=catalog1
--nodePaths=FULL_PATH_TO_NODES_SEPARATED_BY_COLONS --lockContainer=NO