April 13, 2009 at 11:29 am
Hi,
I have a table with a column called description which stored product related information. The column has been included for full text search. This is :
SELECT ...
FROM ...
WHERE CONTAINS ( *, @ftsQuery )
where ftsQuery is the search string.
It is working as expected. However, if a search is being made with part of a word - it's not returning the desired result.
Example: I have a record with the description "personal computer backup"
When the above query is executed with ftsQuery='backup' it's returning the record. However - if the search is made with ftsQuery='back' - it's not returning a row.
Is there a way to modify the the way of indexing or query to make it work on both the cases?
Thank you.
[font="Comic Sans MS"]--
Sabya[/font]
April 14, 2009 at 3:49 am
Any help on this guys ...
[font="Comic Sans MS"]--
Sabya[/font]
April 15, 2009 at 11:43 am
A few things to solve your problem. All are in the BOL.
1. to search for plurals, word variants, etc. see FORMSOF and INFLECTION.
http://technet.microsoft.com/en-us/library/ms142566(SQL.90).aspx
Example:
WHERE CONTAINS(curriculum_vite, 'FORMSOF (INFLECTIONAL, skate)')
This matches curriculum_vite values that contain words such as 'skate', 'skates', 'skated', and 'skating'.
2. To search for terms beginning with a string (wildcarding) see: http://technet.microsoft.com/en-us/library/ms142492(SQL.90).aspx
Note that this is not a "put anywhere" wildcard. It can only be placed in specific locations and has side-effects when performing a phrase search. E.g., it will wildcard ALL of the terms.
Also see the transform noise words option and what it does for phrase searches.
http://technet.microsoft.com/en-us/library/ms187914(SQL.90).aspx
And lastly, see Hilary Cotter's article at:
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply