Make SQL Server index small numbers

后端 未结 3 611
攒了一身酷
攒了一身酷 2021-01-18 07:51

We\'re using SQL Server 2005 in a project. The users of the system have the ability to search some objects by using \'keywords\'. The way we implement this is by creating a

相关标签:
3条回答
  • 2021-01-18 08:30

    These "small words" are considered "noise words" by the full text index. You can customize the list of noise words. This blog post provides more details. You need to repopulate your full text index when you change the noise words file.

    0 讨论(0)
  • 2021-01-18 08:42

    I knew about the noise words file, but I'm not why your "Terminator 2" example is still giving you issues. You might want to try asking this on the MSDN Database Engine forum where people that specialize in this sort of thing hang out.

    0 讨论(0)
  • 2021-01-18 08:45

    You can combine CONTAINS (or CONTAINSTABLE) with simple where conditions:

    SELECT * FROM Movies WHERE CONTAINS(Title, '"Terminator 2"') and Title like '%Terminator 2%'

    While the CONTAINS find all Terminator the where will eliminate 'Terminator 1'.

    Of course the engine is smart enough to start with the CONTAINS not the like condition.

    0 讨论(0)
提交回复
热议问题