From: quangas on
I store word documents as var binary and use FullText search to look inside
the word documents. The FullText search returns the Id's/Title's of these
documents but how is it possible to get a sentence from inside the word
document where the search word is a match?

An example of this is in sharepoint, when you search a document, it returns
the title of the document with a brief description bolding the search text
and a link to the document. Can anyone point me in the right direction to
retrieve a matching sentence inside a document that is found.


From: Michael Coles on
There's no simple answer to this. Basically the functionality is not built
into SQL Server for this. SQL Server FTS is based on the same core
technology that SharePoint uses for search, but hit-highlighting is not
supported in SQL Server. The SQL full-text index doesn't expose the
position of words in documents... You can simulate hit-highlighting
server-side in SQL 2008 (sort of...) with the dm_fts_parser DMF and
CHARINDEX, but it's not 100% effective.

--
Thanks

Michael Coles
SQL Server MVP
Author, "Expert SQL Server 2008 Encryption"
(http://www.apress.com/book/view/1430224649)
----------------

"quangas" <quangas(a)discussions.microsoft.com> wrote in message
news:9EF0813A-03CC-47BD-A6FE-AB082EF6F260(a)microsoft.com...
>I store word documents as var binary and use FullText search to look inside
> the word documents. The FullText search returns the Id's/Title's of these
> documents but how is it possible to get a sentence from inside the word
> document where the search word is a match?
>
> An example of this is in sharepoint, when you search a document, it
> returns
> the title of the document with a brief description bolding the search text
> and a link to the document. Can anyone point me in the right direction to
> retrieve a matching sentence inside a document that is found.
>
>