Wednesday, March 7, 2012

FREETEXTTABLE returns no result for a complex freetext only on JDB

This problem sounds like a problem of fulltext module, but it's not.
I'm using SQL Server 2005 Jun CTP on Windows 2k3 server
through MS SQL Server JDBC Driver SP3
from J2EE 1.4.2_08 on Windows 2k.
I've indexed and am searching tons of Japanese news articles
to test fulltext features of 2005.
SELECT ID,RANK,FOO FROM M_HOGE AS M INNER JOIN FREETEXTTABLE
(M_HOGE,*,N'関西電力は阪神大震災で倒 した従X員向け福利厚生施Xの跡地 特別養X老人3施Xを建Xした。')
ON(ID=[KEY])
(This Japanese sentense is a little complex, saying
'The Kansai-Electric has constructed three elder care facilities at a
vacant lot where their employee welfare facilities which had given way
because of the Great Hanshin Earthquake had existed.')
This query returns no result if it was passed through JDBC,
but if I pass it to SQLServer Management Studio directly,
it returns tons of result with very good ranking.
(btw, I feel the ranking of FREETEXTTABLE was so much improved in 2005.).
But, as a strange thing, if I simplify the freetext like
SELECT ID,RANK,FOO FROM M_HOGE AS M INNER JOIN FREETEXTTABLE
(M_HOGE,*,N'関西電力は福利厚生施Xの 地に施Xを建Xした。')
ON(ID=[KEY])
(It says 'The Kansai-Electric has constructed facilities at a
vacant lot where their employee welfare facilities had existed.')
, it returns good result even through JDBC!
Our company provides a product on Java using fulltext feature of SQL Server
2000,
and is going to adapt it to 2005, expecting much improvements.
We're looking forward to update about JDBC as well as fulltext features!
Hideaki:
The SQL Server 2000 JDBC driver isn't supported against SQL Server 2005.
Please try the SQL Server 2005 driver --
http://www.microsoft.com/sql/downloads/2005/jdbc.mspx.
-shelby
Shelby Goerlitz
Microsoft SQL Server
"hideaki" <hideaki@.discussions.microsoft.com> wrote in message
news:21C664BC-0FD8-488B-BC58-0E119E58CBE0@.microsoft.com...
> This problem sounds like a problem of fulltext module, but it's not.
> I'm using SQL Server 2005 Jun CTP on Windows 2k3 server
> through MS SQL Server JDBC Driver SP3
> from J2EE 1.4.2_08 on Windows 2k.
> I've indexed and am searching tons of Japanese news articles
> to test fulltext features of 2005.
>
> SELECT ID,RANK,FOO FROM M_HOGE AS M INNER JOIN FREETEXTTABLE
> (M_HOGE,*,N'??????3? ??')
> ON(ID=[KEY])
> (This Japanese sentense is a little complex, saying
> 'The Kansai-Electric has constructed three elder care facilities at a
> vacant lot where their employee welfare facilities which had given way
> because of the Great Hanshin Earthquake had existed.')
> This query returns no result if it was passed through JDBC,
> but if I pass it to SQLServer Management Studio directly,
> it returns tons of result with very good ranking.
> (btw, I feel the ranking of FREETEXTTABLE was so much improved in 2005.).
>
> But, as a strange thing, if I simplify the freetext like
> SELECT ID,RANK,FOO FROM M_HOGE AS M INNER JOIN FREETEXTTABLE
> (M_HOGE,*,N'?????')
> ON(ID=[KEY])
> (It says 'The Kansai-Electric has constructed facilities at a
> vacant lot where their employee welfare facilities had existed.')
> , it returns good result even through JDBC!
> Our company provides a product on Java using fulltext feature of SQL
> Server
> 2000,
> and is going to adapt it to 2005, expecting much improvements.
> We're looking forward to update about JDBC as well as fulltext features!
>

No comments:

Post a Comment