Gravatar for

Question by sholmesby, Jun 30, 2015 4:08 PM

Content Tagging: Search Facets not properly working with Mutlilist ComputedIndexField

I am attempting to setup something with Content Tagging, using the default Sitecore tag template, and the __Semantics field on content items, similar to this blog post:-

I found that my Tags were showing up:-

  • Tag1;Tag2 (3)
  • Tag1;Tag2;Tag3 (5)
  • Tag2;Tag3 (1)

Similar to this question:-

I tried implementing the config found on that answer (with 2 entries, one for fieldType, one for field), but because my tags are just Tag items (with no fields), I keep referencedfieldname="tagtitle" empty. i.e the tag items are the Sitecore default items, not custom ones I've created, and I tag content using the __semantics field, as described in the blog post at the top.

Now when I look at my search within Sitecore, I see my tags coming up with:-

  • Tag1 (2)
  • Tag2 (7)
  • Tag3 (1)
  • Tag1;Tag2 (3)
  • Tag1;Tag2;Tag3 (5)
  • Tag2;Tag3 (1)

So it's still not right, because the joint ones shouldn't be there, it should just have the individual tags.

Can anyone tell me what I'm doing wrong? I figure it's something with the computed index field, because there can be multiple tags on a content item, and I mustn't be properly tokenizing the __semantics field value.

1 Reply
Gravatar for

Answer by Simon, Jun 30, 2015 4:13 PM

The computed field for reference item will simply ensure that the right value is displayed, instead of the GUID. To set it as multi-value, you need to add the option on the newly created field. Find the AddFieldByFieldNameSection and add this declaration:

fieldType fieldName="[the name of your computed field]" isMultiValue="true" settingType="Coveo.Framework.Configuration.FieldConfiguration, Coveo.Framework" 

Then rebuild the index and it should show properly.

Gravatar for

Comment by sholmesby, Jun 30, 2015 4:42 PM

Thanks Simon, that worked. So this is for splitting the value (tokenizing):-

And this is for just computing the field, so we show the name instead of the Guid:- CustomCode.Indexing.TagsFacet, CustomCode

Ask a question