Gravatar for diego.moretto@xcentium.com

Question by Diego, Aug 31, 2016 4:53 PM

Video facet component doesn't exist. what to do?

Hi folks

I am trying to build a custom facet component. This component is a video library category list. so each video will be tagged with a category and I want to be able to add using this component an instance for each category on the search results page. Since the categories are facets I will be able to search through the facets. I have read this link https://developers.coveo.com/display/public/JsSearchV1/Implementing+a+Custom+Component

but in my case I have a ordened list where I need to be able to render video title, description, etc. an d I'm not really sure how I will build this. In this link there is an example for a searchbox. Have anyone done anything like this or know how to build an ordened list with multiple information I need to render coming from the search results?

thanks

1 Reply
Gravatar for flguillemette@coveo.com

Answer by François Lachance-Guillemette, Sep 1, 2016 8:27 AM

I think you are mixing up two different concepts here.

The facet component is the component applying filters to a Coveo search page. You can have multiple facets, every one of them referring a field from your documents (your videos, in your case) More details here

The search results section is where the results from the query are displayed, based on the filters from the facets and the text entered in the query box. More details here

There is no such thing as a "Video Facet Component" because facets use fields from documents to give you filters. You should have a field on your documents that contain the category it belongs to (say, @videocategory). Your facet could then use this field to let the user filter by category.

You can then use a custom result template to render your video using the title, description or other fields from your documents, modeled exactly the way you want it to look. (See here for the Result Templates documentation or here for Coveo for Sitecore-specific topics)

Ask a question