{"id":586,"date":"2010-11-09T15:05:00","date_gmt":"2010-11-09T15:05:00","guid":{"rendered":"\/blogs\/bobb\/post\/Using-SQL-Server-Denali-Full-Text-Search-With-Extended-Properties.aspx"},"modified":"2010-11-09T15:05:00","modified_gmt":"2010-11-09T15:05:00","slug":"using-sql-server-denali-full-text-search-with-extended-properties","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/","title":{"rendered":"Using SQL Server Denali Full-Text Search With Extended Properties"},"content":{"rendered":"<p>\nOnce upon a time, there was to be a SQL Server-based file system for Windows. This file system would not only let you search on file properties like filename and file length, but also on what&#39;s known as &quot;Extended Properties&quot;. For an idea of what extended properties refers to, have a look at the &quot;Properties&quot; tab on any Office Document, or jpg file (especially if you have a GPS camera) or&nbsp;MP3 files, or&#8230;other files like&nbsp;[your favorite file type goes here]. Wikipedia defines extended properties as &quot;a file system feature that enables users to associate computer files with metadata not interpreted by the filesystem&quot;. To find some extended properties viewers and searchers, I simply did a search on &quot;Windows OS Extended Properties&quot;. The APIs to enumerate these properties are the Windows Shell APIs.\n<\/p>\n<p>\nIn SQL Server Denali CTP1, you can use a new feature of Fulltext Search to search data stored in FTS, not only on content, but if the IFilter exposes it, on extended properties as well. According to BOL, you first need to create SEARCH_PROPERTY_LISTs and add the extended properties you&#39;d like to search on:\n<\/p>\n<p>\nCREATE SEARCH PROPERTY LIST DocumentProperties;<br \/>\nGO<br \/>\nALTER SEARCH PROPERTY LIST DocumentProperties<br \/>\n&nbsp;&nbsp; ADD &#39;Title&#39; <br \/>\n&nbsp;&nbsp; WITH ( PROPERTY_SET_GUID = &#39;F29F85E0-4FF9-1068-AB91-08002B27B3D9&#39;, PROPERTY_INT_ID = 2, <br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROPERTY_DESCRIPTION = &#39;System.Title &#8211; Title of the item.&#39; );<br \/>\nGO &#8212; add more properties\n<\/p>\n<p>\nAnd alter the fulltext index to use your search property list:\n<\/p>\n<p>\nALTER FULLTEXT INDEX ON Production.Document <br \/>\n&nbsp;&nbsp; SET SEARCH PROPERTY LIST DocumentProperties<br \/>\n&nbsp;&nbsp; WITH NO POPULATION; <br \/>\nGO\n<\/p>\n<p>\nALTER FULLTEXT INDEX ON Production.Document <br \/>\n&nbsp;&nbsp; START FULL POPULATION;\n<\/p>\n<p>\nthe available metadata looks like this:\n<\/p>\n<p>\nselect * from sys.registered_search_properties <br \/>\nselect * from sys.registered_search_property_lists<br \/>\nselect * from sys.dm_fts_index_keywords_by_property\n<\/p>\n<p>\nThen you&#39;d use them with the improved FTS functions:\n<\/p>\n<p>\nSELECT Document FROM Production.Document WHERE CONTAINS(PROPERTY(Document,&#39;Title&#39;), &#39;Maintenance OR Repair&#39;);\n<\/p>\n<p>\nCool, eh? Now Office 2007 and above IFilters support these properties on Office docs. What is needed now is a way to extract property lists using the Windows Shell APIs. And more IFilters that support this. And&#8230;.given that there&#39;s already FTS support over FILESTREAM columns, a way to easily expose the native filesystem as a set of tables with filestream columns.\n<\/p>\n<p>\nWinFS, anyone&#8230;?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once upon a time, there was to be a SQL Server-based file system for Windows. This file system would not only let you search on file properties like filename and file length, but also on what&#39;s known as &quot;Extended Properties&quot;. For an idea of what extended properties refers to, have a look at the &quot;Properties&quot; [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,31],"tags":[],"class_list":["post-586","post","type-post","status-publish","format-standard","hentry","category-full-text-search","category-sql-server-2012"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin\" \/>\n<meta property=\"og:description\" content=\"Once upon a time, there was to be a SQL Server-based file system for Windows. This file system would not only let you search on file properties like filename and file length, but also on what&#039;s known as &quot;Extended Properties&quot;. For an idea of what extended properties refers to, have a look at the &quot;Properties&quot; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/\" \/>\n<meta property=\"og:site_name\" content=\"Bob Beauchemin\" \/>\n<meta property=\"article:published_time\" content=\"2010-11-09T15:05:00+00:00\" \/>\n<meta name=\"author\" content=\"Bob Beauchemin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bob Beauchemin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/\",\"name\":\"Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\"},\"datePublished\":\"2010-11-09T15:05:00+00:00\",\"dateModified\":\"2010-11-09T15:05:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Full-Text Search\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/full-text-search\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Using SQL Server Denali Full-Text Search With Extended Properties\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/\",\"name\":\"Bob Beauchemin\",\"description\":\"SQL Server Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e\",\"name\":\"Bob Beauchemin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g\",\"caption\":\"Bob Beauchemin\"},\"sameAs\":[\"http:\/www.sqlskills.com\/blogs\/bobb\/\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/","og_locale":"en_US","og_type":"article","og_title":"Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin","og_description":"Once upon a time, there was to be a SQL Server-based file system for Windows. This file system would not only let you search on file properties like filename and file length, but also on what&#39;s known as &quot;Extended Properties&quot;. For an idea of what extended properties refers to, have a look at the &quot;Properties&quot; [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/","og_site_name":"Bob Beauchemin","article_published_time":"2010-11-09T15:05:00+00:00","author":"Bob Beauchemin","twitter_misc":{"Written by":"Bob Beauchemin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/","name":"Using SQL Server Denali Full-Text Search With Extended Properties - Bob Beauchemin","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website"},"datePublished":"2010-11-09T15:05:00+00:00","dateModified":"2010-11-09T15:05:00+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/using-sql-server-denali-full-text-search-with-extended-properties\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/"},{"@type":"ListItem","position":2,"name":"Full-Text Search","item":"https:\/\/www.sqlskills.com\/blogs\/bobb\/category\/full-text-search\/"},{"@type":"ListItem","position":3,"name":"Using SQL Server Denali Full-Text Search With Extended Properties"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/","name":"Bob Beauchemin","description":"SQL Server Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/bobb\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/62bfa986c5b5d28fcffd8b4fc409c73e","name":"Bob Beauchemin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/bobb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f80e6cc667410857fa6a21931dc528b8092f4d112bf7a8ff7c267674d44ee37?s=96&d=mm&r=g","caption":"Bob Beauchemin"},"sameAs":["http:\/www.sqlskills.com\/blogs\/bobb\/"],"url":"https:\/\/www.sqlskills.com\/blogs\/bobb\/author\/bobb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/comments?post=586"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/posts\/586\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/media?parent=586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/categories?post=586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/bobb\/wp-json\/wp\/v2\/tags?post=586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}