Search bot 3 characters limitation

Your code modifications and patches you want to share with others.
Locked
fanho
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Fri Dec 09, 2005 2:22 am

Search bot 3 characters limitation

Post by fanho » Wed Mar 11, 2009 3:42 am

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.

galapago
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed May 14, 2008 5:34 am

Re: Search bot 3 characters limitation

Post by galapago » Sat Mar 14, 2009 10:59 pm

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.

User avatar
xiangdian
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Sep 10, 2009 12:50 am
Location: Beijing, China
Contact:

Re: Search bot 3 characters limitation

Post by xiangdian » Tue Nov 17, 2009 11:25 am

Many thanks! It works for my Chinese website!!

User avatar
danieldue
Joomla! Intern
Joomla! Intern
Posts: 83
Joined: Mon Oct 01, 2007 11:16 am
Location: Denmark
Contact:

Re: Search bot 3 characters limitation

Post by danieldue » Mon Oct 25, 2010 12:13 pm

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?
Http://www.onlinebrand.dk - En blog om webdesign, joomla, brugevenlighed og online markedsføring.

Http://www.d3signated.com - Joomla 1.6 + Templates

RezzZ81
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Jul 23, 2010 10:42 am

Re: Search bot 3 characters limitation

Post by RezzZ81 » Wed Nov 10, 2010 8:15 am

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.


Locked

Return to “Core Hacks and Patches”