이것은 SQL의 전체 텍스트 색인에서 이상한 행동으로 보입니다.MS SQL FTI - "n *"에서 검색하면 숫자가 표시됩니다.
FTI는 인덱스에 "NN"접두사가있는 번호를 저장하므로 "123"은 "NN123"으로 저장됩니다.
사용자가 N으로 시작하는 단어 (즉 'n *'을 포함)를 검색하면 모든 숫자가 표시됩니다.
그래서 :
select [TextField]
from [MyTable]
where contains([TextField], '"n*"')
반환 값 : 마지막 행을 제외하는 좋은 방법이
MyTable.TextField -------------------------------------------------- This text contains the word navigator This text is nice This text only has 123, and shouldn't be returned
있습니까? 이에 대한 일관된 해결책이 있습니까?
그 추가 ","와일드 카드 토큰 작동하게하는 데 필요한 :
select [TextField] from [MyTable] where contains([TextField], 'n*')
리터럴 n 개의 *를 검색 할 것인가 - 어떤이 없습니다입니다.
--return rows with the word text
select [TextField] from [MyTable] where contains([TextField], 'text')
--return rows with the word tex*
select [TextField] from [MyTable] where contains([TextField], 'tex*')
--return rows with words that begin tex...
select [TextField] from [MyTable] where contains([TextField], '"tex*"')