--- title: About the coveoResolveItemSite pipeline slug: '2560' canonical_url: https://docs.coveo.com/en/2560/ collection: coveo-for-sitecore-v5 source_format: adoc --- # About the coveoResolveItemSite pipeline This pipeline uses the `Coveo.SearchProvider.Pipelines.CoveoResolveItemsSiteArgs` class and is used to resolve an item's site at indexing time. The pipeline is invoked when computing an item clickable URI value. At indexing time, the site in the Sitecore context can't be used because Sitecore resolves the site based on the URL used by the web browser to access the website. Usually, it would target the `shell` site. |=== | Name | Type | Description | Item | `Coveo.Framework.Items.IItem` | The Sitecore item that's being indexed. | ResolvedSiteName | `System.String` | The name of the Sitecore site that has been resolved. When the pipeline ends, the value of this property is used to compute the item clickable URI. When `ResolvedSiteName` is set to `null`, the default Sitecore site is used to compute the URI. |=== ## Configuration In the `Coveo.SearchProvider.config` file, you can add your processor using the arguments under the `coveoResolveItemSite` element in the `Coveo.SearchProvider.Custom.config` file. To do so, copy the `coveoResolveItemSite` node from the `Coveo.SearchProvider.config` file, and paste it into your `Coveo.SearchProvider.Custom.config` file, under pipelines. > **Important** > > Don't modify the `Coveo.SearchProvider.config` file directly, as doing so may result in unforeseen upgrading issues. By default, the `ResolveItemSiteProcessor` is enabled and will resolve to the first site that contains the item being indexed. ## About the ResolveItemSiteProcessor processor This processor is responsible for resolving the site of a specific item. It's particularly useful when dealing with many sites. The work performed by this processor is straightforward: . It scans the list of configured Sitecore sites. . For each site, it checks whether the site name is excluded or not. In a clean install of Sitecore, all sites are excluded except the `website` one. . It then checks if the item being indexed is located under the site Home item. If the answer is `true`, then the item site is resolved. Otherwise, it continues to the next site. ### Extension points To customize the behavior, remove or replace this processor. It's also possible to inherit from the `Coveo.SearchProvider.Processors.ResolveItemSiteProcessor` class to take advantage of its extension points. You can override these methods to tailor the processor to your needs. #### GetExcludedSiteNames [source,c#] ``` IEnumerable GetExcludedSiteNames() ``` It returns the list of sites that are excluded from the site resolution process. #### IsItemInSite [source,c#] ``` bool IsItemInSite(ISiteInfo p_SiteInfo, IItem p_Item) ``` Using the site configuration and the item being indexed, it checks if the item resides in the site. #### ResolveItemSite [source,c#] ``` string ResolveItemSite(IItem p_Item) ``` This method wraps the whole site resolution process. It's responsible for calling both the `GetExcludedSiteNames` and `IsItemInSite` methods. You may want to override this method to implement a custom fallback strategy. However, you can also add your own custom processor to the pipeline to achieve the same result.