If a static item type is included in an EndecaIndexingOutputConfig
definition file, then any dynamic item types that are descendants of that item type are automatically available for indexing as well. For example, if you create an electricalProduct
subtype of the product
item type (which is included in the ProductCatalogOutputConfig
definition file), electricalProduct
items will be indexed, as will any subtypes of the electricalProduct
item type.
To specify that a dynamic property should be included in the index (either a dynamic property of a static item type or a subtype-specific property of a dynamic subtype), you set the searchable
attribute of the property to true
. In addition, you need to set at least one of the following attributes to true
to specify how the property is handled in the MDEX:
textSearchable
– Setting totrue
specifies that the values of the property should be treated as searchable text. Equivalent to thetext-searchable
attribute inEndecaIndexingOutputConfig
definition files.wildcardSearchable
– Setting totrue
specifies that the values of the property should be treated as searchable text and support the use of the asterisk (*
) as a wildcard in search terms. Equivalent to thewildcard-searchable
attribute inEndecaIndexingOutputConfig
definition files.dimension
-- Setting totrue
specifies that the property should be treated as a dimension. Equivalent to theis-dimension
attribute inEndecaIndexingOutputConfig
definition files.
To set these attributes, you create das_gsa_dynamic_attr
metadata items that are associated with the dynamic property when it is generated. For example, the following XML import file creates a das_gsa_dynamic_prop
metadata item for a dynamic property, and creates das_gsa_dynamic_attr
items that set attributes to specify that the property should be included in the MDEX:
<add-item item-descriptor="das_gsa_dynamic_prop" id="wattage" repository="/atg/repository/dynamic/DynamicMetadataRepository" no-checkin="false"> <set-property name="property_name"><![CDATA[wattage]]></set-property> <set-property name="item_descriptor"><![CDATA[electricalProduct]]> </set-property> <set-property name="data_type"><![CDATA[float]]></set-property> <set-property name="repository"> <![CDATA[/atg/commerce/catalog/ProductCatalog]]></set-property> </add-item> <add-item item-descriptor="das_gsa_dynamic_attr" id="wattageAttr1" no-checkin="false"> <set-property name="attribute_name"><![CDATA[writable]]></set-property> <set-property name="item_descriptor"><![CDATA[electricalProduct]]> </set-property> <set-property name="property_name"><![CDATA[wattage]]></set-property> <set-property name="repository"> <![CDATA[/atg/commerce/catalog/ProductCatalog]]></set-property> <set-property name="is_dynamic_property"><![CDATA[true]]></set-property> <set-property name="data_type"><![CDATA[string]]></set-property> <set-property name="value"><![CDATA[true]]></set-property> </add-item> <add-item item-descriptor="das_gsa_dynamic_attr" id="wattageAttr2" no-checkin="false"> <set-property name="attribute_name"><![CDATA[searchable]]></set-property> <set-property name="item_descriptor"><![CDATA[electricalProduct]]> </set-property> <set-property name="property_name"><![CDATA[wattage]]></set-property> <set-property name="repository"> <![CDATA[/atg/commerce/catalog/ProductCatalog]]></set-property> <set-property name="is_dynamic_property"><![CDATA[true]]></set-property> <set-property name="data_type"><![CDATA[string]]></set-property> <set-property name="value"><![CDATA[true]]></set-property> </add-item> <add-item item-descriptor="das_gsa_dynamic_attr" id="wattageAttr3" no-checkin="false"> <set-property name="attribute_name"><![CDATA[dimension]]></set-property> <set-property name="item_descriptor"><![CDATA[electricalProduct]]> </set-property> <set-property name="property_name"><![CDATA[wattage]]></set-property> <set-property name="repository"> <![CDATA[/atg/commerce/catalog/ProductCatalog]]></set-property> <set-property name="is_dynamic_property"><![CDATA[true]]></set-property> <set-property name="data_type"><![CDATA[string]]></set-property> <set-property name="value"><![CDATA[true]]></set-property> </add-item>
Indexing settings that are specified through metadata item attributes override equivalent settings specified in an EndecaIndexingOutputConfig
definition file. In the example above, if the dynamic property is specified for indexing in the definition file and its is-dimension
attribute is set to false
, this value is overridden by the dimension
attribute setting in the das_gsa_dynamic_attr
metadata item. Similarly, if you want to disable indexing of a property specified in an EndecaIndexingOutputConfig
definition file, you can do this by creating a das_gsa_dynamic_attr
metadata item that sets the searchable
attribute to false
.
Note that the available options for configuring indexing settings through repository item attributes are limited. Equivalent attributes exist only for a subset of the indexing settings that can be configured through EndecaIndexingOutputConfig
definition files.