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

FulltextSearchable cannot find some pages


Go to End


4 Posts   641 Views

Avatar
PeterLu

Community Member, 8 Posts

11 May 2016 at 4:40pm

Edited: 13/05/2016 1:06pm

Hi,

I have enabled FulltextSearchable for SiteTree. It is working most of the time.
There is a page I created with title = "xxxxxx DIY Online xxxxx". When I do a search for "DIY", no results are found.
I also tested "xxxxx ABC xxxxxx", same results.

Any ideas? Or how can I config it?

Our SilverStripe version is 3.1.13

Thanks in advance,
Peter

Avatar
PeterLu

Community Member, 8 Posts

13 May 2016 at 1:01pm

Hi SilverStripe Team,

Can you help out?
Also if I search for "Tax", I get results. When I search for "DIY", no results.

Peter

Avatar
martimiz

Forum Moderator, 1391 Posts

15 May 2016 at 12:16am

Edited: 15/05/2016 12:18am

This is probably because MySQL fulltext search by default uses a min word length of 4. Which you should be able to change if you have access to the MYSQL server settings (ft_min_word_len setting). Which may come at a cost, efficiently-wise...

[edit] Then again that doesn't explain why 'tax' would work in this case... I don't suppose DIY is part of the excluded word list...

Avatar
PeterLu

Community Member, 8 Posts

16 May 2016 at 11:30am

Thank you, martimiz. It works.
I put the config under
[mysqld]
ft_min_word_len = 3
in the mysql config file

Mysql server restart is required.