Hi Luke,
You need to update DCS_Product_Search in this way so that the result set be exact and related to the search criteria:
replace this line ( the first where cluase of Unions) :
WHERE CONTAINS(p.*,' + QUOTENAME('FORMSOF(INFLECTIONAL,' + QUOTENAME(dbo.DSC_Escape(dbo.DSC_Escape(Value, N'\'), N';'), '"') + ')', '''') + ')
with this one :
WHERE p.productName Like ' + QUOTENAME( '%'+dbo.DSC_Escape(Value, N'\') +'%','''') + '
This will put the exact result set in the query while keeping all other union queries. if you could make the result ASP in three section in future that will be fine.
They are : 1- Exact Prodcuts
2- Other Products
3 -Pages
Thanks,
|