Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » "about us" not shown in search

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 666 Views
  • pipworks
    Avatar
    Community Member
    10 Posts

    "about us" not shown in search Link to this post

    Hi, I've got a very weird problem on my latest SS build.

    I have a search on the site, the built in one, I'm running version 2.4.5 and the search is activated in the config file with the following:

    FulltextSearchable::enable(array('SiteTree'));

    And 99.9% of it works, but I have a page titled "About Us" that doesn't get found if I search for "about", "us" or "about us".

    If I leave the search blank, (returning all found pages), it's there, so it is indexed.

    On the "Behavior" tab I have "Show in search?" checked.

    On the Metadata tab, the url is "about-us" the title is "About Us", the keywords are "about us", the description has about us in it.

    On Main tab, the page name is "About Us" and the Navigation label is "About Us"

    So there's definitely enough matches there, I can assume "us" is too short for a search as if I remember correctly the default word length on mysql is 3 or 4, but about should return something.

    The page is published and even child pages under about us are returned in the search.

    Anyone have any ideas as to what else I can do to make it find that page?

    Thanks

  • pipworks
    Avatar
    Community Member
    10 Posts

    Re: "about us" not shown in search Link to this post

    I've just had a look through the community showcase and found a couple of other sites with search facility, and that have about us sections, and they don't come up on a search either.

    Maybe it's an SS bug?

  • pipworks
    Avatar
    Community Member
    10 Posts

    Re: "about us" not shown in search Link to this post

    Hmmm, seems it is an SS bug, I've just created a new local site from a fresh SS install and created an about us page and enabled search.

    Searching for home works, searching for about us returns nothing.

    I deleted about us and created a new page called "test page" and that works in the search, I then renamed test page to about us, and nothing comes up in the search after the change.

    At least I know why it's not finding it now. Not much I can do about it though.

    Thought it worth posting my findings in case anyone else discovers this, or even better finds a solution.

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: "about us" not shown in search Link to this post

    This isn't a SilverStripe bug - I'm guessing you're using MySQL. Both "about" and "us" appear in the default stopwords list, so searches for them will be ignored. If you want a more reliable search solution you'll probably want to use sphinx, solr or zend lucene but these are more involved to get running.

  • pipworks
    Avatar
    Community Member
    10 Posts

    Re: "about us" not shown in search Link to this post

    Oh ok, yes I am using MySQL, didn't know about stopwords, thanks for the explanation.

  • v.ivanov
    Avatar
    Community Member
    2 Posts

    Re: "about us" not shown in search Link to this post

    It's an old topic but I have a similar problem.

    Using SilverStripe CMS v3.0.5.

    If I have a page with Title "Hello World", than searching for "Hello" returns no results, but "World" works fine.

    Is this again a MySQL configuration problem or...?

    Thank you.

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: "about us" not shown in search Link to this post

    For everyone that's interested: see the full list:

    http://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html

    (or check out your version of mysql)

  • v.ivanov
    Avatar
    Community Member
    2 Posts

    Re: "about us" not shown in search Link to this post

    That explains a lot .
    Thank you for the quick reply.

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