Gravatar for

Question by sandyfoley, Mar 10, 2016 10:36 AM

Is GroupBy functionality out of the box (Coveo for Sitecore 7+)?

We are trying to do minimal programming for the sake of our client's budget so we are using out-of-the-box Coveo for Sitecore functionality. However, the client has the need to group the search results.

For instance, if the user is searching for a new car at multiple dealerships, the search results would group the result cars by dealership with a description (name, address, image) of each dealership separating each set of cars.

Is this OOTB functionality or will it require extensive programming?

Thank you.

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Mar 10, 2016 11:13 AM

Hi Sandy,

The Coveo Enterprise Search index used by Coveo for Sitecore is able to group search results. This feature is available through the Coveo JavaScript Search Framework also used by Coveo for Sitecore. However, Coveo for Sitecore doesn't have a UI to configure search results grouping for content editors. The configuration requires a mix of HTML, Sitecore computed index fields, and maybe Sitecore processors and JavaScript code.

If I understand correctly, you would want results displayed like this:

Dealership 1
  | - Car 1
  | - Car 2
Dealership 2
  | - Car 1
  | - Car 3

Depending on your Sitecore item structure, you will probably have to write a few Sitecore computed index field classes to have the right field values in the index for the car documents and the dealership documents. You might also have to write one pipeline processor if your car items appear only once in your content tree. The goal would be to have each car indexed as many time as there are dealerships selling it. Of course you need to index the dealership items as well.

Then, with the help of the Coveo JavaScript Search Framework Folding and ResultFolding components, you will be able to define the common field, child field, and parent field between dealership and car search results and display the search results in groups.

I hope this helps. Do not hesitate to ask for clarification or other questions.


Gravatar for

Comment by sandyfoley, Mar 10, 2016 11:16 AM

Thanks Jeff! This is very informative and helps out alot. I appreciate the quick answer. FYI, each car would be unique to the dealership (at the VIN level). Thanks so much!

Ask a question