windows-search

Getting context around search string in results from Windows Search

▼魔方 西西 提交于 2019-12-05 17:29:21
I have code in my project that uses Windows Search to look through file contents for a string I provide. SELECT System.ItemName, System.ItemType, System.Search.Rank FROM SYSTEMINDEX WHERE SCOPE='file:C:/NiftyFolder' AND CONTAINS(System.Search.Contents,'"SEARCH STRING"') I get the proper search results but I'd like to go a step further and get the context around my search string. I'm showing the search results on a webpage and ideally, I'd like something similar to what you get in Windows when you have the proper iFilters installed. I've got the file type, path, and name but is there a System.?

How to add folder into windows indexing list with windows search api

混江龙づ霸主 提交于 2019-12-04 07:51:15
In Indexing Options, there’s a list of locations in ‘Index these locations’, is there a way to add a folder which created from my app into the list through c#? I have found a solution, anyone who want to let their app folder to support windows search in C# can do like below: Download Windows Search API ( http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=7388 ) Import Micosoft.Search.Interop namespace. write the code Uri path = new Uri(location); string indexingPath = path.AbsoluteUri; CSearchManager csm = new CSearchManager(); CSearchCrawlScopeManager manager = csm

Change System.DateModified format on Windows Search

夙愿已清 提交于 2019-12-02 07:11:17
问题 I'm using Windows Indexing search together with PHP to search inside thousands of files. I got it working by using the PHP COM class: $conn = new COM("ADODB.Connection") or die("Cannot start ADO"); $recordset = new COM("ADODB.Recordset"); $conn - > Open("Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"); $recordset - > Open("SELECT System.ItemName, System.DateModified FROM SYSTEMINDEX WHERE DIRECTORY='file:C:/xxxx/' AND CONTAINS('xxxx')", $conn); $recordset - >

Can I register/install Search.CollatorDSO.1 manually

[亡魂溺海] 提交于 2019-12-01 18:27:59
I'm currently trying to search through some indexed files using the windows.search service. My problem is that windows search cannot be installed on the web server because its a 'web edition'. Error message received is: Search.CollatorDSO.1 provider is not registered on the local machine However the index that I'm searching is on another server which does have windows search installed and I'm querying it remotely. This was all working fine in development but only because I have windows.search installed on my dev box. My question is whether it's possible to get the provider to run on the web

ASP.NET OLEDB code breaks when deployed on IIS7

拈花ヽ惹草 提交于 2019-11-30 21:01:40
I'm trying to write a simple website (ASP.NET v4), which will call Windows Search, find a specific file and return it to the user. I've put together the following as an example: it calls the Windows Search service on "remoteserver", and returns the path of "somefile.txt": OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"; OleDbCommand cmd = conn.CreateCommand(); cmd.CommandText = string.Format( "SELECT System.ItemPathDisplay, System.ItemType FROM " + " sytelhp.systemindex WHERE SCOPE='file:/

ASP.NET OLEDB code breaks when deployed on IIS7

ε祈祈猫儿з 提交于 2019-11-30 17:08:05
问题 I'm trying to write a simple website (ASP.NET v4), which will call Windows Search, find a specific file and return it to the user. I've put together the following as an example: it calls the Windows Search service on "remoteserver", and returns the path of "somefile.txt": OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"; OleDbCommand cmd = conn.CreateCommand(); cmd.CommandText = string.Format(

Query Windows Search from Java

自作多情 提交于 2019-11-28 01:15:35
I would like to get to query Windows Vista Search service directly ( or indirectly ) from Java. I know it is possible to query using the search-ms: protocol, but I would like to consume the result within the app. I have found good information in the Windows Search API but none related to Java. I would mark as accepted the answer that provides useful and definitive information on how to achieve this. Thanks in advance. EDIT Does anyone have a JACOB sample, before I can mark this as accepted? :) You may want to look at one of the Java-COM integration technologies. I have personally worked with

Windows search - full text search in c#

倖福魔咒の 提交于 2019-11-27 19:49:14
I am looking for a code that gets results of full text search using Windows search (it should be available in Vista, 7 and 8 by default). I have found some questions here and some texts on msdn, but none of them have some exact code that works. I have tried with Windows API Code Pack (as it is mentioned as one of the interfaces to Windows Search), but it returns results only for file names, not for full text. Here is the code that does work - in example I made it to search for the word "dummy" in the desktop folder: string connectionString = "Provider=Search.CollatorDSO;Extended Properties=\

Windows search - full text search in c#

社会主义新天地 提交于 2019-11-27 05:41:27
问题 I am looking for a code that gets results of full text search using Windows search (it should be available in Vista, 7 and 8 by default). I have found some questions here and some texts on msdn, but none of them have some exact code that works. I have tried with Windows API Code Pack (as it is mentioned as one of the interfaces to Windows Search), but it returns results only for file names, not for full text. 回答1: Here is the code that does work - in example I made it to search for the word