Hi,

Actually, I don't see why you can't have your full-text indexes on
seperate tables and use a query like this:

SELECT
MATCH(t1.col) AGAINST('string') + MATCH(t2.col) AGAINST('string') AS rel
FROM table1 t1
INNER JOIN table2 t2 ON (t2.id=t1.id)
WHERE MATCH(t1.col) AGAINST('string') AND  -- or use OR :-)
MATCH(t2.col) AGAINST('string')

And even add ORDER BY rel DESC if you want.

If you use IN BOOLEAN MODE, you CAN use one MATCH(t1.col, t2.col), which
should use the full-text index from both tables.

HOWEVER, with either method, I'm not sure that the join is done using
the id index. :-( I think a full scan may be done on table2. This is
very bad if table2 has a lot of rows.


Matt


----- Original Message -----
From: "Victoria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 09, 2003 3:48 AM
Subject: Re: MySQL full text search multiple tables


> Steve Radabaugh <[EMAIL PROTECTED]> wrote:
> >
> > I have been exploring MySQL's full text search feature and have not
been
> > able to find any information on querying a full text search across
> > multiple tables. Do you have to make recursive queries to each
table?
>
> You can't create fulltext index on columns from different tables.
Boolean full-text search can work without fulltext index. So, you can
use columns from different tables in boolean full-text search, but it
would be slow.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to