Jump to content

Doing something wrong with Full Text Searching....


drbigfresh

Recommended Posts

I think I've done something wrong here, either in my query, or with the design of my table...and I can't figure out where I've made my mistake.

 

I'm getting weird results... where words in the database aren't matched, and the score is always 0.

 

I've attached a screen shot of the table format...

 

Here is the query I'm executing:

"SELECT id, title, description, source, pubdate, link, MATCH (title,description) AGAINST ('$SearchString') AS score FROM rnwire_news WHERE MATCH (title,description ) AGAINST ('$SearchString') ORDER BY score DESC"

 

Any help would be greatly appreciated as I seem completely stuck on this one....

 

Thanks!

 

[attachment deleted by admin]

(i) make sure that u have utf-8 character encoding

(ii) ur search string is not a Full-Text Stopword.

(iii) and make sure that ur variable $searchstring are interpreted , try directly passing the literal string instead of a variable if u get results look further into the code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.