all groups > sql server full text search > february 2004 >
You're in the

sql server full text search

group:

Full Text Search Query Problem



Full Text Search Query Problem Kit
2/17/2004 7:45:22 PM
sql server full text search: Dear All

I cannot receive result by writing a CONTAINS query.
My query is like contain("22", column).
For some normal words, the query is fine. But for some
value like "22", the query cannot find the result.

Please help ...

Re: Full Text Search Query Problem John Kane
2/17/2004 8:06:22 PM
Hi Kit,
Could you post the full output of SELECT @@version -- as this is very
helpful in troubleshooting Full Text Search Query Problems.
Can you confirm that a Full Population was successfully executed and that
you have an "item count" of greater than 1 when you select the FT Catalog
properties associated with your FT-enable table. Also, what is the type of
text in the FT-enable column? Is it plain text or HTML code or binary data,
such as a MS Word document? Also, what is the language of the server and the
language in the FT-enable table?

FYI, a CONTAINS query syntax is: CONTAINS(<column_name|*, <search_word>).

Regards,
John



[quoted text, click to view]

Re: Full Text Search Query Problem anonymous NO[at]SPAM discussions.microsoft.com
2/17/2004 8:31:52 PM
Thanks, John

My SQL version is Microsoft SQL Server 2000 - 8.00.760
(Build 2195: Service Pack 3).

Also i have checked it is fully populated and the column
is NTEXT datatype. The language it used is English (United
States).

Please advise and thanks.



[quoted text, click to view]
Full Text Search Query Problem Kit
2/17/2004 8:35:04 PM
Thanks, John

My SQL version is Microsoft SQL Server 2000 - 8.00.760
(Build 2195: Service Pack 3).

Also i have checked it is fully populated and the column
is NTEXT datatype. The language it used is English (United
States).

Please advise and thanks.



[quoted text, click to view]
Re: Full Text Search Query Problem John Kane
2/17/2004 9:24:03 PM
You're welcome, Kit,
Ok, you're using SQL Server 2000 SP3, but on what OS platform - Windows 2000
Server or Windows Server 2003?

Also, is the text in your FT-enabled column defined as NTEXT, plain text or
HTML text and metatags? Could you provide an example of the text in this
column as well as the exact FTS query?

Regards,
John



[quoted text, click to view]

Re: Full Text Search Query Problem yuck NO[at]SPAM ha.org.hk
2/19/2004 6:50:48 PM
Thanks, John.

The FT-enabled column is defined as NTEXT and i am now
using win2000 server.

if i search by a word, it is fine.
select * from table where contains(content,'word')

If i search by "22", no record is found.
select * from table where contains(content,'22')

Thanks you for your advise.




[quoted text, click to view]
Re: Full Text Search Query Problem John Kane
2/19/2004 9:42:32 PM
You're welcome, Kit,
The OS version is important because of the OS-supplied wordbreaker dll,
specifically for Win2000, the dll is infosoft.dll.
There is a known bug with this wordbreaker dll when used with the US_English
"Language for Word Breaker" for text or numbers that "touch" or are in
contact with punctuation, such as #,<,>, or % and if these or other
punctuation characters are "in contact" with your number "22", then the
CONTAINS statement will not find those numbers.

Could you run the following T-SQL LIKE query and post the output of it?
select * from table where content LIKE '%22%'

If punctuation is "in contact" with these numbers, this would explain why
the below CONTAINS found no record. The current workaround is to drop your
FT Catalog and re-create it using the Neutral "Language for Word Breaker"
for the column name "content" in your table. Note, that when you use the
Neutral "Language for Word Breaker", you lose some of the features of SQL
FTS, specifically the use of the INFLECTIONAL() function because the Neutral
"Language for Word Breaker" breaks words based upon the white space between
words and is not language specific.

Regards,
John



[quoted text, click to view]

AddThis Social Bookmark Button