You can use various attributes of the property element to specify the way properties of repository items should be treated in the MDEX. The SchemaExporter component then uses the values of these attributes in the schema configuration it creates.
To specify the data type of a property, you use the type attribute. The value of this attribute can be date, string, boolean, integer, or float. For example:
<property name="quantity" type="integer"/>
If a type value is not specified, it defaults to string.
You can designate a property as searchable, as a dimension, or both. To make a property searchable, set the text-searchable attribute to true. To make a property a Guided Search dimension, set the is-dimension attribute to true. In the following example, the color property is both a dimension and searchable:
<property name="color" is-dimension="true" text-searchable="true"/>
If is-dimension is true, you can use the multiselect-type attribute to specify whether the customer can select multiple values of the dimension at the same time. The value of this attribute can be multi-or (combine using Boolean OR), multi-and (combine using Boolean AND), or none (the default, meaning multiselect is not supported for this dimension). For example:
<property name="brand" is-dimension="true" multiselect-type="multi-or"/>
Multiselect logic works as follows:
Combining with Boolean OR returns results that match any of the selected values. For example, for a
colordimension, if the user selectsyellowandorange, a given item is returned if itscolorvalue isyellowororange.Combining with Boolean AND returns results that match all of the selected values. For example, suppose a product representing a laser printer has a
paperSizesproperty that is an array of the paper sizes the printer accepts, and you have a dimension based on this property. If the user selectsA4andletterfor this dimension, a given item is returned only if itspaperSizesproperty includes bothletterandA4.
Automatically Generating Dimension Values
If is-dimension is true for a repository item property, by default Guided Search examines the data and automatically generates non-hierarchical dimension values for the values of that property. For example, if the color property has values of orange, yellow, and blue, three dimension values are generated, representing the values of the property.
For a hierarchical dimension, though, the dimension value records must be explicitly created by the Guided Search integration. This is done by the CategoryToDimensionOutputConfig component (for the product categories) and the RepositoryTypeDimensionExporter component (for the catalog repository item-type hierarchy).
To prevent automatic generation of dimension values for a property, set the autogen-dimension-values attribute to false. For example, the dimension for the repository item-type hierarchy is defined like this:
<property autogen-dimension-values="false"
name="$itemDescriptor.itemDescriptorName" is-dimension="true"/>

