Quick Search Quirk?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Collectonian
Regular
Posts: 17
Joined: Thu Nov 04, 2004 10:54 pm
Location: Bryan-College Station, TX
Contact:

Quick Search Quirk?

Post 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?
TKS
Regular
Posts: 199
Joined: Thu Nov 11, 2004 1:34 am
Location: VA, USA
Contact:

Post 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...
Collectonian
Regular
Posts: 17
Joined: Thu Nov 04, 2004 10:54 pm
Location: Bryan-College Station, TX
Contact:

Post 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.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
Collectonian
Regular
Posts: 17
Joined: Thu Nov 04, 2004 10:54 pm
Location: Bryan-College Station, TX
Contact:

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Collectonian
Regular
Posts: 17
Joined: Thu Nov 04, 2004 10:54 pm
Location: Bryan-College Station, TX
Contact:

Post 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.
Post Reply