Re: Full Text search on multiple tables?
Hello Tony,
I think I know what you are looking for. I want to do the same thing.
I have
tableA.name
tableB.text
In the MATCH( tableA.name, tableB.text ) I want to search both tables for the search string.
At the moment I can join the tables but when I include tableB.text in the MATCH() I get an error even though the coloums are in the result. I hope that makes sense.
If I find a solution will let you know.
Thanks,
=-)
EDIT:
Don't know if this is the way to do it but this is how I have it working!
SELECT *, MATCH( name ) AGAINST('%$search_term%') OR MATCH( text ) AGAINST('%$search_term%') AS score FROM tableA LEFT JOIN tableB ON tableA.tableA_id = tableB.tableB_id WHERE MATCH( name ) AGAINST('%$search_term%') OR MATCH( text ) AGAINST('%$search_term%')
The Key to it was the "OR MATCH( text ) AGAINST('%$search_term%')"
Hope this helps.
=-)
Edited 1 time(s). Last edit at 04/02/2006 11:35AM by jamesturnernz.
Subject
Views
Written By
Posted
29964
July 29, 2005 06:38AM
16848
January 05, 2006 06:23PM
12617
March 24, 2006 07:58AM
10341
March 25, 2006 11:59PM
Re: Full Text search on multiple tables?
23014
April 02, 2006 11:00AM
12436
August 29, 2006 04:06PM
10242
October 01, 2006 07:47AM
13795
November 06, 2006 11:27PM
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.