An EndecaIndexingOutputConfig
indexing definition file begins with a top-level item
element that specifies the item descriptor to create records from, and then lists the properties of that item type to include. The properties appear as property
elements within a properties
element.
The top-level item
element in the definition file can contain child item
elements for properties that refer to other repository items (or arrays, Collections, or Maps of repository items). Those child item
elements in turn can contain property
and item
elements themselves.
The following example shows a simple definition file for indexing a product catalog repository:
<item item-descriptor-name="product" is-document="true"> <properties> <property name="creationDate" type="date"/> <property name="brand" is-dimension="true" type="string" text-searchable="true"/> <property name="description" text-searchable="true"/> <property name="longDescription" text-searchable="true"/> <property name="displayName" text-searchable="true"/> </properties> <item is-multi="true" property-name="childSKUs"> <properties> <property name="quantity" type="integer"/> <property name="description" text-searchable="true"/> <property name="displayName" text-searchable="true"/> <property name="color" is-dimension="true" type="string" text-searchable="true"/> </properties> <item is-multi="true" property-name="parentCategories" parent-property="childProducts"> <properties> <property name="description" text-searchable="true"/> <property name="longDescription" text-searchable="true"/> <property name="displayName" text-searchable="true"/> </properties> </item> </item>
Note that in this example, the is-document
attribute of the top-level item
element is set to true
. This attribute specifies that a record should be generated for each item of that type (in this case, each product
item). This means that each record indexed by Guided Search corresponds to a product, so that when a user searches the catalog, each individual result returned represents a product. The definition file specifies that each output record should include information about the product’s parent categories and child SKUs (as well as the product itself), so that users can search category or SKU properties in addition to product properties.
If, instead, you want to generate a separate record per sku
item, you set is-document
to true
for the childSKUs
item
element and to false
for the product
item
element. In that case, the product properties (such as brand
in the example above) are repeated in each record.
When you configure the Guided Search integration in CIM, you select whether to index by product or SKU. Your selection determines whether certain application modules are included in your EAR files. These modules configure the is-document
attributes and other related settings appropriately for the option you select. See Oracle Commerce Platform Modules for information about these modules.