Page 1 of 1

Search bot 3 characters limitation

Posted: Wed Mar 11, 2009 3:42 am
by fanho
Hello,
I'm trying to remove the 3 characters limitation in the joomla site search engine. This 3 characters limitation makes sense for english but is not adapted to Japanese for exemple because words can be 1 or two characters and have meaning.
I'm trying to hack the search php script.

I found this issue addressed in other places in the forum but it never got answered.

Any help or advice would be appriciate.

Thank you.

Re: Search bot 3 characters limitation

Posted: Sat Mar 14, 2009 10:59 pm
by galapago
Hello pals !!
follow me:

Open:
/JOOMAL_DIR/administrator/components/com_search/helpers/search.php

IN function limitSearchWord line 69
FROM
$searchword ) < 3
CHANGE TO
$searchword ) < 2

Save, and ready, now you can search for 2 characteres.
;D
Miguel M.

Re: Search bot 3 characters limitation

Posted: Tue Nov 17, 2009 11:25 am
by xiangdian
Many thanks! It works for my Chinese website!!

Re: Search bot 3 characters limitation

Posted: Mon Oct 25, 2010 12:13 pm
by danieldue
How do you do this as a Template override? :)

Ive tried to put the file in: template/html/administrator/com_search/search.php

Didn't work.. also tried other combinations..

Why won't that work?

Re: Search bot 3 characters limitation

Posted: Wed Nov 10, 2010 8:15 am
by RezzZ81
hi galapago!

does this 'hack' still work for you? I got the problem that I can search for strings with 2 characters after this hack but I only see hits containing 4 or more characters that contain the 2-character-string I searched for...

It's kind of an annoying feature of the K2 search/filter module...

edit: hmm seems like this is K2 related...

edit2: I've found the problem. Check here for the solution.