One requirement that I have seen when implementing search pages with Coveo is to add filters to the search results based media type, i.e. show only pdf files, or docx files, etc. To do that you need to work with facets. Here are 5 steps you can take to add a facet filter to your search results page. You can also reffer to Coveo’s documentation on how to add facets to search pages here.
- Make sure there is content in the media library. If you don’t have just upload a few docx documents, images and pdfs as in this example
2. Rebuild the Coveo indexes.
3. Using the Experience Editor open the Coveo search results page
4. On the left hand side click the “Add here” button and add a Coveo Facet View component than click Ok.
5. A pop-up will show to configure the properties of the facet component. Add a title on the field “Title” and on the field “Field” select from the dropdown “File Type” and click ok.
That’s it. Now you can interact with the facet component and filter the content of the search results page based on media type: