MySQL Forums
Forum List  »  Full-Text Search

Re: Questions on full text searching
Posted by: Rick James
Date: February 07, 2010 01:46PM

Is this really a FULLTEXT question? Seems like ParcelID should be an exact match.

Consider the following:
SELECT id FROM asmnt_parcel WHERE Account = '{$search}'
UNION DISTINCT
SELECT id FROM asmnt_parcel WHERE MATCH('$search') AGAINST (OwnersName)
UNION DISTINCT
...
Most of those will come up empty because an account number is a number but an Owner name is characters. That's ok. Then look up the ids to get the info.

To do both steps at once:
SELECT lots of fields
   FROM main_table AS m
   JOIN (
      SELECT ...
      UNION DISTINCT
      SELECT ...
      ...
        ) AS u   ON m.id = u.id

Options: ReplyQuote


Subject
Views
Written By
Posted
3032
January 29, 2010 11:23AM
Re: Questions on full text searching
1869
February 07, 2010 01:46PM


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.