How to update the configuration of a CAS recordstore

There are instances where we need to reconfigure/update the configuration of a CAS Recordstore. This might be needed during a migration, or updating the ID for the record store.

The reconfiguration of a CAS recordstore is  2 step process

Step 1:  Go to CAS bin directory – <Endeca-Installation>/CAS/11.0.0/bin

cd  <Endeca-Installation>/CAS/11.0.0/bin

Step 2 :  Run recordstore-cmd command

./recordstore-cmd.sh set-configuration -a CRS_en_data -f <Endeca-Installation>/apps/CRS/config/cas/CRS_sku_cfg.xml

This will update the configuration of CRS_en_data record stores with the configuration listed in CRS_sku_cfg.xml.

Sample config xml file (from oracle documentation – use only the configuration that you might need)

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<recordStoreConfiguration xmlns=”http://recordstore.itl.endeca.com/”>
 <btreePageSize>100</btreePageSize>
    <changePropertyNames/>
    <cleanerInterval>1.0</cleanerInterval>
    <dataDirectory>C:\Endeca\CAS\workspace\state\RS1\data</dataDirectory>
    <duplicateRecordCompressionEnabled>false</duplicateRecordCompressionEnabled>
    <generationRetentionTime>168.0</generationRetentionTime>
    <idPropertyName>Endeca.Id</idPropertyName>
    <ignoreInvalidRecords>false</ignoreInvalidRecords>
    <indexWriteFlushInterval>50000</indexWriteFlushInterval>
    <jdbmSettings/>
    <maxDataFileSize>2147483647</maxDataFileSize>
    <recordCompressionEnabled>false</recordCompressionEnabled>
</recordStoreConfiguration>

 

 

Some useful Tips –

1) If you want to check the configuration of existing RecordStore, run following command to export the configuration (here I am using endeca version 11.3) –

<CAS>/11.3.0/bin/recordstore-cmd.sh get-configuration -a MyAppen-data -f /tmp/MyAppenConfig.xml

This will export the configuration in the xml format mentioned above in tmp directory

2) Getting “Root cause: Input record does not have a valid Id.” during ATG-Endeca integration ?

Update the xml with properties highlighted below and import back to CAS recordstore as mentioned above –

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<recordStoreConfiguration xmlns=”http://recordstore.itl.endeca.com/”>
 <btreePageSize>100</btreePageSize>
    <changePropertyNames/>
    <cleanerInterval>1.0</cleanerInterval>
    <dataDirectory>C:\Endeca\CAS\workspace\state\RS1\data</dataDirectory>
    <duplicateRecordCompressionEnabled>false</duplicateRecordCompressionEnabled>
    <generationRetentionTime>168.0</generationRetentionTime>
    <idPropertyName>record.Id</idPropertyName>
    <ignoreInvalidRecords>true</ignoreInvalidRecords>
    <indexWriteFlushInterval>50000</indexWriteFlushInterval>
    <jdbmSettings/>
    <maxDataFileSize>2147483647</maxDataFileSize>
    <recordCompressionEnabled>false</recordCompressionEnabled>
</recordStoreConfiguration>

Cheers,
Mayank Batra

Other useful links :

How to read data from CAS recordstore
How to get List of CAS Recordstores
How to create or delete CAS recordstores
How to update configuration of CAS recordstores

Leave a Reply