Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Seach results

Seach results

  • Oleg avatar

    Posted on May 28, 2009 (permalink)

    Hi.
     I have seach implemented on our website and have few issues with it functionality. First, it looks up in all html text. For xmpl, if I have web control with id 'google' on the page and if some one will search for 'google', results will include this page.
    So I need info how to set up search only for web pages content. Also I need to find code behind for search result control. Seems that the links for search results are broken(not all). I activated search for a few days on live website to let you see were is a problems ( I beleive no one will use search a lot for this moment:) www.aerosan.ie Could you advise so I can go and fix this. Thanks.

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on May 29, 2009 (permalink)

    Hello Oleg,

    Controls are indexed by PageIndex. When you have finished indexing a new xml file is generated under ~/App_Data/Search/Index_name_here/
    You should open the xml file generated and add some lines to it.

    Example

    <field name="hide" weight="-1" indexAttribute="" filterTag="div" filterAttributes="id:Main" /> 

    name = some name
    weight = -1 will not be indexed
    weight = 1 will be indexed
    filterTag = we are getting the div
    filterAttributes - we are getting the ID ot the div

    We are hiding all controls that are located in our holder.

    <div id="Main"><table id="ctl00_Content_ctl00_Control1" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;"

    To hide the control only
    filterTag="table"
    filterAttributes="ctl00_Content_ctl00_Control1"

    The templates for search results can be found at ~/Sitefinity/ControlTemplates/Search. There is no code behind. If you want to create a custom control or change the control functionality you can override
    Telerik.Search.WebControls.SearchResult.

    As for the problem with broken urls it could be caused if there are pages/links that you have removed and then you have not re index.

    I hope this helps.


    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity 3.x: Developing with Sitefinity > Seach results