Try Now
More in this section

Forums / Suggestions / Stop multiple NewsView listings in Search Results

Stop multiple NewsView listings in Search Results

3 posts, 0 answered
  1. Phil C
    Phil C avatar
    28 posts
    06 Sep 2012
    22 Feb 2009
    Link to this post
    Search Indexing is great, but even when applying to chosen pages only, I can't see any way to stop a NewView listing in a sidebar returning search results when you need to index that page's main content only.

    If the NewsView Listing points to the full News page, what's the point in returning links to the NewsView listing pages? Especially as there will probably be more than one (ie. repeated in sidebars). Unfortunately, you can't stop any listing appearing in the Search Results, so you end up with multiples of the same news items, which is very messy (even with only 2 of effectively the same item).

    It looks like what is required is a flag on the NewsView which stops it being Indexed. Then you can allow it on any main News pages, not merely sidebar/preview listings.

    Maybe I am missing a setting, but I don't think so, so can you consider it as an urgent suggestion, as it's a pretty serious flaw in the Search Indexing for News (one of the key features for a CMS after all) and seriously constraints the site design functions. Cheers, Phil.
  2. Parvan
    Parvan avatar
    151 posts
    24 Sep 2012
    25 Feb 2009
    Link to this post
    Hello Phil C,

    Thank you for contacting us.

    If you are using only a PageIndex and you want it to search only in specific part of the page(specific placeholder for example) you can customize the search behavior using the file located at
    ~[your site]/App_Data/Search/[your pageindex name]/filedsInfoProvider.xml.

    In your case, you do not want the sidebar to be indexed.
    The Side bar is defined in your master page like this:
    <div id="SideBar"
    <asp:contentplaceholder id="SideBarContent" runat="server"></asp:contentplaceholder></div>     
    To stop the sidebar from being indexed,you need to add this line in file located at:

    ~[your site]/App_Data/Search/[your pageindex name]/filedsInfoProvider.xml:
    <?xml version="1.0" encoding="utf-8"?> 
      <field name="title" weight="1" indexAttribute="" filterTag="title" filterAttributes="" /> 
      <field name="keywords" weight="1" indexAttribute="content" filterTag="meta" filterAttributes="name:keywords;" /> 
      <field name="description" weight="1" indexAttribute="content" filterTag="meta" filterAttributes="name:description;" /> 
      <field name="script" weight="-1" indexAttribute="" filterTag="script" filterAttributes="" /> 
      <field name="style" weight="-1" indexAttribute="" filterTag="style" filterAttributes="" /> 
      <field name="noIndex" weight="-1" indexAttribute="" filterTag="div" filterAttributes="id:SideBar" /> 
    Note that we set the filterTag="div",filterAttributes="id:SideBar", weight="-1". This will exclude(because of the attribute weight="-1") the div which has attribute id="SideBar" from the indexing.

    More information and solutions about settings of the fieldsInfoProvider.xml can be found here:

    Hope this information will help you.

    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.
  3. Phil C
    Phil C avatar
    28 posts
    06 Sep 2012
    03 Mar 2009
    Link to this post
    Thanks Parvan, great - didn't realise the indexing had such configuration - well thought out (useful post link too, glad am not the only one!). Changed id to class eg. 




    and it works perfectly (stops indexing the extra repeated content), what a relief, cool!

    Keep up the good work! Cheers, Phil.


Register for webinar
3 posts, 0 answered