Author Topic: Match Against not resulting properly  (Read 185 times)

0 Members and 1 Guest are viewing this topic.

Offline anujgargTopic starter

  • Enthusiast
  • Gender: Male
    • View Profile
    • Anuj Garg - A Professional Web Developer
Match Against not resulting properly
« on: February 22, 2010, 04:23:38 AM »
Hi,

I am executing following query:

SELECT *
FROM `table` AS video
WHERE video.public_private = 'public'
AND MATCH (
title, tags, description
)
AGAINST (
'avi'
)
AND video.published =1

But, it doesn't display the proper records matching with the text 'avi'. It exists in the field name "description" but it shows:
MySQL returned an empty result set (i.e. zero rows).

Please suggest how to solve this query...

Thanks
Anuj
Anuj Garg (http://anuj-blog.co.nr)

Express your thoughts here: http://www.myblogs.co.nr (and) http://www.anuj.8rf.com

Offline sader

  • Enthusiast
    • View Profile
Re: Match Against not resulting properly
« Reply #1 on: February 22, 2010, 07:46:06 AM »
try in boolen mode

AGAINTS(`avi` IN BOOLEAN MODE)

not sure what this does but it helped in my case

another think are your fields `title`, `tags`, `description` indexed with fulltext mode?

Offline anujgargTopic starter

  • Enthusiast
  • Gender: Male
    • View Profile
    • Anuj Garg - A Professional Web Developer
Re: Match Against not resulting properly
« Reply #2 on: February 24, 2010, 01:55:17 PM »
Thanks for the reply. But is there any other solution apart from this?
Anuj Garg (http://anuj-blog.co.nr)

Express your thoughts here: http://www.myblogs.co.nr (and) http://www.anuj.8rf.com

Offline fenway

  • MySQL Si-Fu / PHP Resident Alien
  • Global Moderator
  • 'Insane!'
  • *
  • Gender: Male
    • View Profile
Re: Match Against not resulting properly
« Reply #3 on: February 24, 2010, 02:51:06 PM »
FULLTEXT is funny if you don't have a lot of records -- also, what's your min_word_length?
:anim_rules: Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.