More in this section

Forums / Developing with Sitefinity / Customizing Site Search

Customizing Site Search

4 posts, 0 answered
  1. Adam
    Adam avatar
    2 posts
    Registered:
    23 Sep 2007
    09 May 2008
    Link to this post
    We have a couple of external datasources that we want to incorporate into the site search and search results. What is the easiest way to do this?
  2. Nikola
    Nikola avatar
    51 posts
    Registered:
    24 Sep 2012
    13 May 2008
    Link to this post
    Hi Adam,

    Presuming that by datasources you mean an external data read by a custom control or module, the easiest way to index such content is using the built-in PageIndex.
    The website crawler will scan through all the pages included and index the data visualized at client pages as HTML.
    A disadvantage of such approach is the dynamically loaded paged data using server controls like GridView or custom paged result set because the crawler will index only the first page.

    Another much more complex approach is building Custom Index Provider that implements methods and logic for reading your data directly from the external datasource when indexed.

    More info on your scenario would help us to point you to the right solution.

    Let us know if there is anything else with could assist you with.

    All the best,
    Nikola
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    12 Dec 2008
    Link to this post
    Hi Nikola
     Let me describe my requirement

    In our project we have two categories of contents.

    for these two categories I created two custom modules and created two indexes.

    Here each category containig sub categories.I want to customize the search results in a way that grouping all items which belong to one sub-category under one headding .

    Is there any way to play with the search result data?

    I want full control over the search result data as I want to add my own styling and paging to the results.

    please help me to inplement this.
    Venkat
  4. valio b
    valio b avatar
    33 posts
    Registered:
    24 Sep 2012
    16 Dec 2008
    Link to this post
    Hi Venkat,

    Is there any way to play with the search result data?
    I want full control over the search result data as I want to add my own styling and paging to the results.

    Yes there is. You can make a call to one of the SearchManager.Search methods. This will give you back a collection of ResultItems. Now the problem comes when you need to modify the snippet appearance. Unfortunately there is not much you can do there and you will have to work with whatever is in the ResultItem.
    Paging you can handle as you find fit, just pass the correct parameters to the Search method.

    In terms of filtering/segmenting your search results, Sitefinity does not provide this out of the box. What you can try, though is looking into the url property of the ResultItem. This may give you some indication where this document/content belongs to. The later statement of course is subject to your site design and implementation.

    Hope that this would get you going!

    Regards,
    valio b
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered