Full text search does not work with XML columns on SQL Azure

So, SQL Azure recently released a new feature as part of the V12 Upgrades. You can now embed full text catalogs in your database.

http://azure.microsoft.com/blog/2015/04/30/full-text-search-is-now-available-for-preview-in-azure-sql-database/

I read the installation instructions and created an FTI pn table with an XML Data column.

CREATE FULLTEXT CATALOG recordDataCatalog AS DEFAULT;
CREATE FULLTEXT INDEX ON RecordData(Data) KEY INDEX PK_RecordData ON recordDataCatalog; 
ALTER FULLTEXT INDEX ON RecordData ENABLE; 
GO 
ALTER FULLTEXT INDEX ON RecordData START FULL POPULATION; 

      

The setup went fine; it is a rather large table (~ 0.5m rows), so I left it overnight and returned the next day.

It looks like it's complete. But searching for known strings in XML doesn't return any results.

SELECT * FROM RecordData WHERE Contains(Data, 'formsof(freetext, john)')
(0 row(s) affected)
SELECT * FROM RecordData WHERE Contains(Data, 'john')
(0 row(s) affected) 

      

FULLTEXTCATALOGPROPERTY

for PopulateStatus

reports this in standby mode.

The number of rows for a table is the same as the number of items in the Catalog.

select count(id) from recorddata
------------------------------------------
(No column name)
539726
------------------------------------------
SELECT FULLTEXTCATALOGPROPERTY('recordDataCatalog','ItemCount')
----------------------------------------- 
(No column name)
539726

      

One strange thing I noticed is that the index keywords seem to be missing / not populated properly.

SELECT * FROM sys.dm_fts_index_keywords(
    DB_ID('TransomTest'), 
    OBJECT_ID('RecordData'))
------------------------------------------------------
keyword display_term    column_id   document_count
0xFF    END OF FILE     2           539726

      

Has anyone figured out where to go next. Most of the SQL documents regarding FTS and XML say this should work and wordlists should be parsed based on XML tag boundaries. There is no Azure specific documentation given how this is a new feature.

+3


source to share


1 answer


indexing of xml document types is not yet supported and there is work to do to support it. The list of supported document types can be requested using:



select * from sys.fulltext_document_types where version !=''

      

+4


source







All Articles