Grouping products that share the same basic set of attributes can help you improve your search results.

Say you have these items in your feed:

PLAIN round-neck t-shirt (size: S, colour: blue)

PLAIN round-neck t-shirt (size: M, colour: blue)

PLAIN round-neck t-shirt (size: L, colour: grey)

These are indeed three different products, and when looking for “round-neck t-shirts”, the three would show up in the search results:

However, you may prefer the user to obtain just one PLAIN round-neck t-shirt search results with all three variants: the grey and blue colours and the L and S sizes, available in the facets panel of your search results.

This way, when the user looks for a “round-neck t-shirt, only one “PLAIN round-neck t-shirt” result is shown, but “blue” and “grey” colours and “S”, “M” sizes are available at the facets panel.

Using Doofinder, you can set this up in the following simple steps:

  1. Select the checkbox for ‘Group variants as a single item’ as found under Configuration > indices > indexing options of Doofinder’s admin panel.
  2. Ensure the products you want to be grouped share the same item_group_id field in your data feed.

You’re good to go!

Alternatively, you may use the de-facto standard by Google from the data feed: the item group id. Through this, all items with the same item_group_id attribute are considered variants of the same item.

Consequently, when you check the “group products by item_group_id”, all products that share the same item_group_id attribute are displayed as one product only in the search results. Still, all their variants (like colour or size), if defined as facets, are displayed in the facets panel.

Follow the leader! Marking an item as the “group leader.”

If there’s an item with the field df_group_leader set to either “true”, “t”, “1” or “y”, that item will be chosen as the group representative in search results (if there are no other relevant sort criteria involved).

Note: If you’re using the API, you need to set a pure boolean value for df_group_leader, either true or false.

Lastly, the field name could be in two formats:

Text Format

  • Grouping items: For product type feeds, you can use both item group id, item_group_id or group_id. The latter will work for every datatype (not just the “product” datatype).
  • Marking an item as the group leader: You use the df_group_leader field.

or

XML Format

  • Grouping items: For product type feeds, You can go with <g:item_group_id> or <item_group_id> or even <group_id>. The latter will work for every datatype (not just the “product” datatype).
  • Marking an item as the group leader: You need to use df_group_leader.

Below you can download some examples to see how it works.

Should you encounter any problems, please contact support@doofinder.com

Last Updated: June, 2021