x
login about faq Site discussion (meta-askssc)

Full Text Search FreeTextTable Predicate Search Problem

Hello Everone,

I am using Full Text Search for our Search Algorithm.

Description: Say there is a table called as Table1 which contains following columns

Id, Name, Description

1, Car, Maruti Suzuki Car

2, Polycarbonate, Chemical used to compose polythene

3, Repair shop, Motor car repair shop

4, Mercedes Benz, Car

I have given full text index on Name and Description columns of Table1 From webpage I enter a keyword to search which should either be in Name or Description or both. I am using FREETEXTTABLE predicate for this.

For example say I searched for "Car" it will list down all the above results from Id 1 to 4 because it will search for the keyword "car" which is there in all the rows.

Howwever, "car" in "Polycarbonate" (Id=2) is not relevant to my search, hence I want only 3 records that is Id = 1,3,4. But I am unable to find any solution to avoid such situation using my current implementation.

Can you please help me out on this. This is very urgent requirement.

Thanks in advance.

Have a nice day.

more ▼

asked Jan 21 '10 at 03:37 AM in Default

Sekhar Misra 1 gravatar image

Sekhar Misra 1
1 1 1 1

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Why not use CONTAINS or CONTAINSTABLE? These will give you everywhere there is car or similar, yet not give you polycarbonate..

I'm confused as to why you would use FREETEXTTABLE to search for something where you only want the full word?!?

more ▼

answered Feb 04 '10 at 07:07 AM

RickD gravatar image

RickD
1.6k 1 1 4

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1834
x1601
x43

asked: Jan 21 '10 at 03:37 AM

Seen: 1400 times

Last Updated: Jan 21 '10 at 03:37 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.