all groups > sql server full text search > march 2006 >
You're in the

sql server full text search

group:

FTS- not returning results when lines are searched.


FTS- not returning results when lines are searched. Varun
3/20/2006 7:14:12 AM
sql server full text search:
Hello everyone,
I am performing full-text-search on a table containing word documents
in it's column. The search results fair when a single word is
searched. i.e. when I fire the following query:

select * from docs where contains(document, '"java"');

but if I try to search the a full line or give multiple words in the
text to be searched, then it shows no results, even if there is same
text present in the document stored in the database.
select * from docs where contains(document, '"this text is in
database"');
what could be the possible cause of the problem. Shouldn't the FTS
return the records which contains even a single word in the queried
text.
Please help me with the issue.
Thanks & Regards,
Varun Narang.
Re: FTS- not returning results when lines are searched. Hilary Cotter
3/20/2006 11:10:22 AM
It definitely should return results for both a single token or a phrase.
However in your phrase you have noise words? Did you empty your noise word
list and replace it with a single space?

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: FTS- not returning results when lines are searched. Daniel Crichton
3/20/2006 5:39:22 PM
Varun wrote on 20 Mar 2006 07:14:12 -0800:

[quoted text, click to view]

Because you have double quotes around the phrase, it will only look for rows
with that exact phrase in the text. If you want to search for any/all words
in any order and not necessarily in a single phrase, you need to remove
those double quotes. Also check BOL for the use of logical operators.

Dan

AddThis Social Bookmark Button