1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Blogs appearing in search even after blog index was removed

Blogs appearing in search even after blog index was removed

6 posts, 0 answered
  1. Annie
    Annie avatar
    46 posts
    Registered:
    11 Aug 2012
    05 Nov 2009
    Link to this post
    Hi,

    How do I prevent the blogs from showing up in search? we removed the blog index but the blogs are still appearing in the search, is there any way to prevent the blogs from getting indexed?

    Thanks,
    Annie
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Nov 2009
    Link to this post
    Hi Annie,

    Most probably you are seeing the results from the PageIndex now. I will explain how the PageIndexing works.

    When you start the Page Indexers, the crawler spiders through the pages and extracts the text from them. If you have a BlogPost control on a given page, which shows the list of the posts, then this text will make it to the index. The difference between the PageIndex and the BlogIndex is that the crawlers spiders the pages in the first case, and the blog posts (which might not exist on any page) in the second case. 

    Here is the workaround that you could use. Go to ~/App_Data/Serarch/<yourindexname>/fieldsInfoProvider.xml and edit the xml file so that you tell the search not to index content contained between div tags with class names responding to the ones for the blogs:
    <?xml version="1.0" encoding="utf-8"?>
    <fields>
    ...
       <field name="blogsUL" weight="-1" indexAttribute="" filterTag="ul" filterAttributes="class:sf_postListing"/>
       <field name="blogDiv" weight="-1" indexAttribute="" filterTag="div" filterAttributes="class:sf_singlePost"/>
       <field name="commentDiv" weight="-1" indexAttribute="" filterTag="div" filterAttributes="class:sf_postComments"/>
    </fields>

    Save the file and run the index so that it re indexes your website. This should do the trick.

    Kind regards,
    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.
  3. Annie
    Annie avatar
    46 posts
    Registered:
    11 Aug 2012
    05 Nov 2009
    Link to this post
    Hi,

    In the fix provided what is the purpose of the weight field?


    <
    field name="blogsUL" weight="-1" indexAttribute="" filterTag="ul" filterAttributes="class:sf_postListing"/>
    <
    field name="blogDiv" weight="-1" indexAttribute="" filterTag="div" filterAttributes="class:sf_singlePost"/>

     

    <

    field name="commentDiv" weight="-1" indexAttribute="" filterTag="div" filterAttributes="class:sf_postComments"/>

    Thanks,
    Annie

     

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Nov 2009
    Link to this post
    Hello Annie,

    Thank you for getting back to us.

    The purpose of the weight field is to assign importance of each field to the search results. If set to -1 this means that those fields will not be indexed. You can assign different integer values. For more information, please take a look at the following webinar for more information - Working with Sitefinity Search

    Kind regards,
    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.
  5. Annie
    Annie avatar
    46 posts
    Registered:
    11 Aug 2012
    05 Nov 2009
    Link to this post

    Hi,

    Thanks for the fix..if I wanted to make the blogs appear last in a search, what wieght would I assign the blogs?

    Thanks,
    Annie

  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Nov 2009
    Link to this post
    Hello Annie,

    You should assign values close to 0 if you want them to appear in the bottom of the search results. The lesser weight you assign the less important it is considered by the search (-1 means no indexing). I should correct my self from previous post it does not only take integer values. It works with decimal values too. It is all explained in the webinar I have linked in my previous post.

    Kind regards,
    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.
Register for webinar
6 posts, 0 answered