Full-text searches in DB
Posted: Thu Jun 23, 2005 9:54 am
Hi,
Quick question I'm hoping someone can answer...
I'm building my first search engine for a client and I've got the basics figured out, but was wondering whether or not its possible to mix 'regular' searches and full-text searches in the same query?
For example, could you do something like:
I suppose I could just try it to see whether its possible... but I thought I'd ask.
The search is intended to work on multiple fields - some of which include pretty simple 'yes/no' verifications against fields in a database, and some which need to do keyword searches. I'm wondering whether I should include these in one query - or generate multiple queries. It may also be a result of the way in which my db is designed. I may need to optimize the configuration somewhat... hmmmm.... food for thought.
Thanks!
Quick question I'm hoping someone can answer...
I'm building my first search engine for a client and I've got the basics figured out, but was wondering whether or not its possible to mix 'regular' searches and full-text searches in the same query?
For example, could you do something like:
Code: Select all
SELECT * FROM table_name WHERE field_name1 = '$string1' OR MATCH (field_name2, field_name3) AGAINST ('keyword')The search is intended to work on multiple fields - some of which include pretty simple 'yes/no' verifications against fields in a database, and some which need to do keyword searches. I'm wondering whether I should include these in one query - or generate multiple queries. It may also be a result of the way in which my db is designed. I may need to optimize the configuration somewhat... hmmmm.... food for thought.
Thanks!