Jump to:

2002 Posts in 1422 Topics by 616 members

Form Questions

SilverStripe Forums » Form Questions » [Solved] SearchForm doesn't always work.

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

Page: 1
Go to End
Author Topic: 944 Views
  • _Vince
    Avatar
    Community Member
    158 Posts

    [Solved] SearchForm doesn't always work. Link to this post

    Having an odd problem.

    A customer has a site with a SearchForm. The search finds pages containing the word "tax" but cannot find the words "GST" and "FBT", which are on the same page.

    I'm totally stumped.

    Why is this happening and, more importantly, how do I fix it? :?

  • _Vince
    Avatar
    Community Member
    158 Posts

    Re: [Solved] SearchForm doesn't always work. Link to this post

    *bump*

    I have tried creating a page that contains the words "FBT GST blah blah blah Hutt" and the SearchForm finds "blah" and "Hutt" but it doesn't find "FBT" or GST".

    Any ideas? Anyone? I am having the same problem with SS 2.4.3 and 2.4.5

  • _Vince
    Avatar
    Community Member
    158 Posts

    Re: [Solved] SearchForm doesn't always work. Link to this post

    Ok, sorted.

    There's a MySQL parameter called ft_min_word_len that defines the smallest word it on which the database will do a full text search.

    I edited /etc/mysql/my.cnf adding the line

    set-variable = ft_min_word_len=3

    retarted the MySQL service and now it finds "GST" and "FBT" without problems.

    944 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.