Search category trees - Bloomreach Experience - Open Source CMS

Search category trees

Category organization

Some category organizations are flat, meaning that there's just one level. Other category organizations are hierarchical, meaning that there are top categories, subcategories, and leaf categories.

In the following example, apparel is the top category, women is the subcategory, and dresses and skirts are leaf categories:

apparel (ID cat11287000)

women (ID cat11287001)

dresses (ID cat112871001)

skirts (ID cat112872001)

Category searches use category IDs rather than the user-friendly names that your customers see in their browsers. For example, if the category, apparel, has the ID, cat11287000, then here's what the &q parameter of a category search for apparel looks like:

&q=cat11287000

If your feed doesn't pass category IDs, then Commerce Categories creates them for you, based on the individual nodes in the category breadcrumb. Let's say that the apparel example doesn't include category IDs. Without the IDs, Commerce Categories sets the ID for skirts as apparelwomenskirts (apparel > women > skirts).

 

Search category trees

You can search through category trees. In the following example, apparel is the top category, women is the subcategory, and dresses and skirts are leaf categories:

apparel (ID cat11287000)

women (ID cat11287001)

dresses (ID cat112871001)

 skirts (ID cat112872001)

  The following snippet searches the skirts category:

Search the skirts category snippet

q=cat11287000
&fq=category:cat11287001 AND cat112872001

 

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?