NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL 4.0.10 Fulltext Search Relevancy Problem

Phillip Powell phillip.powell at adnet-sys.com
Fri May 21 13:37:09 EDT 2004


Hans Zaunere wrote:

>>    SELECT
>>    image.id, image.image_name,
>>    (MATCH (image_name, image_alt, image_location_city,
>>    image_location_state, image_location_country) AGAINST ('test')
>>    OR MATCH (first_name, last_name) AGAINST ('test')
>>    OR MATCH (keyword_name) AGAINST ('test')
>>    OR MATCH (event_name) AGAINST ('test')
>>    OR MATCH (placement_name) AGAINST ('test')
>>    ) as score,
>>    image.image_path, image.image_creation_date
>>    FROM image
>>    
>>
>
>...
>
>  
>
>>Using this query I always get a relevancy score of 1 every 
>>time; I do not actually get the floating-point decimal number 
>>that I was seeking (the accurate relevancy); this based on 
>>    
>>
>
>This is because of your MATCH statements.  Because you are doing OR,
>it's a logical operator, and thus:
>
>1 OR 1 OR 1 = 1
>
>I think you need to revisit your query and possibly break it into
>multiple queries.
>
>H
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>  
>
That does make sense.. hmm.. will have to revisit that.. next week Beer 
time!

Thanx though!
Phil

-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list