Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Enabling Searchability for Attributes

Enabling Searchability for Attributes

Merchandisers can set a facet as searchable if the corresponding attribute’s indexed property is set to true in the product.schema.xml file. With attribute or field searchability property, Solr can return more accurate search results.

However, even with indexed property set to true, searchability property of an attribute can be disabled by clearing the Searchable field selection in Commerce Manger.

Best Practices:
  • For developers: Set the indexed property of all attributes to true in the product.schema.xml file.
  • For merchandisers: Configure all facets as searchable in Commerce Manager.
  1. Navigate to the ep-commerce/commerce-engine/search/ep-search/src/main/resources/solrHome/cores/product/conf directory.
  2. In the product.schema.xml file, set the indexed property of the appropriate attributes to true.
    <field name="brand" type="string" indexed="true" multiValued="false"/commerce-legacy/>

    For example, to configure the optical zoom facet searchable for all camera products in the product catalog of a store:

    In the product.schema.xml file, enter the following settings:
    <field name="Optical Zoom" type="string" indexed="true" multiValued="false"/commerce-legacy/>
    With this setting, the Searchable field for the Optical Zoom facet is made available in Commerce Manger and merchandiser can set this facet searchable. With searchable Optical Zoom facet, when a shopper searches for Camera with zoom 50x, Solr returns only the cameras with 50x optical zoom.