What is Parent-Child items Grouping?

Products on your ecommerce website have multiple variations based on their attributes.

For example, if we have color and size as the attributes for a furniture company, the users would search for any of these:

Chair, Wooden Chair, Steel Chair, Large Chair, Large Steel Chair


Here, we consider the item “Chair” to be the parent and others as children items depending on their attributes.

 

HawkSearch offers two solutions to address the search operation with this relationship among the products:

  1. Grouping based on parent id (group_id)

    This is the default solution provided by HawkSearch where the attributes of all children’s items are rolled-up to the parents. So when we search for any variation of the product, we get back the parent all the time.

  2. Variants logic

    This is a newer more flexible approach of establishing a parent-child relationship. Using this feature, we can ensure the search returns either the parent item or the children.

    With variants logic, we have more control over the resulting items.

    We can perform the following:

    1. Choose the best child for every item and display it, example if the child has a color attribute then the search term “red shoe” or if the color facet has a selection of red, the system will scan for and return all red products.

    2. Pull and display the facet counts of the variants while displaying the parent item.

    3. Pull and display the facet counts of the children.