I have a view with full index on fullname. when i run
SELECT *
FROM vwPersonSearch
it returns rows
when I run:
SELECT *
FROM vwPersonSearch
WHERE [Full name] ='Mark RUSH')
开发者_开发百科
It returns one row
when I run:
SELECT *
FROM vwPersonSearch
WHERE contains([Full name],'"Mark*" AND "RUSH*"')
It doesn't return any row. Why so ?
According to the microsoft documentation(See Examples c and D) your usage of the asterisk indicates you are searching for strings that are prefixed with both the terms Mark and RUSH. I don't think this will return anything. Try changing it to this:
SELECT * FROM vwPersonSearch WHERE contains([Full name],'"Mark*" AND "RUSH"')
This will search for strings that are prefixed with Mark and also contain RUSH.
精彩评论