Windows索引文件ole db with like而不是包含

发布于 2025-02-08 07:45:46 字数 1111 浏览 2 评论 0 原文

因此,我遇到了我需要交换此包含的问题,在我的查询中类似。因为当您在单词中搜索仪表板时,“ 12-0430-1”,则包含的结果也仅包含12或0430或1。 /learn.microsoft.com/en-us/troubleshoot/sql/admin/dashes-ignored-search-full-text-msidxs-queries“ rel =“ nofollow noreferrer”>在这里。解决方案也在本文中,但可悲的是只有一种无济于事的方式。解决方案是要包含类似的交换,但是我总是在此编辑的查询中遇到错误:

SELECT TOP 2000 System.FileName 
FROM systemindex  
WHERE DIRECTORY = 'C:\Path...' 
  AND (System.FullText Like ('%12-0430-1%'))  
ORDER BY System.DateCreated DESC

错误是因为列不存在,但是对于Ole DB搜索,我只找到了这个较旧的站点,该网站指定哪些列可以是搜索。

在我不需要之前,因为我使用的是:

ole-db查询:对于22-0130-1选择顶级2000系统。 systemIndex其中目录='c:\ path'and(包含) ('“ 12-0430-1*”))按系统订购。datecreateddesc

因此,有人可以将我链接给我一个页面,其中一个可以通过Windows索引文件搜索的当前列或说明存在哪个列并将工作,我将在想要搜索文件的索引内容。

编辑这些是我的设置,我创建 OLEDBConnection

OleDbConnection connection =
     new OleDbConnection("Provider=Search.CollatorDSO;Extended Properties='Application=Windows';");

So I have the problem that I need to exchange this contains, with a like in my query. Because when you search with a dash in a word so "12-0430-1" then the contains produces results that also contain only 12 or 0430 or 1. This is intended and also spoken about by microsoft here. Also the solution is in this article, but sadly only in a way that does not help. The solution is to exchange contains with like, but I always get an error with this edited query:

SELECT TOP 2000 System.FileName 
FROM systemindex  
WHERE DIRECTORY = 'C:\Path...' 
  AND (System.FullText Like ('%12-0430-1%'))  
ORDER BY System.DateCreated DESC

The error says because the column does not exist, but for OLE DB search I only found this older site which specifies which columns can be searched.

Before I did not need it because I used contains:

Ole-DB query: for 22-0130-1 SELECT TOP 2000 System.FileName FROM
systemindex WHERE DIRECTORY = 'C:\Path' AND (CONTAINS
('"12-0430-1*"')) ORDER BY System.DateCreated DESC

So could somebody please link me a page with the current columns that can be searched over windows indexed files or say which column exists and would be working, I want to search through the indexed contents of the file.

Edit these are my settings with which I create the OleDBConnection:

OleDbConnection connection =
     new OleDbConnection("Provider=Search.CollatorDSO;Extended Properties='Application=Windows';");

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文