Search with searchword with less than 4 charcater

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Search with searchword with less than 4 charcater

Post by JochenS » Wed Aug 03, 2011 9:49 am

On my system the search for items with 3 characters are not working. in the SQL help http://dev.mysql.com/doc/refman/5.1/en/ ... olean.html I found the hint to the SQL setting "ft_min_word_len". This is acutally 4.

My question now to the phpMyFAQ users: If I change the ft_min_word_len to 3, do I need to rebuild some indexes?
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/

jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: Search with searchword with less than 4 charcater

Post by jason102178 » Wed Aug 03, 2011 2:02 pm

Hi JochenS

I was checking out your FAQ i wasnt sure if the honeywell one was yours or not but , i was wondering how you were testing it with No FAQs in your database they all say 0, unless you have another FAQ database
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist

Thorsten
Posts: 14774
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search with searchword with less than 4 charcater

Post by Thorsten » Wed Aug 03, 2011 6:59 pm

Hi,

after changing the ft_min_word_len in MySQL, you have to restart the MySQL server and rebuild the FULLTEXT index.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: Search with searchword with less than 4 charcater

Post by JochenS » Thu Aug 04, 2011 6:50 am

@ Jason, this database is in German and Dutch language. The english language packet couldn't be disabled. A common search term is there "VMM"

@Thorsten, ok I'll try it with a

Code: Select all

REPAIR TABLE faqdata QUICK
I'll keep you updated.
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/

JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

HowTo: Enable search for search word with less than 4 charac

Post by JochenS » Fri Aug 05, 2011 6:41 am

The default of a MySQL installation is ft_min_word_len = 4. This means searchterms with a lenght of less than 4 words are ignored.
E.g: It is impossible to search for a term 'the' because it is too short. The workaround is to use the searchterm 'the*', which was implemented in phpMyFAQ versions until 2.7, but this disabled the functionality to search for terms like '+searchterm1 +searchterm2'.

This is what I have done:
  • Stopped MySQL server
    added the line ft_min_word_len = 4 to the file mysql.ini
    Started the MySQL server
    and executed with phpMyAdmin 'REPAIR TABLE faqdata QUICK'
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/

JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

HowTo: Enable search for search word with less than 4 charac

Post by JochenS » Fri Aug 05, 2011 7:57 am

The default of a MySQL installation is ft_min_word_len = 4. This means searchterms with a lenght of less than 4 words are ignored.
E.g: It is impossible to search for a term 'the' because it is too short. The workaround is to use the searchterm 'the*', which was implemented in phpMyFAQ versions until 2.7, but this disabled the functionality to search for terms like '+searchterm1 +searchterm2'.

This is what I have done:
  • Stopped MySQL server
    added the line ft_min_word_len = 4 to the file mysql.ini
    Started the MySQL server
    and executed with phpMyAdmin 'REPAIR TABLE faqdata QUICK'
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/

Post Reply