How to "unlimit the search"

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
jorj
Posts: 7
Joined: Thu Jan 08, 2004 2:06 am
Contact:

How to "unlimit the search"

Post by jorj »

I have a small FAQ database for internal use, and it seems sometimes I search for words that I know are in some entries, however, nothing shows in the results. Same thing happens if I search for number.

Example, I've got the word remote in a lot of the documents, over half of them, and when i search for remote, I get no results. I have a documents with "Error 900" if I search for "error" I get a result, but not if I seach for "900".

I think the answer is somewhere in the "searchEngine" function, but I don't know where to start.

Any ideas would be a great help
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you should add at least 3 articles to the FAQ before you try to match anything, and what you're searching for should only be contained in one of
the three rows. This is because of the 50% thereshold of the MySQL fulltext search. If you insert only one row, then now matter what you search for, it is in 50% or more of the rows in the table, and therefore disregarded.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jorj
Posts: 7
Joined: Thu Jan 08, 2004 2:06 am
Contact:

Post by jorj »

Thorsten wrote:Hi,

you should add at least 3 articles to the FAQ before you try to match anything, and what you're searching for should only be contained in one of
the three rows. This is because of the 50% thereshold of the MySQL fulltext search. If you insert only one row, then now matter what you search for, it is in 50% or more of the rows in the table, and therefore disregarded.

bye
Thorsten
Thanks Thorsten. Thanks for the great work on this project; very well done and quite modifiable.

Anyway, what is the best way to get around this limitation?
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
jorj wrote:Anyway, what is the best way to get around this limitation?
well, if you use MySQL 3.23 you have to edit the function searchEingine() inside functions.php and use a SQL query with the "LIKE '%$search%'" instead of the MySQL fulltext search. If you use MySQL 4, there are no limitations and you can use boolean search and it's much more faster than MySQL 3.23.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply