Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / February 2005

Tip: Looking for answers? Try searching our database.

funny search results with 'contains' clause

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
klaus triendl - 23 Feb 2005 09:25 GMT
hi,

it is really funny how ft search works:
it seems to depend highly on what could be indexed, but it still doesn't  
follow a determined order.

consider the following queries:
select name from person where contains(name, 'hammer')
select name from person where contains(name, '"hammer*"')

the first is a query with a "simple term" and the second one with a  
"prefix term".
mssql docu says that a simple term "specifies a match for an exact word",  
but the first query returns other matches like "oberhammer" or  
"hammerschmied" - this is not an exact match for me; the found words  
rather consist of two words "ober", "schmied" and "hammer".

one would expect that the 1st and 2nd query work absolutely different but,  
even the 2nd returns a lot more results, they seem to differ just slightly.

when searching for 'ober' (instead of 'hammer'), the 2nd query returns  
"obermayr" and "oberlehner", but the 1st results only in "oberlehner",  
although "ober", "mayr" and "lehner" are single words themselves.
and why does it find "Tober" or "Dober" if i only searched for 'ober'?

i need to know the rules which mssql uses for fulltext search. can someone  
point me to a book or a website where i can find more information? or does  
somebody have a good explanation?
btw, we use sql2000 and a german collation.

Signature

klaus triendl

Hilary Cotter - 23 Feb 2005 11:49 GMT
unfortunately this behavior is caused by the German wordbreaker. You might
get better results with the neutral word breaker.

Signature

Hilary Cotter
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

> hi,
>
[quoted text clipped - 25 lines]
> somebody have a good explanation?
> btw, we use sql2000 and a german collation.
Hilary Cotter - 23 Feb 2005 18:25 GMT
I am raising a support incident on this one Klaus.

Signature

Hilary Cotter
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

> unfortunately this behavior is caused by the German wordbreaker. You might
> get better results with the neutral word breaker.
[quoted text clipped - 29 lines]
> > somebody have a good explanation?
> > btw, we use sql2000 and a german collation.
John Kane - 23 Feb 2005 16:26 GMT
klaus,
Could you post the full output of the below SQL code as it is most helpful
in troubleshooting SQL FTS issues.

use <your_database_name_here>
go
SELECT @@language
SELECT @@version
sp_configure 'default full-text language'
EXEC sp_help_fulltext_catalogs
EXEC sp_help_fulltext_tables
EXEC sp_help_fulltext_columns
EXEC sp_help <your_FT-enable_table_name_here>
go

Specifically, the OS-supplied and language-specific wordbreaker along with
the actual text (single language or mixed?) you are storing in your
FT-enabled table's column is most important information!

Thanks,
John
Signature

SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

> hi,
>
[quoted text clipped - 25 lines]
> somebody have a good explanation?
> btw, we use sql2000 and a german collation.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.