使用NEAR运算符在特定距离进行全文搜索 [英] Full text search at a specific distance using NEAR operator

查看:294
本文介绍了使用NEAR运算符在特定距离进行全文搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询如下:

My query is below:

SELECT FT_TBL.ID,FT_TBL.Description,KEY_TBL.[KEY], KEY_TBL.rank FROM Test AS FT_TBL INNER JOIN CONTAINSTABLE (Test, Description, '(method NEAR system)', 2) AS KEY_TBL ON FT_TBL.ID = KEY_TBL.[KEY];



我将距离设置为2但显示所有记录。我的查询或任何想法有任何变化吗?

我使用的是SQL Server 2008.


I set distance to 2 but it displays all records. Have any changes in my query or any idea?
I m using SQL server 2008.

推荐答案

你见过它: http://msdn.microsoft.com/en-us/library/ms189760.aspx [ ^ ]?



在你的例子中, 2 表示: top_n_by_rank ,返回前2条记录的描述,其中Description列包含单词method靠近系统这个词。



我们需要更多细节来帮助你......;(
Have you seen it: http://msdn.microsoft.com/en-us/library/ms189760.aspx[^]?

In your example, 2 means: top_n_by_rank, returns the description of the top 2 records where the Description column contains the word "method" near either the word "system".

We need more details to help you... ;(


这篇关于使用NEAR运算符在特定距离进行全文搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆