使用全文属性的精确单词搜索 [英] Exact Word Search Using Full text Property
问题描述
我有一个包含50000行的表,我想在一列中搜索一些特定的文本..
i use像%%,方法和它给我的结果是平均3分钟,'
所以我使用全文搜索,它运作良好
但现在我的问题是全文搜索不支持精确的单词搜索...
所以在这种情况下我该怎么办..
我只想让我的查询在服务器超时之前给出结果...
请帮助
i have a table which contain 50000 rows, and i want to search some specific text in One column..
i use Like % %, Method and it give me result in avg 3 min,'
So i use Full text search and it work well
but now My Problem is Full text Search not support Exact Word Search...
so what can i do in this situation..
I Just want that my Query give Result before Server Time Out...
please Help
推荐答案
是的,如果你能提供一些有助于我们更好地理解你的问题的代码片段。
但是我从你的理解中得到了什么问题是,你试图在一个列中找到一个特定的单词或短语,如果这是目标,你可以使用CONTAINS键区来做到这一点;
Yes right, if you could provide some code snippet that would help us to understand your problem better.
But what I understand from your question is, you are trying to find a specific word or phrase in a column, if that is the objective, you could do that using CONTAINS key ward as below;
SELECT Comments
FROM ProductReview
WHERE CONTAINS(Comments, '"learning curve"')
如果ProductReview表有一个全文索引,上面的SQL将返回Comments列具有特定短语学习曲线的所有行。
你可以在MSDN网站上获得更多细节;
http://msdn.microsoft.com/en-us/library/ms142583.aspx
The above SQL will return all the rows where Comments column has the specific phrase "learning curve", provided there is a full text index for the ProductReview table.
You could get more detail in MSDN site;
http://msdn.microsoft.com/en-us/library/ms142583.aspx
是的,如果你能提供一些代码片段来帮助我们更好地理解你的问题。
但我从你的代码中理解的是,你正试图在列中找到特定的单词或短语,如果这是目标,您可以使用CONTAINS键区进行,如下所示;
Yes right, if you could provide some code snippet that would help us to understand your problem better.
But what I understand from your code is, you are trying to find a specific word or phrase in a column, if that is the objective, you could do that using CONTAINS key ward as below;
SELECT Comments
FROM ProductReview
WHERE CONTAINS(Comments, '"learning curve"')
如果有ProductReview表的全文索引,上面的SQL将返回Comments列具有特定短语学习曲线的所有行。
你可以在MSDN网站上获得更多细节;
http://msdn.microsoft.com/en-us/library/ms142583.aspx
The above SQL will return all the rows where Comments column has the specific phrase "learning curve", provided there is a full text index for the ProductReview table.
You could get more detail in MSDN site;
http://msdn.microsoft.com/en-us/library/ms142583.aspx
这篇关于使用全文属性的精确单词搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!