I have an odd problem with Windows Search engine. When I search for the Greek word, Όρος, in the Windows 10 Start menu search bar, I get the expected results.
When I search via VB.Net it fails to find any results. I've narrowed the issue to the final letter 'ς'. Removing it allows the search to succeed. Anyone know what the problem could be?
Dim t As String
t = UCase("Όρο") ' success
't = UCase("Όρος") ' fails
Dim connection = New OleDbConnection("Provider=Search.CollatorDSO;Extended Properties=""Application=Windows""")
Dim query1 = "SELECT System.ItemName FROM SystemIndex " +
"WHERE System.ItemName LIKE '%" & t & "%'"
connection.Open()
Dim Command = New OleDbCommand(query1, connection)
Dim r
Try
r = Command.ExecuteReader
Catch
Debug.WriteLine("Search failed!")
Return
End Try
Dim c = 0
While (r.Read())
c += 1
Debug.WriteLine(r(0))
End While
Debug.WriteLine("Total:" & c)