Tenant Specific facets in coveo search page
We have multi tenant environment setup. In our search result page we are showing results of all the tenants. we want to have a facet in the page which will do filtering based on tenant name and show the tenant specific results.
Please let us know how we should approach this.
To do this, you need:
- A field on all your indexed documents that contains the tenant names.
- A bucket facet item for this field to make it facettable and available to select in your new facet component. (see Creating a Facet Component Based on a Field)
- If a Sitecore item can be in multiple tenants, the field needs to be configured as a multi-value facet field. (see Making a Sitecore Field Multi-Value)
- To insert a new facet component using that field in your search interface. (see Inserting and Customizing a Facet Component)
For #1, I would first check in your Coveo index/content browser for a field already containing the values you are looking to display in your facet. On my indexed documents, there is already a
fsiteXXXXX field which contains all the Sitecore sites able to serve the Sitecore item. However, it contains sites like coveoanalytics, coveorest, login, admin, service, scheduler, system, and publisher which you probably won't want to display in your facet.
If you don't find an existing field, you will need to create your own computed index field (see Implementing and Configuring a Computed Field in Your Index).