在这个 ssql 查询中,我%
在AGAINST
子句中使用了 a。
SELECT firstname,lastname,middlename,company_name,
primary_emailaddress,alternate_emailaddress,personal_address_line1,
personal_address_line2,personal_address_city,facebook_username,
twitter_username,googleplus_username,linkedin_username,
personal_website_url,birthday_month,notes,personal_address_zipcode,
company_address_zipcode,home_phonenumber,company_phonenumber,
cell_phonenumber,birthday_day,birthday_year,hash,image_file
FROM contacts
WHERE (
MATCH(
firstname,middlename,lastname,
primary_emailaddress,alternate_emailaddress,personal_address_line1,
personal_address_city,company_name,
company_address_line1,company_address_city,
facebook_username,twitter_username,googleplus_username,linkedin_username,
personal_website_url,birthday_month,notes
)
AGAINST ('someemail@email.com%' IN BOOLEAN MODE)
OR personal_address_zipcode REGEXP('(someemail@email.com*)')
OR company_address_zipcode REGEXP('(someemail@email.com*)')
OR home_phonenumber REGEXP('(someemail@email.com*)')
OR company_phonenumber REGEXP('(someemail@email.com*)')
OR cell_phonenumber REGEXP('(someemail@email.com*)')
OR birthday_day REGEXP('(someemail@email.com*)')
OR birthday_year REGEXP('(someemail@email.com*)')
)
AND addressbook_id = 4
在这个 ssql 查询中,我*
在AGAINST
子句中使用了 a。
SELECT firstname,lastname,middlename,company_name,
primary_emailaddress,alternate_emailaddress,personal_address_line1,
personal_address_line2,personal_address_city,facebook_username,
twitter_username,googleplus_username,linkedin_username,
personal_website_url,birthday_month,notes,personal_address_zipcode,
company_address_zipcode,home_phonenumber,company_phonenumber,
cell_phonenumber,birthday_day,birthday_year,hash,image_file
FROM contacts
WHERE (
MATCH(
firstname,middlename,lastname,
primary_emailaddress,alternate_emailaddress,personal_address_line1,
personal_address_city,company_name,
company_address_line1,company_address_city,
facebook_username,twitter_username,googleplus_username,linkedin_username,
personal_website_url,birthday_month,notes
)
AGAINST ('someemail@email.com*' IN BOOLEAN MODE)
OR personal_address_zipcode REGEXP('(someemail@email.com*)')
OR company_address_zipcode REGEXP('(someemail@email.com*)')
OR home_phonenumber REGEXP('(someemail@email.com*)')
OR company_phonenumber REGEXP('(someemail@email.com*)')
OR cell_phonenumber REGEXP('(someemail@email.com*)')
OR birthday_day REGEXP('(someemail@email.com*)')
OR birthday_year REGEXP('(someemail@email.com*)')
)
AND addressbook_id = 4
两者都不会返回内容精确等于 atleast 的位置someemail@email.com
。它通过 com 或电子邮件或其他方式返回所有内容。我需要做哪些改变?FULLTEXT
匹配列上有一个索引。