Solved

SQL Server Full Text Search - AND searches across multiple columns

Posted on 2010-11-24
1
426 Views
Last Modified: 2012-06-21
Does anyone know how to accomplish this?  The search below only returns results when a specific column matches both words.  I want it to match if all words are matched, but in any full-text indexed column.  Anyone know if this is do-able?

DECLARE @keywords nvarchar(100);
SET @keywords = '"William*" AND "Travis*"';

SELECT RANK AS RES_RANK, * FROM VW_REQUESTOR_AGENCY_SEARCH,
CONTAINSTABLE (VW_REQUESTOR_AGENCY_SEARCH, *,  @keywords) AS TBL_SCH
WHERE [KEY] = VW_REQUESTOR_AGENCY_SEARCH.REQUESTOR_ID

Open in new window

0
Comment
Question by:msdcdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
msdcdev earned 0 total points
ID: 34209643
According to several articles, the answer is to add a computed column on the view that concatenates all of the fields that you want to search.  Then, change your full text index to only include the computed column.  Then the query shown above works with no changes.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question