Page 1 of 1
Quick Search Quirk?
Posted: Thu Jan 18, 2007 2:28 am
by Collectonian
Is there something set up on the Quick Search (version 1.0.1) that keeps it from searching certain words? If I try to search for "From Far Away" it tells me there are no results, when there should be around 6 or 7. At first I thought it was refusing to search entries from 2006, but I tried some other searches and they worked fine. I was eventually able to find the entries I needed by searching for a character name that appears in all the entries, but I'm wondering why it couldn't find them by the title. Any ideas?
Posted: Thu Jan 18, 2007 4:02 am
by TKS
I don't think the search is boolean...I think the search is actually the built in mysql search which uses + or - and the old search engine style of AND OR NOT etc.
I think this is why you couldn't find anything...
Posted: Thu Jan 18, 2007 5:00 am
by Collectonian
I didn't use the quotes in my search, though, and any other search for titles that I do works fine, even for one title called W Juliet. That's why I wondered why only that one title doesn't give results.
Posted: Thu Jan 18, 2007 8:45 pm
by judebert
Yes, the MySQL fulltext search will not return any results if too many database rows are selected. So a word like "from" will probably be in so many articles that MySQL will refuse to search for it.
Posted: Thu Jan 18, 2007 10:11 pm
by Collectonian
Hmm...can anyone tell me where I can find the code that runs the search so I can change this to work more normally?
Posted: Fri Jan 19, 2007 10:08 am
by garvinhicking
Hi!
The code runs within the MySQL system.
The SQL code that's executed can be found in include/functions_entries.inc.php, function serendipity_searchEntries().
You can only replace the code to use a "LIKE" search instead of the MySQL fulltext search. This will be much, much slower though. You can't tune the MySQL fulltextsearch to exclude stopwords or return more than X% if all entries match...
Best regards,
Garvin
Posted: Fri Jan 19, 2007 4:28 pm
by Collectonian
Thanks. I'll have to take the performance hit. The search is useless if it refuses to find the 17 entries for a title like From Far Away for reasons I can't even figure out. Even adding quotes doesn't help. Since it as hosted environment, I can't fine tune the mySQL fulltext stuff to try and fix the issue, so I'll have to "resort" to a regular old-fashioned search.