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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

"about us" not shown in search


Go to End


8 Posts   1359 Views

Avatar
pipworks

Community Member, 10 Posts

28 April 2011 at 5:07am

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

Community Member, 10 Posts

28 April 2011 at 8:44pm

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

Community Member, 10 Posts

28 April 2011 at 8:54pm

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

Community Member, 244 Posts

28 April 2011 at 11:10pm

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

Community Member, 10 Posts

28 April 2011 at 11:27pm

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

Avatar
v.ivanov

Community Member, 2 Posts

8 August 2013 at 9:20pm

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

Forum Moderator, 1391 Posts

8 August 2013 at 10:47pm

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

Community Member, 2 Posts

8 August 2013 at 10:57pm

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