OK so I worked out I could use the Thesaurus with CONTAINSTABLE and that has got me further as results seem a little easier to contain - however now having issues with replacement in the Thesaurus.I have the following section : <replacement> <pat>mower</pat> <pat>mowers</pat> <pat>lawnmowers</pat> <sub>lawnmower</sub> </replacement>
Using the following query I get :SELECT * FROM sys.dm_fts_parser ('FORMSOF(THESAURUS,"mowers")', 1033, 0, 0)
this result :0x006C00610077006E0077006D006F007700650072 1 1 1 Exact Match lawnwmower 4 mowers
So it looks like it has worked? But using the query below to try and return some results gives me nothing at all as if the replacement isn't happening?select tblp.productid,tblp.productcode,tblp.description,webinclude,KEY_TBL1.RANK from tblProduct tblpINNER JOIN CONTAINSTABLE(tblProduct, *, N'FORMSOF(THESAURUS,"mowers")') AS KEY_TBL1 ON tblP.ProductID = KEY_TBL1.[KEY] ORDER BY KEY_TBL1.RANK DESC
Same for "mower" and "lawnmowers" as the search term. Also tried setting up the replacement with and without plurals. When I search just for "lawnmower" (as I want the replacement to do) the query works perfectly.