If you are using the Oracle Commerce Platform multisite support, many of the item types in the catalog repository have a context membership property (named siteIds
by default) whose value is a comma-separated list of the repository IDs of the sites an item appears on. For example, if you have three sites whose repository IDs are siteA
, siteB
, and siteC
, and a certain item is available on siteA
and siteC
(but not siteB
), the value of the item’s context membership property would be siteA,siteC
.
For the document-level item type, the records generated by the Oracle Commerce Platform include special item-type
.$siteId
properties that represent the repository item’s context membership property. These item-type
.$siteId
properties are renamed to item-type
.siteId
in the generated records. The records include a separate item-type
.siteId
entry for each site listed in the context membership property. For example:
<PROP NAME="product.siteId"> <PVAL> storeSiteUS </PVAL> </PROP> <PROP NAME="product.siteId"> <PVAL> storeSiteDE </PVAL> </PROP>
Note that the output records include entries only for sites that are listed in the sitesToIndex
property of the EndecaIndexingOutputConfig
component. For example, if the value of a item’s context membership property is siteA,siteB,siteC
, but sitesToIndex
lists only siteB
and siteC
, the record will not include an entry for siteA
. If an item’s context membership property is null, or if it lists only sites that are not listed in the sitesToIndex
property, no record is generated for the item.
For information about context membership properties, see the Multisite Administration Guide.
Item Types Lacking a Context Membership Property
If an item type does not have a context membership property, another mechanism is needed for including item-type
.siteId
values in the generated records. In this situation, you can use the sites-property-name
and sitegroups-property-name
attributes of the item
element to specify the names of the properties that hold references to sites and site groups in the site repository.
For example, the Commerce Reference Store location repository has a location
item type that represents the geographic location of a physical store. This item type does not have a context membership property, but has sites
and siteGroups
properties that contain references to sites and site groups in the site repository. Commerce Reference Store indexes location
items so customers can use guided navigation to find stores in specific locations. The indexing definition file includes:
<item item-descriptor-name="location" is-document="true"
sites-property-name="sites" sitegroups-property-name="siteGroups">
Note that the specified properties must contain references to the actual site and site group items in the site repository, not the site ID strings.