MyBB Community Forums

Full Version: Search Is not working as I want
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2016-08-03, 11:36 AM)Matt Wrote: [ -> ]MySQL full text search has a limit of 3 characters per search term, anything less than this gets ignored. Think if you just searched for "a" or something. I think this is a setting you can change in MySQL, but unless you're on a VPS or dedicated server you won't be able to change it. I'm not sure if searching with quotes, i.e. "Sofia 31" will work, but it'll probably be the same.

Searching is something important to me, as I like searching for lots of old posts.

My forum doesn't have enough memorable posts yet, for me to need to search for something.

However, I'm sure I'll be asking questions about this in the future, the same way as I've done with time stamps.  Wink

Also, I think my search limit is 4 characters.  I tried searching for "mvp", and I got an error that the minimum search term is 4 characters.

I guess I would need to ask my host to change the ft_min_word_len to 3 characters, if possible?  I would think this would be easier to do for my database, since this should only apply to a person's database, and not the whole server. 

Also, [b]Matt, [/b]I haven't tried your latest suggestion from last week about changing the time zone for the admin console.  I'm taking a break from trouble shooting MyBB right now.  I'll get back to it later.
First of sorry for late response.

I did as you said Matt I got the result but not exact result. May I know what this sql code must return. As title contains - Brazilia - Set 017 - x250

And I am trying to find Brazilia 017

Thanks
(2016-08-07, 11:39 PM)nuraman00 Wrote: [ -> ]Also, I think my search limit is 4 characters.  I tried searching for "mvp", and I got an error that the minimum search term is 4 characters.

I guess I would need to ask my host to change the ft_min_word_len to 3 characters, if possible?  I would think this would be easier to do for my database, since this should only apply to a person's database, and not the whole server. 

I think the limit of 4 will be the MyBB setting, the MySQL setting will already be set to 3 by default; from the setting description:

Quote:Set to 0 to disable (and accept the hard limit default of 3 for standard searching and 4 for MySQL fulltext searching). If you use MySQL fulltext searching and set this lower than the MySQL setting - MySQL will override it.

Changing this setting would change it for the whole server though as it's a core MySQL config setting, so is only possible on VPS/dedicated servers.

(2016-08-08, 09:53 AM)jabber Wrote: [ -> ]First of sorry for late response.

I did as you said Matt I got the result but not exact result. May I know what this sql code must return. As title contains - Brazilia - Set 017 - x250

And I am trying to find Brazilia 017

Thanks

I think this is just a limitation of MySQL then unfortunately. I just tried setting the length to 2 on my machine and it still returned both values, so I'm not sure there's anything else that can be done. You may just need to include something longer in the post to search for.
(2016-08-08, 11:52 AM)Matt Wrote: [ -> ]
(2016-08-07, 11:39 PM)nuraman00 Wrote: [ -> ]Also, I think my search limit is 4 characters.  I tried searching for "mvp", and I got an error that the minimum search term is 4 characters.

I guess I would need to ask my host to change the ft_min_word_len to 3 characters, if possible?  I would think this would be easier to do for my database, since this should only apply to a person's database, and not the whole server. 

I think the limit of 4 will be the MyBB setting, the MySQL setting will already be set to 3 by default; from the setting description:

Quote:Set to 0 to disable (and accept the hard limit default of 3 for standard searching and 4 for MySQL fulltext searching). If you use MySQL fulltext searching and set this lower than the MySQL setting - MySQL will override it.

Changing this setting would change it for the whole server though as it's a core MySQL config setting, so is only possible on VPS/dedicated servers.

If I change the "Minimum Search Word Length" to 2, then shouldn't the MySQL default override it, and thus be set to 3?
It won't be overridden in MyBB in terms of the actual setting value being changed, it just won't seem to do anything if set to 2. I don't think MyBB is able to tell what the current MySQL setting is, so as far as MyBB is concerned, setting the setting to 2 might work, but it has no way of knowing.
Pages: 1 2