c# - ASP.NET 中的 Microsoft Search Server 或 Microsoft Search Service

标签 c# asp.net microsoft-search-server

我在使用索引服务器的 Windows Server 2008 r2 中使用 ASP.NET 4.6.1。

我使用 Microsoft OLE DB Provider for Microsoft Indexing Service,相同的 Provider MSIDXS

现在,我想使用 Windows Server 2012 r2。

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

如何在 ASP.NET 中使用 Microsoft Search?

我很困惑:我使用的是 Windows Search Server 还是 Windows Search Service

需要哪个OLE DB 提供程序

如何安装Windows Search Server

如何安装Windows Search Service? (可能是 Windows 2012 R2 中的功能)

Downloading and installing Windows Search Server does not install the OLE DB provider. Neither does installing the Windows SDK. The provider is installed when the Windows Search Service is installed.

On Win7/8 desktop OS, this is installed be default (I believe). On server Windows Server 2012, you have to enable the feature.

我在 Windows 2008 R2 + ASP.NET 中使用索引服务器的代码:

            // Catalog Name
            string strCatalog = txtNombreCatalogo.Text;
            string strQuery = "";

            strQuery = "Select DocTitle,Filename,Size,PATH,URL";
            strQuery += ", DocAuthor, vpath, Write, Rank, Create, Characterization, DocCategory";
            strQuery += " from Scope()  where FREETEXT('" + txtNombreFichero.Text + "')";

            // txtNombreFichero.Text is the word that you type in the text box to query by using Indexing Service.

            string connstring = "Provider=MSIDXS;Integrated Security .='';Data Source=" + strCatalog;
            //connstring = "Provider=MSIDXS.1;Integrated Security .='';Data Source=" + strCatalog;

            var conn = new System.Data.OleDb.OleDbConnection(connstring);
            conn.Open();

            var cmd = new System.Data.OleDb.OleDbDataAdapter(strQuery, conn);

            var testDataSet = new System.Data.DataSet();

            cmd.Fill(testDataSet, "SearchResults");
            DataView source = new DataView(testDataSet.Tables[0]);
            dgResultados.DataSource = source;
            dgResultados.DataBind();

最佳答案

I'm confused: I use Windows Search Server or Windows Search Service ?

您使用索引搜索(https://msdn.microsoft.com/en-us/library/ee805985(v=vs.85).aspx)。

Which OLE DB provider is required ?

要使用 Windows 搜索服务,请使用“Provider=Search.Collat​​orDSO;Extended Properties='Application=Windows'; Data Source=(local);”

How install Windows Search Server ?

要使用 Windows Search Server,您应该下载并安装 Microsoft Search Server(基于共享点)https://www.microsoft.com/en-us/download/details.aspx?id=18914 .

关于c# - ASP.NET 中的 Microsoft Search Server 或 Microsoft Search Service,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37748658/

相关文章:

c# - Web 窗体项目中的小写 URL

ASP.NET 使用 FileStream 读取 xml (FileMode.Open) -> System.UnauthorizedAccessException

c# - 格式化某些绑定(bind)到 Repeater 的项目的输出

sharepoint - MS Search Server 2010 Express : Issue with crawl rules for site requiring cookie

c# - SqlCommand.ExecuteNonQuery() 总是返回 0

c# - 缓存局部 View Asp.net MVC 5

c# - 根据定义,值类型是不可变的吗?

c# - 仅当来自比较可枚举的所有(非原始)值都包含在目标可枚举中时才返回结果的查询