Can you free text search using a sub query in SQL Server?
I'm trying to search resumes using a boolean free text search and need to run a subquery. However I can't work out if free text boolean searches are possible with subqueries.
Please could you confirm if it is and if possible 开发者_运维技巧reference a link for further investigation?
Yes you can - in SQL Server 2008 r2 at least! I have just tried the following query in SQL Server management studio and it parsed and executed correctly:
SELECT * FROM Resumes WHERE CONTAINS (ResumeText, 'admin*') AND ID IN(
SELECT ID FROM Resumes WHERE CONTAINS(ResumeText, 'sales'))
You can also mix and match fulltext search operators such as
SELECT * FROM Resumes WHERE CONTAINS (ResumeText, 'admin*') AND ID IN(
SELECT ID FROM Resumes WHERE FREETEXT(ResumeText, 'sales manager'))
精彩评论