FullTextSearchQuery 如何与 SharePoint 2010 和 FAST Search Server 配合使用?

发布于 2024-09-13 04:36:15 字数 1527 浏览 10 评论 0原文

我刚刚安装了一个测试环境,其中 SharePoint 2010 和 FAST Search Server 作为默认搜索服务应用程序。从一些测试内容开始,并使用 std 执行了一些搜索。 SharePoint GUI - 到目前为止一切都很好。

现在我想使用 Microsoft.Office.Server.Search.Query.FullTextSqlQuery 类执行更复杂的查询,事情变得很糟糕。当我尝试访问搜索返回的 ResultTableCollection 对象时,出现异常。

这是我尝试运行的 PowerShell 脚本:

$site = New-Object Microsoft.SharePoint.SPSite "http://moss"
$kq = New-Object Microsoft.Office.Server.Search.Query.FullTextSqlQuery $site
$kq.ResultTypes = [Microsoft.Office.Server.Search.Query.ResultType]::RelevantResults
$kq.RowLimit = 5
$kq.QueryText = "SELECT Title, Url"
$resultTableCollection = $kq.Execute()
$relResultTable = $resultTableCollection.Item([Microsoft.Office.Server.Search.Query.ResultType]::RelevantResults)
And this is the exception (thrown by the last line of code above):
The given key was not present in the dictionary.
System.Collections.Generic.KeyNotFoundException at System.ThrowHelper.ThrowKeyNotFoundException() at
System.Collections.Generic.Dictionary`2.get_Item(TKey key) at
Microsoft.Office.Server.Search.Query.ResultTableCollection.get_Item(ResultType requestedType)

当我使用 std 执行搜索时,相同的脚本可以完美地工作。 SharePoint 搜索服务应用程序。我在这里找到了一篇相关帖子 指出查询结果的安全调整可能是我的问题的根源。但是,我看不出这与我的环境有什么关系,因为我的 FAST 服务应用程序的服务帐户在 AD 上肯定拥有足够的权限。

有什么建议吗?

I just installed a testing environment with SharePoint 2010 and FAST Search Server as the default search service application. Started with some test content and executed a few searches using the std. SharePoint GUI - everything fine so far.

Now I want to execute a more complicated query using the Microsoft.Office.Server.Search.Query.FullTextSqlQuery class and things get nasty. I get an exception when I try to access the ResultTableCollection object returned by my search.

This is the PowerShell Script I'm trying to run:

$site = New-Object Microsoft.SharePoint.SPSite "http://moss"
$kq = New-Object Microsoft.Office.Server.Search.Query.FullTextSqlQuery $site
$kq.ResultTypes = [Microsoft.Office.Server.Search.Query.ResultType]::RelevantResults
$kq.RowLimit = 5
$kq.QueryText = "SELECT Title, Url"
$resultTableCollection = $kq.Execute()
$relResultTable = $resultTableCollection.Item([Microsoft.Office.Server.Search.Query.ResultType]::RelevantResults)


And this is the exception (thrown by the last line of code above):
The given key was not present in the dictionary.
System.Collections.Generic.KeyNotFoundException at
System.ThrowHelper.ThrowKeyNotFoundException() at
System.Collections.Generic.Dictionary`2.get_Item(TKey key) at
Microsoft.Office.Server.Search.Query.ResultTableCollection.get_Item(ResultType requestedType)

The very same script works perfectly when I execute the search using the std. SharePoint Search Service application. I found one related post here that stated the security trimming of the query results could be the source of my problems. However, I cannot see how this should be relevant in my environment since the service account of my FAST Service Application definitely has sufficient permissions on the AD.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

九厘米的零° 2024-09-20 04:36:15

此 API 使用 SQL Server 中的全文搜索功能。您必须在 SQL Server 层将其打开。

该 API 不会与 FAST 集成。您可以使用 FAST,但最终将使用向 QR 服务器发出 http 请求的 API。

This API uses the full text search capabilities in SQL Server. You have to have that turned on at the SQL Server layer.

That API will not integrate with FAST. You can use FAST but you will end up using an API that makes http requests to the QR server.

苯莒 2024-09-20 04:36:15

我不会声称它的功劳,但这个 URL 似乎就是您所追求的 http://fianbakken。 com/wordpress/?p=41

FQL 是一种相当基本的语言,具有简单的操作、AND、OR 等,但绝对可以进行一些杀手级查询来完成您想要的操作。

试图为您挖掘一些公开可用的 FQL 参考,但找不到任何内容。如果您需要更多帮助,请大声喊叫。

干杯

I wont claim credit for it, but this URL seems to be what you're after http://fianbakken.com/wordpress/?p=41

FQL is a fairly basic language with simple operations, AND, OR etc but can definitely make some killer queries that will do what you want.

Was trying to dig up some publicly available FQL reference for you but couldn't find any. If you need more help, give a shout.

Cheers

Ken

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文