More in this section

Forums / Developing with Sitefinity / Custom Search Index

Custom Search Index

4 posts, 1 answered
  1. Michael
    Michael avatar
    32 posts
    Registered:
    14 Jan 2010
    14 Jan 2010
    Link to this post
    Hello,

    I've had a look around for information regarding the creation of custom search indexes in Sitefinity CMS 3.6 and found quite a lot, including the search webinar which was helpful. So far I've created a custom search index that also searches for Events, within the site I'm working on. However theres 2 areas I'm struggling with as I'm not traditionally a web developer and only started working with Sitefinity on Tuesday so not yet familiar with the classes (i've been thrown in the deep end):

    1) On the custom search index I've created, I would like to include a control that allows the Events page where Events will be shown to be changed, pretty much exactly the same as what NewsIndex provides when you add it to a search Index. I haven't quite got my head around coding this yet so any pointers would be helpful.

    2) The main reason I've been told to create a custom search index is that our main site runs on Sitefinity, however we also have a seperate site providing information on courses and basically I need the search function on our main site to also be able to search for courses on this external site. Again just looking to be shown in the right direction or any help thats avaliable, or even whether this is acctually possible with the tools avaliable.

    Thank you.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Jan 2010
    Link to this post
    Hi Michael Gamlin,

    Thank you for using our services.

    1)
    You can take a look at the following blog post sampling the creation of a custom index provider for a Generic Content based module (such as the Events one): "Products" module - implementing search index . Since the two modules (the custom one and Events) share the same code base the principle is the same. First you should implement the Settings control where you will set the url (all steps are commented) then in the initialize event of your Events Index Provider you will get the selected url from the settings control.

    2) Sitefinity has the ability to add pages from other websites to your site map. Then the page indexer can index those page's meta data and paths, however it does not index their content. This means that you need to create your own indexing functionality. You can try to inherit from the built in page index provider and create classes inheriting from PageIndexProvider and PageIndexerInfo. Then you can override the PageIndexerInfo.GetExternalPageData(string resolvedUrl) to make the indexer read the html content of the page from passed url save it into a string and then return Encoding.GetBytes(string);

    You can also take a look at the notes from the webinar here: http://www.sitefinitywatch.com/notes/09-06-24/Working_with_Sitefinity_Search.aspx

    All the best,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Michael
    Michael avatar
    32 posts
    Registered:
    14 Jan 2010
    14 Jan 2010
    Link to this post
    Thanks for the quick response I'll let you know how I get on.
  4. Michael
    Michael avatar
    32 posts
    Registered:
    14 Jan 2010
    18 Jan 2010
    Link to this post

    *edit* This can be deleted I was able to find what I was mising

Register for webinar
4 posts, 1 answered