So I have the problem that I need to exchange this contains, with a like in my querry. Because when you searche 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 querry:
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 witch specefies which columns can be searched. Before I did not need it because I used contains:
Ole-DB Querry: 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';");