Gravatar for anweshadastider@gmail.com

Question by anwesha, Nov 17, 2016 5:49 AM

How to add language facet for YouTube vidoeos?

Hi,

I have documents and videos coming up in my search page. The documents are coming from Sitecore and the videos are coming from YouTube. I have a computed field for the documents to get their language from a field in each document. I want to create the same field for my YouTube videos which will be populated with the language in them.

Using this field i want to create a facet that will enable filtering by language for both my documents and videos.

Thanks in advance!

Gravatar for anweshadastider@gmail.com

Comment by anwesha, Nov 17, 2016 6:20 AM

I was trying to create a custom field for YT videos, name that field as the same as the document language field and copy the value from the videos @syslanguage field. But I am unable to do that. Please help!

1 Reply
Gravatar for sbelzile@coveo.com

Answer by Sébastien Belzile, Nov 17, 2016 8:22 AM

You cannot use the syslanguage field directly?

If you use Coveo Cloud:

  1. You have to declare your Sitecore computed field as external, to prevent the hash from being added to your field definition.
  2. Declare this field as facetable IN SITECORE.
  3. On the Youtube source, you need to had a mapping from the field "language" to your field.

If you use CES 7:

  1. You have to declare your Sitecore computed field as external, to prevent the hash from being added to your field definition.
  2. Declare this field as facetable IN SITECORE.
  3. Once your field has been added to your Sitecore source field set, add it to your youtube field set as well, with the same configuration.
  4. On the Youtube source, you need to had a mapping from the field "language" to your field (Search for "mapping file" on the online help if you don't know what I'm talking about).

Feel free to ask other questions if you want more details about the different steps.

Gravatar for amoreau@coveo.com

Comment by amoreau, Nov 17, 2016 8:25 AM

I think you may find this documentation of help: https://developers.coveo.com/display/SitecoreV4/Using+External+Content+in+Sitecore+Facets

It uses a different example, but I think you could adapt it to your situation.

Ask a question