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

Forums / Developing with Sitefinity / Site Search Not Working

Site Search Not Working

15 posts, 0 answered
  1. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    14 Sep 2010
    Link to this post
    Hi,

    I'm using a search box on all pages of my site, using an index that includes an all page index, and a blog index.
    Set to auto index, and not to include non-public pages.

    However when I go to use the search it only returns results from blogs, and doesn't show regular pages.
    If i remove the blogs index it returns no results when i search.

    The Results page and search index specified on the search box control is correct, and set to search any words.

    Is there something I am not setting on the pages? or is there something that needs adding to the page templates?

    Thanks,
    Paul
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Sep 2010
    Link to this post
    Hi Paul N,

    Most probably you have a control or some code in your master page or regular page which stops the crawlers. This could be some logic that uses session or any authentication code where you have not escaped search crawler request. You could try creating a new master page without any controls on it. Then create a page and drop GenericContent control on it and type some text in its content area. Run the index and perform search using newly created index.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    14 Sep 2010
    Link to this post
    Hi Ivan Dimitrov,

    I created a new page with a new template and created a new index for the whole site, but the page is still not showing in the search.

    The template for blogs is very similar to the rest of the site templates, so it is strange that it is indexing the blogs but not the other pages.

    The .master page was very basic, and it still didnt index, so its probably not the template.

    Thanks.
    Paul
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Sep 2010
    Link to this post
    Hi Paul N,

    Thank you for getting back to us.

    The indexers for Generic Content based modules such as Blogs and News do not go to your blog page and get the data to be indexed from there. This is one of the differences with the page indexed. The blog index gets the blog posts it has to index directly from the blogs module - this is why it is correctly indexing your blog posts.

    The page indexer on the other hand either indexes all of your pages or a subset of pages located under a specified parent page. Please note that unless specified the indexer will not index non-public pages (pages with permission restrictions) unless specified to, you can refer to attached image.

    Please let us know what kind of controls you have added to your pages. Do you have custom controls or user controls which are not part of the built-in controls?

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    14 Sep 2010
    Link to this post
    Hi Radoslav Georgiev,

    The search index is currently set to not include private pages, but that shouldnt effect public pages.

    The master page i created has nothing on it but 1 content region, and the page using the template in sitefinity has one generic content control on it. But after reindexing the site, i tried searching for the page and got no results.

    Thanks,
    Paul
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Sep 2010
    Link to this post
    Hi Paul N,

    The reasons for not getting an results from the index could be

    1. Some control inside your pages
    2. Index is not set and your pages do not get indexed- Index this page is false for your pages
    3. You have modified fieldsInfoProvider.xml in a way that data is not added to Lucene segment files.

    You could check the error log in App_Data to see if there are any related errors. If the problem persists you could send a sample project and its database, so we could see what is going wrong.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    14 Sep 2010
    Link to this post
    Hi Ivan Dimitrov,

    I don't think it would be 1 or 2, as i tested a page with no controls on it other than generic content, and it still didn't work. And all pages that i want indexed have the Index this page radio button set to yes. 

    I havent edited fieldsinfoProvider.xml, but i've added the code from the file below incase you think theres something in there thats wrong.

    <?xml version="1.0" encoding="utf-8"?>
    <fields>
      <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="" />
    </fields>

    If you have any other ideas, please let me know

    Thanks,
    Paul
  8. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    29 Sep 2010
    Link to this post
    Hi again,

    On top of that previous issue which still needs resolving, when you search for something, and a blog result is display, at the end of the "snippet" it has "1/09/2010 12:00:00 a.m. 00000000-0000-0000-0000-000000000000 546..." - it seems like it is pulling the publication date, view count, author etc.. and displaying it at the end of the snippet. However as you can see it doesnt look very good. Is there a way to not pull through these values to the search results, OR, how can i change the "0000000-0000-0000-0000-000000000000" to be something meaningful, as I cannot even see what it is meant to be.

    Thanks,
    Paul Nieuwelaar
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Sep 2010
    Link to this post
    Hi Paul,

    This "00000000-0000-0000-0000-000000000000" is an empty Guid. By default the ContentIndex gets all metakeys and content of the IContent object.You could have these values somewhere in your post or you are searching for a metakey like author or date that matches. Actually the empty guid comes from the BlogID metakey. You can easily remove the date and guid value by setting searchable attribute of Publication_Date and BlogID metakeys to false

    <add key="Blogs.Publication_Date" valueType="DateTime" visible="True" searchable="False" sortable="True" defaultValue="#Now"/>
    <add key="Blogs.BlogID" valueType="Guid" visible="False" searchable="False" sortable="False" defaultValue=""/>


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    29 Sep 2010
    Link to this post
    Hi Ivan Dimitrov,

    Thanks for the reply.

    Would you please be able to tell me where to make that change in code?

    I opened up the SearchResults.ascx to try and find that snippet of code, but it did not exist so i guess it is meant to be changed in a different file.

    Thanks,
    Paul
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Sep 2010
    Link to this post
    Hello Paul,

    These are metakeys defined in your web.config <metaFields> section. After you set searchable attribute to false you have to recreate your index.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    12 Oct 2010
    Link to this post
    Hi Ivan,

    Thanks for that snippet, that has removed the guid from the search results. However the search is still only displaying results from the blogs. I've tried creating a new page, and it shows that it has indexed the new page, but I just can't find it in the search results.

    I removed the blogs source from the search index details, and it shows that there are 134 pages indexed. They just do not display any results in the search.

    Once again I tried creating a template with nothing but a single generic content, and it still has not indexed that page either.

    Regards,
    Paul
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    12 Oct 2010
    Link to this post
    Hi Paul,

    The index is stopped form another page an the newly one is not indexed or you have something on the page.

    I am not able to reproduce this issue and it is not possible that the index does not work in the scenario you are describing. If you want you can open a support request and send me a sample project where I can see the issue - content of GenericCotent ( simple text like "Hello there") is not indexed when you index this page.

    The support system allows attachments with file size up to 20 MB. If you feel more comfortable using the forums you can provide me with an external link from where I could download the project and set it up locally.


    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. Paul N
    Paul N avatar
    55 posts
    Registered:
    24 Apr 2010
    12 Oct 2010
    Link to this post
    Hi Ivan,

    How would I go about creating a sample project of my site to send you?

    Thanks,
    Paul
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    12 Oct 2010
    Link to this post
    Hello Paul,

    Backup the database and zip the project files of the current website or create a new sample project where you are able to reproduce this issue.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
15 posts, 0 answered