This topic provides a simple example of using the Index
Configuration Command-line Utility to update index configuration. In this
example, suppose an import owner named
ATG
has added index configuration to an Endeca
application. You want to update the index configuration by changing the
product.brand.name
attribute from an Endeca property to an
Endeca dimension.
The steps to accomplish this are as follows:
1. Retrieve the index configuration by running:
C:\Endeca\apps\<app dir>\control>index_config_cmd.bat get-config -o ATG -f C:\temp\indexConfig.json
2. Open the resulting JSON file and locate the
product.brand.name
attribute:
{ "indexConfig" : { "attributes" : { "product.brand.name" : { "isRecordSearchEnabled" : true, "jcr:primaryType" : "endeca:property" }, }, ....
3. Change
jcr:primaryType
from
endeca:property
to
endeca:dimension
, add the
mergeAction
with a value of
UPDATE
, and also add
isAutogen
with a value of
true
:
{ "indexConfig" : { "attributes" : { "product.brand.name" : { "mergeAction" : "UPDATE", "isAutogen" : true, "jcr:primaryType" : "endeca:dimension", "multiSelectType" : "OR" }, }, ....
4. Set the revised index configuration by running:
C:\Endeca\apps\<app dir>\control>index_config_cmd.bat set-config -o ATG -f C:\temp\indexConfig.json
5. If desired, examine the merged configuration by running:
C:\Endeca\apps\<app dir>\control>index_config_cmd.bat get-merged-config -f C:\temp\indexConfig.json
You see the following:
{ "indexConfig" : { "attributes" : { "product.brand.name" : { "isHierarchicalDimensionSearchEnabled" : true, "isRecordSearchEnabled" : true, "isAutogen" : true, "jcr:primaryType" : "endeca:dimension", "multiSelectType" : "OR" }, ....