Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problems with Site Search

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 979 Views
  • nomen
    Avatar
    Community Member
    52 Posts

    Problems with Site Search Link to this post

    Hi all:

    I have built the search function following the instructions in 4-site-search
    But there are some problems:

    1) The content is saved by TinyMCE using HTML. The main language is spanish, so if i want to found comisión the content with the word comisión is not finded.

    2) To solve this I decided to change the code in sapphire/search/SearchForm.php in function getResults from

       $keywords = $_REQUEST['Search'];

    to

    $keywords = $_REQUEST['Search']; $keywords .= " OR " . htmlentities($keywords);

    with the idea to search twice. Now it searches in content... but also searched in sites where is not tha word :-D. It also searches in files (and i don´t know how it does it) and gives me as result, but the word is not in...

    3) If i try to search when i am not in the main language in the site, it gives me an error... I have solved this with this pacth.

    4) The problem now is that the seach only finds in the main site language (SiteTree_Live). If I write content in a second language and I try to find it, it does not find it. I think that the correct behaviour should be to search the content in the current language.

    If this problem only mine? The search is not tested in SS?
    Thanks in advance.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Problems with Site Search Link to this post

    Hi nomen,

    The search system has been tested a fair bit, but I think that the issues that you're having are related to the use of search specifically with multilingual sites.

    It sounds like this issue - http://open.silverstripe.com/ticket/2267 - is related to your problem. If you add your email address to the CC field of the ticket, you will be notified when we fix it.

    Also, the change you made to get the é being searched for is probably causing problems. Rather than editing $keywords, you should try making a patch in the searchEngine() method to fix this.

    979 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.