Creating Predicate Indexes
Consider a scenario that you want to create predicate indexes on the
BirthDate and
Gender attributes.
Before you beginTake a backup of the existing
IndexerConfig.xml file.
- Procedure
- Create a CSV file to add the dates to be used as partitions in a primary index for the
BirthDateattribute.For example, to index a Date of the Birth field, you can define December 31st for each year from 1900 to 2100 as the partition, separating all the dates of birth into separate years. The sample dob_idx.csv file with the partition values:12/31/1900 12/31/1901 12/31/1902... 12/31/2099 12/31/2100
- Create a text file to add the
Genderattribute values.The sample gender_idx.txt file:Male Female
- Place the
dob_idx.csv and
gender_idx.txt files in the
$MQ_COMMON_DIR/standard/samples/DQprocess folder.
Note: If you have containerized TIBCO® MDM 9.2.0_HF-002, log in to TIBCO MDM and navigate to and upload the dob_idx.csv and gender_idx.txt files into the common/standard/samples/DQprocess folder.
You can also use the $MQ_HOME location to upload the files.
- Navigate to the
$MQ_HOME/config folder and open the
IndexerConfig.xml file to add the attributes for predicate indexes in an IndexEntity.
Predicate indexes on the
BirthDateattribute with the primary index (primayIndex=true):<Attribute> <AttributeName>BirthDate</AttributeName> <IndexDetails primaryIndex="true">$MQ_COMMON_DIR/standard/samples/DQprocess/dob_idx.csv</IndexDetails> </Attribute>
Predicate indexes on theGenderattribute with the secondary index (primayIndex=false):<Attribute> <AttributeName>Gender</AttributeName> <IndexDetails primaryIndex="false">$MQ_COMMON_DIR/standard/samples/DQprocess/gender_idx.txt</IndexDetails> </Attribute>
Note: Currently, only the string and date type attributes are supported for indexing. - Save the updated IndexerConfig.xml file.
What to do next
Follow these steps to create predicate indexes:
- Navigate to $MQ_HOME\bin.
- On the command line, run one of the following utilities to start the TIBCO Patterns - Search server.
netricsServer.bat -startServer
netricsServer.sh -startServer
- Start the TIBCO MDM server.
- On the command line, run one of the following utilities to view the list of indexes:
netricsServer.bat -list
netricsServer.sh -list
The indexes are created on the repository that is specified in the IndexerConfig.xml file.The sample predicate indexes:
- For the
BirthDateattribute with the primary index:Primary,Table:indx_PREDREPO_p0,Field:72562_dob,Num. Partitions:103,Pidx(Kbytes):7102,GIP(Kbytes):7753,Tran State:1,Tran Owner:0
- For the
Genderattribute with the secondary index:Secondary,Table:indx_PREDREPO_p0,Field:72562_gender,Num. Partitions:6,Pidx(Kbytes):120,GIP(Kbytes):0,Tran State:1,Tran Owner:0
You can reindex the index entities by using the Text Index Migration utility (
textIndexMigration.batortextIndexMigration.sh) located at $MQ_HOME\bin.Note: If you have containerized TIBCO® MDM 9.2.0_HF-002, log in to TIBCO MDM and navigate to and click Re-index to index the entities in the TIBCO Patterns - Search server. - For the