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]

Link to comment
Share on other sites

(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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.