Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: supernova777 on February 25, 2016, 05:40:05 PM

Title: Each word must be at least two characters long
Post by: supernova777 on February 25, 2016, 05:40:05 PM
how can i enable searches that include single digits such as
"Terminator 2" "Superman 3"
these searches are unable to execute..
how can i enable?
Title: Re: Each word must be at least two characters long
Post by: Kindred on February 25, 2016, 06:22:26 PM
Not any good way
Title: Re: Each word must be at least two characters long
Post by: Shambles on February 26, 2016, 02:36:37 AM
Quote from: supernova777
how can i enable searches that include single digits such as
"Terminator 2" "Superman 3"

I thought search terms enclosed in quote marks counted as a single word...?
Title: Re: Each word must be at least two characters long
Post by: lurkalot on February 26, 2016, 02:47:56 AM
Quote from: Shambles on February 26, 2016, 02:36:37 AM
Quote from: supernova777
how can i enable searches that include single digits such as
"Terminator 2" "Superman 3"

I thought search terms enclosed in quote marks counted as a single word...?

Phrase search - use double quotes (") around your term ("search term") to search for the search term as a phrase instead of individual words. http://wiki.simplemachines.org/smf/Search
Title: Re: Each word must be at least two characters long
Post by: Kindred on February 26, 2016, 06:28:16 AM
DOH!   Of course.  Silly me.
Title: Re: Each word must be at least two characters long
Post by: supernova777 on July 09, 2017, 04:22:32 PM
is there any reason why i shouldnt edit the php files to allow searches of single character terms?
Title: Re: Each word must be at least two characters long
Post by: Steve on July 09, 2017, 04:28:16 PM
Probably, if you want your search to return a gazillion results.
Title: Re: Each word must be at least two characters long
Post by: Arantor on July 09, 2017, 04:59:16 PM
And even then there is a 2/3 chance it wouldn't work anyway.
Title: Re: Each word must be at least two characters long
Post by: Siirist on July 09, 2017, 10:17:25 PM
Hi,

Just tossing in a thought.

If I was not able to get the suggestions to solve the issue, I would have the posts or those who post spell out the numbers, such as Superman One, Terminator Two, etc.

Just a thought, but if you already have a bunch of posts as Superman 1 or Terminator 2, I hope the suggestions solve the issue.

Best Wishes,
Siirist
Title: Re: Each word must be at least two characters long
Post by: Dwev on December 03, 2017, 08:03:37 AM
I'm interested in this, because i'm running an Apple forum, so lots of searches are done for for instance "iPhone X" or "iPhone 8".

For the moment I added the explanation that people should use double quotes around the search term, but I would prefer to just have it work without explaining anything.

So can someone tell me what edit, and in which php-files, should be done to make one-chrachter searches possible?
Title: Re: Each word must be at least two characters long
Post by: Steve on December 03, 2017, 08:13:45 AM
Again, if you allow that, anyone searching for the letter e will get almost every post returned as a result.
Title: Re: Each word must be at least two characters long
Post by: digger on December 03, 2017, 12:21:38 PM
Quote from: Dwev on December 03, 2017, 08:03:37 AM
I'm interested in this, because i'm running an Apple forum, so lots of searches are done for for instance "iPhone X" or "iPhone 8".

For the moment I added the explanation that people should use double quotes around the search term, but I would prefer to just have it work without explaining anything.

So can someone tell me what edit, and in which php-files, should be done to make one-chrachter searches possible?
https://custom.simplemachines.org/mods/index.php?mod=2648
Title: Re: Each word must be at least two characters long
Post by: Dwev on December 04, 2017, 08:03:56 AM
Quote from: Steve on December 03, 2017, 08:13:45 AM
Again, if you allow that, anyone searching for the letter e will get almost every post returned as a result.

I know, but how many people search for one letter?
And everyone who does execute a search with just one letter probably won't do it twice...   ;)

Quote from: digger on December 03, 2017, 12:21:38 PM
https://custom.simplemachines.org/mods/index.php?mod=2648

Thanks, I saw that mod earlier. But since it listed version 2.0.8 as the latest that it would work with I presumed it was too old and wouldn't work on my forum (which runs 2.0.14 right now).

After you advised it I tried it anyway, and it works without a hitch on 2.0.14!  :)
Title: Re: Each word must be at least two characters long
Post by: Kindred on December 04, 2017, 10:40:59 AM
 You need to upgrade to 2.0.15 very soon, it is a security update and should be applied as soon as possible