Windows Search SQL-无法访问System.Search.QueryFocusedSummary [英] Windows Search sql - can't access System.Search.QueryFocusedSummary

查看:70
本文介绍了Windows Search SQL-无法访问System.Search.QueryFocusedSummary的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用sql查询Windows Search 4.0.物业 我感兴趣的是:System.Search.QueryFocusedSummary.

I'm trying to query the Windows Search 4.0 using sql. The property of interest for me is: System.Search.QueryFocusedSummary.

我正在尝试从SystemIndex读取此属性.我收到列不存在"的错误消息.我能够阅读其他列,例如:System.Search.AutoSummary.

I'm trying to read this property from the SystemIndex. I get a "column does not exist" error message. I am able to read other columns such as: System.Search.AutoSummary.

我正在使用Microsoft Windows Search 3.x SDK下载 Windows 7操作系统和Windows上的(Windows.Search.Interop.dll) 搜索4.0.

I am using the Microsoft Windows Search 3.x SDK download (Windows.Search.Interop.dll) on a Windows 7 operating System and Windows Search 4.0.

我的查询是:
SELECT TOP 25 System.QueryFocusedSummary From SystemIndex where CONTAINS('microsoft') ORDER BY System.ItemDate DESC

My query is:
SELECT TOP 25 System.QueryFocusedSummary From SystemIndex where CONTAINS('microsoft') ORDER BY System.ItemDate DESC

如何使查询与System.Search.QueryFocusedSummary一起使用?

How can I get the query working with System.Search.QueryFocusedSummary?

代码如下:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Security.Permissions;
using System.Text;
using Microsoft.Search.Interop;

namespace QueryFocusedSummaryTest
{
    class Program
    [Stathread]
    static void Main(string[] args)
    {
        string sqlQuery = "select top 25 System.Search.QueryFocusedSummary from SystemIndex where contains('microsoft') order by System.ItemDate DESC";

        CSearchManager manager = new CSearchManager();
        ISearchCtalogManager catalogMaager = manager.GetCatalog("SystemIndex");
        ISearchQueryHelper queryHelper = catalogManager.GetQueryHelper();

        using (System.Data.OleDb.OleDbConnection conn = new OleDbConnection(queryHelper.ConnectionString))
        {
            conn.Open();

            using (OleDbCommand command = new OleDbCommand(sqlQuery, conn))
            {
                OleDbDataAdapter ds = new OleDbDataAdapter(command);
                DataSet ds = new DataSet();
                ds.Fill(ds);
                command.ExecuteNonQuery();
                //By now it has thrown the exception saying that the column is not found.
            }
        }
    }
} 

推荐答案

以下是有关可用于oledb接口的列的链接:

Here is a link about columns available for oledb interface:

https://web. archive.org/web/20120615190325/http://www.ariankulp.com/downloads/WindowsShellOLEProperties.txt

似乎System.Search.QueryFocusedSummary没有公开,而System.Search.AutoSummary是公开的.也许这就是为什么您无法获得该专栏的原因.

Seems System.Search.QueryFocusedSummary is not exposed, while System.Search.AutoSummary is. Maybe that's why you can't get the column.

这篇关于Windows Search SQL-无法访问System.Search.QueryFocusedSummary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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