Gravatar for adam@borsi.ca

Question by Adam, Jul 14, 2015 9:54 AM

Is it possible to split comma delmited values into unique (i.e. groupable) values in a facet?

Greetings,

I'm attempting to create a catalog of sorts by having an Item contain multiple tags for a category.

Crude example, Type: Toy - Category: Action Figure, Model, Superhero

I want to be able to group each of the Categories in a unique list in order to filter my results.

Instead what I'm ending up with is…

  • Action Figure, Model, Superhero
  • Action Figure
  • Video Game, FPS

I came across this article (https://answers.coveo.com/questions/1437/facet-values-containing-a-comma-are-being-split-into-two-list-items) while writing this one, but i'm having the opposite effect here.

I'm utilizing CES 7 on a Sitecore 6.5 system and because my "categories" sit in a MultiSelect type field (which CES apprently doesn't read out of the box) I've initially opted to create a custom meta tag in my HTML output to bring in the info.

Is there any way I can split this into unique values in a facet?

To have an end result of - from the example above:

  • Action Figure
  • Model
  • Superhero
  • Video Game
  • FPS

All help and assistance is greatly appreciated.

Thank you kindly,

Adam

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Jul 14, 2015 12:23 PM

In CES, multi-value fields are usually separated by a semi-colon character (;). The separation character is system wide.

You simply need to separate your values with a semi-colon in your meta tag and remove the spaces between the values. Then, configure your categories field to be a "multi-value facet" in the fields set. Then, rebuild your source and you will have each value separated in your facet.

Gravatar for adam@borsi.ca

Comment by Adam, Jul 14, 2015 4:26 PM

Hi jflheureux,

Brilliant! That worked perfectly.

Thank you kindly,

Adam

Ask a question