|
|
|
date: Thu, 18 Sep 2008 16:27:29 +0200,
group: microsoft.public.sqlserver.fulltext
back
@SearchConditions FREETEXTSEARCH CONTAINSTABLE
I have a situation like this
TAble1
ID Title
UsersCount
1 "the da vinci code"
10
2 "The Da Vinci Code and the Secrets of the Temple" 5
3 "The Da Vinci Code Decoded"
2
I want to have a search that when I search for 'the da vinci code' rank the
results as
1,3,2 because the first book match exactly the phrase while the others have
a density of keywords lower,
I'm trying to do something like this
SET @SearchConditions = 'ISABOUT("the da vinci code" WEIGHT(.9), "the"
WEIGHT(.1), "da" WEIGHT(.1), "vinci" WEIGHT(.1), "code" WEIGHT(.1))';
SELECT * FROM FREETEXTTABLE(xefba_db_Books, Title, @SearchConditions)
but CONTAINSTABLE explode with more than 3 words to weight and FREETEXTTABLE
gives inaccurates results...
any idea?
Simone
date: Thu, 18 Sep 2008 16:27:29 +0200
author: Simone Basso
Re: @SearchConditions FREETEXTSEARCH CONTAINSTABLE
Is it really giving inaccurate results? "The" is a stopword by default, so
is it being dropped altogether? Try it again without the stopword or index
without a stoplist.
--
========
Michael Coles
"Pro T-SQL 2008 Programmer's Guide"
http://www.amazon.com/T-SQL-2008-Programmer-rsquo-Guide/dp/143021001X
"Simone Basso" wrote in message
news:92E0537E-D19C-4B3D-BF10-D1162E0A3692@microsoft.com...
>I have a situation like this
>
> TAble1
> ID Title UsersCount
> 1 "the da vinci code" 10
> 2 "The Da Vinci Code and the Secrets of the Temple" 5
> 3 "The Da Vinci Code Decoded" 2
>
>
> I want to have a search that when I search for 'the da vinci code' rank
> the results as
> 1,3,2 because the first book match exactly the phrase while the others
> have a density of keywords lower,
>
> I'm trying to do something like this
> SET @SearchConditions = 'ISABOUT("the da vinci code" WEIGHT(.9), "the"
> WEIGHT(.1), "da" WEIGHT(.1), "vinci" WEIGHT(.1), "code" WEIGHT(.1))';
>
> SELECT * FROM FREETEXTTABLE(xefba_db_Books, Title, @SearchConditions)
>
> but CONTAINSTABLE explode with more than 3 words to weight and
> FREETEXTTABLE gives inaccurates results...
>
>
> any idea?
>
> Simone
>
>
date: Sat, 20 Sep 2008 20:56:41 -0400
author: Michael Coles michaelcoREPLACE_THIS_WITH_AT_SIGNoptonline.net
|
|