Exculding Search indexing and results for mulitple sites on DXC


We have created multiple sites in Episerver for our build. 

The code is shared between all sites and is deployed to the DXC.

We would like to keep the search indexing and results to be exclusive within each site we have created. 

What is the best approach to take here as we seem to have only one Episerver find index. 

Currently our search results page is returning resuts from all sites as expected.


Kind regards


Jun 26, 2018 2:40

You can read more about it here. (https://world.episerver.com/forum/developer-forum/EPiServer-Search/Thread-Container/2018/6/filter-by-site-id-in-unified-search/)
We use FilterOnCurrentSite and put code like this in a InitializableModule

                .PublicSearchFilter(client => client.BuildFilter<PageData>()

                .PublicSearchFilter(client => client.BuildFilter<MediaData>()
Jun 26, 2018 8:19

Hi Henrik

Thanks for your reply. That seems to be working. However we seem to hav an issue with content files indexing. 

We have a couple of pdf files which are in the global blocks. These are referenced/linked only in our main site. 

The other sub sites do not use these. 

However in our subsites on a different domain we get these pdfs in the results. 

If there some thing more which we need to do so that only content which are referenced in a page are returened in the search results.

Kind regards


Jul 02, 2018 21:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.