Search widget does not enable searches inside content blocks - General Discussions - General Discussions - Progress Community
 General Discussions

Search widget does not enable searches inside content blocks

  • Search widget does not enable searches inside content blocks
  • I'm trying to use the sitefinity search widget but it doesn't work correctly.

    I've checked the "Static HTML in pages" option in search indexes page. I then reindexed it. The search result page doesn't display words which are in content blocks. Can you help me find a solution?

    Thank you

  • b4392abe-35b8-4553-85be-90e10bf82933_static2.zip
    Hi Orcun,

    Thanks for using Sitefinity.

     I am not able to replicate this on any version of Sitefinity.

    You can see a live demo here. Screenshots of the set up are attached.

    Are you calling any code that uses session variables? This causes search to break on those pages because the HTTPContext returns null to the indexer.

    All the best,
    Patrick Dunn
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • Hi Patrick,

    Thank you for reply. 

    We don't use any Session, ViewState or HttpContext parameters in code behind. We haven't found a solution yet.

    What else should I look out for?

  • Yes, i set all of them. Search widget is searching and displaying results in documents, user control, menu titles.

    Just problem is search widget doesn't search static html on content blocks in all of pages.

  • a7fb0087-4cb5-6f77-96ac-ff0000ae3c70_sf_search_widget.png

    Dear Orcun

    Might be dumb question, but on the search widget you did set which index to be used and were to display. 

    Markus

  • Hello Orcun,

    Can you please go to your App_Data/Sitefinity/Logs folder, and temporarily move/remove all generated logs (you might need to stop the worker process for this site as it puts a lock on some of the logs). Afterwards please reindex the search index that contains Static HTML on pages in its settings, and let us know if any logs have been generated.

    The most common reason for the experienced issues is that the pages cannot be rendered internally for indexing, as there's a control on them that throws an exception when the page is rendered in index mode (e.g. calls to SiteMapBase.getActualCurrentNode() or using Session).

    Greetings,
    Boyan Barnev
    the Telerik team

  • Hi Boyan,

    I have tried same as you mentioned above.But still its not able to search Static HTML on content blocks.No any Logs error occure.
    Could you please suggest me another solution?
  • Hi,

    Our suggestion is to try recreating the search index. Remove the search index, delete the search index folder from App_Data -> Sitefinity -> Search and finally recreate the search index again.

    If the problem still persist please open a support ticket and provide us with a link to your web site and backend credentials to investigate the problem deeply.

    Regards,
    Stefani Tacheva
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  • The problem is probably the problem I think I'm having now. I disable 'static' in the search index, but enable 'contentblock' thinking this will only search the content blocks in the pages and not the surrounding text (ie, template stuff). What I do to fix this (unfortunatly) is click 'share' on the content blocks to make them show up in the 'content blocks' under modules. 

    So, just curious, is this intended? It appears that only 'shared content blocks' are search and not content blocks in pages. If this is the case, change the option for the search index from 'content blocks' to 'shared content blocks'. or rename the content blocks that are in pages but not shared.... bit confusing. 

  • Hello,

    When you define Content Blocks scope to be indexed the search will index all content blocks that are created in the Content Blocks section which is available under Content and that are shared. This is the default behavior of Sitefinity.

    If you want to index the content of the content blocks that are dropped on a page and you have entered some html the only option is to select Static HTML in pages type of content which will be indexed, because the content blocks created on the pages are generic content widgets.

    1. Go to the backend of your project.
    2. Select Administration -> Search and Indexes.
    3. Open your search index and select Static HTML in pages in the Scope section.

    Regards,
    Stefani Tacheva
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • cc33511e-37c1-6deb-a958-ff0000446526_reindexerror.png

    Hi Stefani,

    I got the error of Object Refrences when reindex the Search index 

    plz reply as soon as possible