Using Full-Text indexing to crawl binary blobs
<p>If i store binary files (e.g. doc, html, xml, xps, docx, pdf) inside a <code>varbinary(max)</code> column in SQL Server, how can i use Full-Text indexing to crawl the binary files?</p>

<p>Imagine i create a table to store binary files:</p>

<pre><code>CREATE TABLE Documents (
    DocumentID int IDENTITY,
    Filename nvarchar(32000),
    Data varbinary(max),
)
</code></pre>

<p>How can i leverage the <code>IFilter</code> system provided by Windows to crawl these binary files and extract useful, searchable, information?</p>

<p>The motivation for this, of course, is that Microsoft's Indexing Service is derprecated, and replaced with Windows Search. <a href="https://msdn.microsoft.com/en-us/library/ms690319(v=vs.85).aspx" rel="nofollow">Indexing Service provided an OLEDB provider</a> (<a href="https://www.connectionstrings.com/index-server/" rel="nofollow">MSIDX</a> that SQL Server could use to query the Indexing Service catalog. The Indexing Service OLE DB Provider</p>

<p>Windows Search, on the other hand has no way to query the catalog. There is no way for SQL Server to access Windows Search.</p>

<p>Fortunately, the capabilities of Windows Search (and Indexing Service before it) were brought into SQL Server proper. The SQL Server Full-Text indexing service uses the same <code>IFilter</code> mechanism that has been around for 19 years.</p>

<p>The question is: how to use it to crawl blobs stored in the database.</p>