Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: exxocet on April 06, 2017, 02:44:26 PM

Title: Search engine "two characters long"
Post by: exxocet on April 06, 2017, 02:44:26 PM
  When searching for 1...2 characters, the search returns "Each word must be at least two characters long" and no search is done. That's mega-annoying for the users and  it's only happening on SMF.
  Yes, I understand that the search engine will skip 1 or 2 characters terms and all forum softwares do that, but neverthless it should do the search for the remaining valid terms and display the results, along with a warning "words with less than 2 characters were skipped".
Title: Re: Search engine "two characters long"
Post by: Steve on April 06, 2017, 06:40:36 PM
I'm confused. If you search for one or two characters you're going to get that prompt. I don't understand what you're trying to search for.


Edit: I think I just realized what you're asking. Let me make sure. If you search for 'at' you want it to return all results that contain 'at', for example 'mate', but say that the word 'at' was skipped, correct?
Title: Re: Search engine "two characters long"
Post by: Dav999 on April 06, 2017, 08:17:40 PM
He/She means that if you enter "this is a search term", the entire search will get blocked by the 1-letter word in there.
Title: Re: Search engine "two characters long"
Post by: landyvlad on April 06, 2017, 08:48:01 PM
Yes I believe that's his concern. That search currently returns "Each word must be at least two characters long."

I think what he wants is: If a search is done on "this is a search term" the result will be as per the attachment, with a note that:

"words with less than 2 characters were skipped"



Title: Re: Search engine "two characters long"
Post by: Steve on April 06, 2017, 09:37:41 PM
But it makes not sense to have the system search for every instance of the letter 'd', for example, and eliminating all the single instances of it.
Title: Re: Search engine "two characters long"
Post by: landyvlad on April 06, 2017, 11:56:47 PM
paging exxocet....
Title: Re: Search engine "two characters long"
Post by: exxocet on April 08, 2017, 11:32:33 AM
  I'm not asking to search for one letter terms. I'm asking to skip those, but continue with the search. That's what all the other forums software do.
  Per instance, if you're searching for "a dog", SMF won't do the search at all, but it will return "Each word must be at least two characters long". You'll have to came back and remove "a", in order to successfully get some search results. This is very annoying, you'll have to make another operation, pick every 1 char terms and manually remove it just to get that search done.

  Right now is working like this
1 - type "a dog" and hit search button
2 - surprise, you won't get any search result, but that damn "Each word must be at least two characters long"
3 - go back and remove "a", search only for "dog"
4 - finally get search results

  It should work like this:
1 - type "a dog" and hit search button
2 - get search results and a notification: "one characters terms have been skipped"

Hope now I've made myself understood. Thank you guys!
Title: Re: Search engine "two characters long"
Post by: Steve on April 08, 2017, 03:08:14 PM
Now I understand. Thanks for explaining it. :)
Title: Re: Search engine "two characters long"
Post by: lurkalot on April 08, 2017, 03:37:31 PM
Quote from: exxocet on April 08, 2017, 11:32:33 AM

  Per instance, if you're searching for "a dog", SMF won't do the search at all, but it will return "Each word must be at least two characters long". You'll have to came back and remove "a", in order to successfully get some search results.


Actually, searching for "a dog" won't give you that warning, if you leave the double quotes in place.  Just search between double quotes and you'll see what I mean.
Title: Re: Search engine "two characters long"
Post by: exxocet on April 09, 2017, 04:28:03 AM
Quote from: lurkalot on April 08, 2017, 03:37:31 PM
Quote from: exxocet on April 08, 2017, 11:32:33 AM

  Per instance, if you're searching for "a dog", SMF won't do the search at all, but it will return "Each word must be at least two characters long". You'll have to came back and remove "a", in order to successfully get some search results.


Actually, searching for "a dog" won't give you that warning, if you leave the double quotes in place.  Just search between double quotes and you'll see what I mean.


  I know what it does, I know for 20 years about exact phrases, double quotes marks are there just for specifying 'a dog' are search terms.

  Imagine searching for 'a dog' on Google and instead of results, getting "Each word must be at least two characters long". A reliable way to bust their company in just a couple of months and have Bing and DuckDuckGo eating the cake.
Title: Re: Search engine "two characters long"
Post by: lurkalot on April 09, 2017, 05:01:01 AM
OK, so as a workaround, what about adding a google site search to your website.

I can't see the SMF built in one changing any time soon, or at least not in this version. It's been like this for a very long time.
Title: Re: Search engine "two characters long"
Post by: Arantor on April 09, 2017, 06:32:53 AM
It's also not officially considered a bug either so no chance of a change in 2.0.
Title: Re: Search engine "two characters long"
Post by: exxocet on April 09, 2017, 09:30:09 AM
Quote from: Arantor on April 09, 2017, 06:32:53 AM
It's also not officially considered a bug either so no chance of a change in 2.0.

  It should be. Not exactly a bug, OK, rather a missing feature.
  Not a chance on vanilla 2.0, I understand that, but I guess it could be a suggestion for 2.1.
Thanks for your answers.
 
Title: Re: Search engine "two characters long"
Post by: Arantor on April 09, 2017, 10:25:02 AM
Given how much frustration I had to convince the team of changes that required less work because 'it's always been this way', good luck.
Title: Re: Search engine "two characters long"
Post by: albertlast on April 09, 2017, 02:21:41 PM
i don't understand what your all talking about...
in my 2.1 env when i search a dog than i got the message "The following term has been ignored in your search because too short:a"
when i search "a dog" no messages apear (and the database search for both).
both test the searching is done.

both tested with mysql and pg.

so where is your issue?
Title: Re: Search engine "two characters long"
Post by: Arantor on April 09, 2017, 02:50:41 PM
This is certainly an issue in 2.0. I certainly didn't test it in 2.1 to see if the behaviour had been changed.
Title: Re: Search engine "two characters long"
Post by: exxocet on April 10, 2017, 04:53:27 AM
  Well, at least I've tried. Thanks for your time, Arantor.