MySQL Forums
Forum List  »  Full-Text Search

Full text search on multiple tables always returns 1!
Posted by: Gianluigi Zanettini
Date: October 01, 2006 06:57AM

Hi all, I'm using this query to search on two joined tables

SELECT DISTINCT ml_articoli.id_articolo AS id, ml_articoli.titolo, ml_articoli.descrizione, 'art' AS tipo, (MATCH(ml_articoli.titolo, ml_articoli.descrizione) AGAINST('my text to search') OR MATCH(corpo) AGAINST('my text to search')) AS score FROM ml_articoli INNER JOIN ml_articoli_pagine ON ml_articoli.id_articolo = ml_articoli_pagine.id_articolo WHERE MATCH(ml_articoli.titolo, ml_articoli.descrizione) AGAINST('my text to search') OR MATCH(corpo) AGAINST('my text to search') )

I use a MATCH..AGAINST OR MATCH..AGAINST as a workaround to search on both the joined tables.

The problem is, I always recive a "1" score for the results!! but, if I remove the OR ... I get the right n.m scores... any idea? thanks!

Options: ReplyQuote


Subject
Views
Written By
Posted
Full text search on multiple tables always returns 1!
4429
October 01, 2006 06:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.