Index external content

Sitefinity can index data items that are managed on external systems. 
For example, if you have blog posts, which are managed on an external system, by retrieving values of the posts' data fields, adding them to a search document, and updating the index, the blog posts are indexed in Sitefinity CMS.

The data content that you want to index must be compatible with Sitefinity CMS Search. This means that the fields that you want to participate in the index must be of type string, int, or DateTime.

To index external content in Sitefinity CMS indexes, you must create a search document for each indexed item and push it into the current Search Service implementation. When search documents are indexed, they are displayed in search results and search suggestions in Sitefinity CMS.

IMPORTANT: When creating the search document, ensure that it contains all the fields by which the search is performed. These fields correspond to the search field in the search result widget. For example, if you create a search result widget to search in Title and Content, then the search document you are creating must contain at least these two fields. For more information, see  Search results widget.

The following code demonstrates a creation of a search document, populated with a number fields, which is pushed into Sitefinity CMS index:

NOTE: The code provided in this article demonstrates  how to index external content and add it to an already existing Search index. Running it will create new index files if they are not present, but will not update Sitefinity configuration to add a new index.

 

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

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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?