Site search with the ASP.NET Core Renderer


There are two main strategies that you can use to index a site built with the ASP.NET Renderer:

  • External search
  • Sitefinity search

External search

You can implement external third-party search engines to periodically index your Sitefinity site. These search engines provide their own API for querying that search index. You can leverage that API to build custom search box and search results widgets, which you can place on your ASP.NET Core pages. 

EXAMPLE: Examples of such search engines include:

Sitefinity search 

Sitefinity ASP.NET Core Renderer is integrated with the Sitefinity Search service. 
For more information, see Site search.

The ASP.NET Core Renderer page editor, provides the following search widgets: 

You use these widgets to create the search capabilities on your ASP.NET Core pages. You need to place the widgets on the corresponding pages and configure them to work with the desired search index in the CMS. 
For more information, see Compare search services.

Index MVC vs. ASP.NET Core pages 

Sitefinity CMS search indexes content and pages. Indexing MVC pages works like an external search engine. This means that the entire output HTML is scanned and indexed. This is possible, because the pages are executed and indexed in the memory, and because they are rendered inside the CMS, they can be invoked in-process.

The ASP.NET Core Renderer is different, because it is not part of the running CMS process, and the output HTML cannot be accessed. Therefore, the Renderer provides the ability to index individual properties from your widget entity.

Implement indexing

You must decorate the widget properties that you want to index with a special attribute – [ContentContainer]

This attribute is also used on the Content block widget to allow its content to be indexed by the Sitefinity search index. This is possible, because the property value is stored in the CMS and the CMS can index it. 

RECOMMENDATION: Sitefinity CMS indexes the raw value of the property and does not know of any modifications to it that are done by the Renderer. Therefore, we recommend rendering the property value, which holds the content to be indexed, without additional processing. 

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?