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

sql server full text search

group:

CONTAINS full-text XML problem


CONTAINS full-text XML problem MytyMyky
9/14/2004 2:47:09 AM
sql server full text search:
I've noticed that the CONTAINS function in the SQL SELECT statement has a
strange behavior on XML. When I use a statement like:

SELECT * FROM T where CONTAINS(dcxml,'pesca')

where "dcXML" is the column name and "pesca" is the word I'm searching for,
it only finds XML docs in the form of:
<tag1>
<key>...</key>
<key>...</key>
<key>... pesca ...</key>
</tag1>

(pesca always in the last <key> of the set)

and skips those like
<tag1>
<key>...</key>
<key>... pesca ...</key>
<key>...</key>
</tag1>

(pesca somewhere else in the repeated tag set)

Any help?
Re: CONTAINS full-text XML problem Hilary Cotter
9/14/2004 8:19:54 AM
Are you indexing the xml as text or in an image column? If you are indexing
xml in an image column which word breaker are you using?

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


[quoted text, click to view]

Re: CONTAINS full-text XML problem John Kane
9/14/2004 9:56:12 AM
MytyMyky,
Could you provide the full output from the below SQL script as this is
helpful in troubleshooting SQL FTS issues.

use <your_database_name_here>
go
SELECT @@language
SELECT @@version
-- May require setting advance sp_configure settings
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

Thanks,
John



[quoted text, click to view]

Re: CONTAINS full-text XML problem MytyMyky
9/15/2004 1:37:38 AM
I forgot to mention a crucial detail. I'm using SQL 2005 Beta 2, so I store
the xml in a xml column.

[quoted text, click to view]
Re: CONTAINS full-text XML problem Hilary Cotter
9/15/2004 7:35:51 AM
Yes, that is somewhat crucial. Can we see an example of your query?

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


[quoted text, click to view]

AddThis Social Bookmark Button