我有一个搜索框,用户可以在其中键入词条。我有一个在字符串列上进行全文搜索的表设置。假设用户输入:"word,office,microsoft“,然后点击”搜索“。
这是处理多个搜索词的最好方法吗?
(pseudocode)
foreach (string searchWord in searchTerms){
select col1 from myTable where contains(fts_column, ‘searchWord’)
}有没有一种方法可以在sql中包含搜索项而不进行迭代?我正在尝试减少对sql服务器的调用量。
发布于 2011-07-20 09:26:16
我将这个类用于Normalizing SQL Server Full-text Search Conditions
https://stackoverflow.com/questions/798782
复制相似问题