I've been quite busy these days looking up which was the best way to create
a full-text search catalog for a field composed entirely of HTML content, a
nd I found out that the best way to handle it, so it could ignore HTML tags
as the search was performed, was to make the column an Image-type field, and
associate a file type in a separate column.
I developed a small application that read each of the text field entries, co
nverted it to a byte[] variable using the UnicodeEncoding class (and it's Ge
tString and GetBytes methods) and saved the resulting byte array as a binary
file in the new image field. I even tested how the field data would fare in
a physical file, by using a FileStream to write the Byte[] data on several
different records.
So far, so good. It all seemed to be working. The problem is that after I bu
ild up the full-text catalog (using the wizard, and specifying the file type
field related to the "image" field where the HTML file is stored), I get no
resulting records whenever I perform a query using either CONTAINS or FREET
EXT. Such queries worked just fine when the field was a text field instead o
f an image field, so I'm guessing something went wrong either on the data co
nversion, or on the catalog building process.
Anyone has any ideas?On Wed, 23 Nov 2005 16:45:54 -0600, bacusgod wrote:
(snip)
>Anyone has any ideas?
Hi bacusgod,
You might want to try reposting this in the group where the full text
experts hang out: microsoft.public.sqlserver.fulltext
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Showing posts with label html. Show all posts
Showing posts with label html. Show all posts
Friday, February 24, 2012
fulltext search HTML problem
Hi,
currently we use text field in table to store HTML, and we use fulltext index to search this field, but we can not always get right results, for example, given text - "<P><STRONG>Access High Resorts<BR>", I can not get result if I search for "Access" or "cce", but if fine if I search for "High" or 'Resor", since I use CONTAINS, and CONTAINS can not search for postfix.
I know I can create another image data type field, and seach will filter HTML tag, but it will take long time to do.
Is there a way I can search postfix or mid-field of word in fulltext search? any idea or suggestion?
Thanks in advancethe sample string should like this - "<P><STRONG>Access High Resorst<BR>"
currently we use text field in table to store HTML, and we use fulltext index to search this field, but we can not always get right results, for example, given text - "<P><STRONG>Access High Resorts<BR>", I can not get result if I search for "Access" or "cce", but if fine if I search for "High" or 'Resor", since I use CONTAINS, and CONTAINS can not search for postfix.
I know I can create another image data type field, and seach will filter HTML tag, but it will take long time to do.
Is there a way I can search postfix or mid-field of word in fulltext search? any idea or suggestion?
Thanks in advancethe sample string should like this - "<P><STRONG>Access High Resorst<BR>"
Subscribe to:
Posts (Atom)