Searching forums

Anything about use of this forum : NOT about cycling
Post Reply
User avatar
chris_suffolk
Posts: 738
Joined: 18 Oct 2012, 10:01pm

Searching forums

Post by chris_suffolk »

Why is search restricted to words longer than 3 characters?

There is a board entry called 'Sat Nav'. So I thought I would search for both Sat Nav and GPS to see what else comes up - it just says no matches found - yet I can see the board on the page. I appreciate that there are many 3 letter words, and that this can cause problems for search engines - or at least it would have in days gone past when computers were slow, inefficient and expensive, but not now-a-days.

I also appreciate that there is little point searching for words like 'the' or 'and', but it it floats your boat, hey!

Excluding perfectly acceptable and useful words like Sat Nav and GPS is just plain unhelpful
thirdcrank
Posts: 36781
Joined: 9 Jan 2007, 2:44pm

Re: Searching forums

Post by thirdcrank »

I presume - but I don't know- that it's because a search isn't restricted words - ie characters followed by a space. On that basis, a three character search would throw up too many finds.

I agree that this restrictin is a pita.
User avatar
chris_suffolk
Posts: 738
Joined: 18 Oct 2012, 10:01pm

Re: Searching forums

Post by chris_suffolk »

No, I don't think that's right. If you search this thread for 'follow' it comes up empty, not finding the word 'followed', so I think it only finds whole words.

It is possible to search 'GPS*', using the * as a wild card, which would make the searching even more resource intensive, and at the same time less use - so makes even less sense to restrict it
Vorpal
Moderator
Posts: 20720
Joined: 19 Jan 2009, 3:34pm
Location: Not there ;)

Re: Searching forums

Post by Vorpal »

I don't know the reason that the search is restricted. I suspect that it is to disallow 'to', 'the', 'and', etc. to be included in searches.

However, the '*' character can be used to get around it. So, to find the sat nav thread, put "sat* +nav*" in the search field, and it should find it for you.
“In some ways, it is easier to be a dissident, for then one is without responsibility.”
― Nelson Mandela, Long Walk to Freedom
User avatar
Mick F
Spambuster
Posts: 56367
Joined: 7 Jan 2007, 11:24am
Location: Tamar Valley, Cornwall

Re: Searching forums

Post by Mick F »

The other way of doing it is to use Google - other search engines are available.

Type:

gps site:forum.ctc.org.uk
Mick F. Cornwall
User avatar
Alex L
Posts: 625
Joined: 13 Sep 2011, 12:31am
Location: Staffordshire

Re: Searching forums

Post by Alex L »

It is not to do with the boards as such but the database which it uses. Presumably it is MySQL (ISAM). Fulltext indexing is set at a minimum of 4 characters. To sort this you would have to set ft_min_word_len and then rebuild all the indexes which would take time I'm sure the admin doesn't have and server resources we don't have. Then there would be the need for better hardware to support all this.

To me, it doesn't seem worthwhile to fix for the cost. Especially as Mick has said, there are alternatives to the site search.
User avatar
chris_suffolk
Posts: 738
Joined: 18 Oct 2012, 10:01pm

Re: Searching forums

Post by chris_suffolk »

I agree that changing to allow searching for 3 letter words is not going to happen, but it does seem a little ironic that 3 chars + a wild card is accepted, and this has to be way more resource hungry. And as for a wild card either side of 3 letters - well......... *the* finds 12146 matches in well under a second on 810 pages !!
User avatar
Alex L
Posts: 625
Joined: 13 Sep 2011, 12:31am
Location: Staffordshire

Re: Searching forums

Post by Alex L »

chris_suffolk wrote:I agree that changing to allow searching for 3 letter words is not going to happen, but it does seem a little ironic that 3 chars + a wild card is accepted, and this has to be way more resource hungry. And as for a wild card either side of 3 letters - well......... *the* finds 12146 matches in well under a second on 810 pages !!


How so? I doubt there will be much difference, will still just be two queries

SELECT count(id) FROM post WHERE (search method) //Counts the number of results

SELECT post_title, post_content, ect, ext FROM post LIMIT 0, 15 //Displays the first 15 results

Which will loop through echoing the first 15 to page. It won't hurt performance as the database doesn't have to load the content unless you look at the page (which alters the LIMIT for each query).
Post Reply