Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

"about us" not shown in search


Reply

8 Posts   693 Views

Avatar
pipworks

28 April 2011 at 5:07am Community Member, 10 Posts

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

Avatar
pipworks

28 April 2011 at 8:44pm Community Member, 10 Posts

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?

Avatar
pipworks

28 April 2011 at 8:54pm Community Member, 10 Posts

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.

Avatar
ajshort

28 April 2011 at 11:10pm Community Member, 244 Posts

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.

Avatar
pipworks

28 April 2011 at 11:27pm Community Member, 10 Posts

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

Avatar
v.ivanov

8 August 2013 at 9:20pm Community Member, 2 Posts

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.

Avatar
martimiz

8 August 2013 at 10:47pm Forum Moderator, 1091 Posts

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)

Avatar
v.ivanov

8 August 2013 at 10:57pm Community Member, 2 Posts

That explains a lot :-).
Thank you for the quick reply.