Fulltext query funky.

  • Fulltext results is funky.  I have a text column which holds html.  I am using containstable join.

    Set @SearchText = '"viking*" and "dragon*" and "angel*"'

    CONTAINSTABLE(SX_Bookings_Table, SX_OCR_Text, @SearchText,250)

    I get 2 rows back,  the are correct.  But I am expecting 6.  I have gone through the html for each document I know should be returned and the meet the requirements.  Does anyone have any pointers for me.  I have modified the @SearchText parameters so many different ways.

  • Your query looks okay. Is your fulltext index up to date? When you say you have reviewed the HTML for each document, do you mean that you SELECT the HTML from the text column and examine it? Or are you examining external files?

    Is the datatype of the column that stores the HTML image or text? For HTML, you should probably use the image datatype along with a column containing the file extension ".htm". That way, FT will apply the HTML filter when indexing.

    Anyway, you could run three queries, setting @SearchText to just one of the three words at a time. Display the primary key in the results. Then compare the results and make a list of the keys that appear in all three lists.

    Offhand, it looks like either the ft index is not updated, or there is an issue with the data itself. Maybe some surrounding characters are causing the words to be indexed differently that you expect.

    Since FT indexes whole words, it may have determined that one or more of the words, say "angel", begins with one or more additional characters. Remember, "angel*" will return 'angel' and 'angels', but not 'archangel'

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply