I have an issue with a query I'm running. Basically it's a search on a table of books. This query below uses the FREETEXTTABLE
command to rank the search for an author:
@author = 'lewis c s'
SELECT *
FROM tbl_products
INNER JOIN FREETEXTTABLE(tbl_products, [author], @author, LANGUAGE 'British English') AS key_tbl ON tbl_products.product_id = key_tbl.[key]
WHERE deleted = 0
ORDER BY key_tbl.[rank] DESC, author ASC, title ASC, stl_product_id ASC
The results I get are confusing...the top row returned is by an author called lewis lewis
and lewis c s
ranks below this!
Now I have edited my noiseENG.txt
, removed the single letters and rebuilt my fulltext catalogue but I see no change in my results. I know changing this file is working because I've added lewis
to the list and it filtered out all searches with lewis
in the author column.
Note: If I search for just 'c s' I get no results, so it seems like single letters are being ignored all together! Also, the fields indexed are all set to British English
.
Does anyone know why the FREETEXTTABLE
command would still be filtering out single letters?
Try a phrase search a la: