Full-Text Contains help needed

Hello, I need to find the best possible search method for a products table that has 4 columns indexed. This will be used on website where customers are searching for products.

When using

declare @SearchString varchar(1000) set @SearchString = '"word" and "of" and "promise"'
select productid, title
from productsearch
where CONTAINS((Contributor, PrimItemNumber, SecItemNumber, Title), @SearchString)

I get only these products:
173066      Every Promise Of Your Word : With Standing On The Promises
211181      Every Promise Of Your Word
211181      Every Promise Of Your Word
284043      Word of Promise Soundtrack    
293693      Word of Promise Next Generation New Testament (20 CDs)  
296904      Word of Promise Inspiration for Today (Vol. 1)

Not exactly a good pull.

I was expecting more along these lines:

Word of Promise - Complete Audio Bible (79 CDs)
Word of Promise - Complete Audio Bible (Download)
Word of Promise - Complete Audio Bible (MP3 Discs)
Word of Promise - New Testament Audio Bible (20 CDs)
Word of Promise Gift of Psalms
Word of Promise Inspiration for Today (Vol. 1)
Word of Promise Next Generation New Testament (MP3 Discs)
Word of Promise Next Generation New Testament (20 CDs)
Word of Promise Easter Story

Because of the "of" in the title I removed "of" from the stoplist. If not I get no results.

Why does the search perform so poorly? What is the best method to allow customers to search for products when they can type in either: author, isbn or title and half the time only know partial information of a title or authors name?

Any help is greatly appreciated!
gogetsomeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian CroweDatabase AdministratorCommented:
Have you considered moving all of the searchable values into a separate table?  Something like:

CREATE TABLE ProductString
(
   ProductStringID INT IDENTITY(1,1),
   ProductID INT NOT NULL,
   StringTypeID INT NOT NULL,  --FK to type table containing Author, Title, ISBN, etc.
   String NVARCHAR(4000) NOT NULL
)

Obviously this could be fleshed out a little more but the general idea is to get all of the string in a single index.  I don't know that this would solve your search issues above but I would expect it to perform better and it would make localization easier down the road as you could just add a language field.

Just an idea
0
Anthony PerkinsCommented:
If you are searching for a phrase then the syntax is as follows:

DECLARE @SearchString varchar(1000) 

SET @SearchString = '"word of promise"'

SELECT  productid,
        title
FROM    productsearch
WHERE   CONTAINS ((Contributor, PrimItemNumber, SecItemNumber, Title), @SearchString)

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gogetsomeAuthor Commented:
Awe I see if I encapsulate with " " it works that way with contains as well.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.