New Spotlight clone

This posting is provided "AS IS" with no warranties, and confers no rights.

blah blah blah

You have two options there...

You can use the Query.SearchDesktop class and the ExecuteQuery method, or you can use the wrapper class "SampleWrapper.QueryBuilder" by including QueryBuilder.cs in your project. It shouldn't matter that it's CSharp and you're using VB, that's part of the beauty of .NET :)

The QueryBuilder class should give you IntelliSense support and make working with the API a little easier.

Otherwise, to use the COM interface, try this:

Open VS 2003 and create a new VB.NET "Windows Forms" project. Add a reference to WDSQuery.dll.

Drop a DataGrid control from the toolbox onto the form, and size it reasonably. Leave the name as "DataGrid1" for now.

Copy and paste this code into the vb file:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim mSearchClass As New Microsoft.Windows.DesktopSearch.Query.SearchDesktopClass

Dim resultSet As Microsoft.Windows.DesktopSearch.Query._Recordset

resultSet = mSearchClass.ExecuteQuery("test", "DocTitle,DocAuthor,Url", "DocTitle", Nothing)

Dim DataSet1 As New System.Data.DataSet

Dim DataTable1 As New System.Data.DataTable

DataSet1.Tables.Add(DataTable1)

Dim DataAdapter1 As New System.Data.OleDb.OleDbDataAdapter

DataAdapter1.Fill(DataTable1, resultSet)

DataGrid1.DataSource = DataSet1

DataGrid1.DataMember = "Table1"

End Sub

Build and run. Your datagrid should be filled with results for the query "test" - you can of course change that to something more pertinent to your index.

VB isn't really my thing, but that works on my system and should give you a basic idea of how to use the COM interfaces.

Watch my blog, I'll do a post for VB developers today or tomorrow. I don't have internet access at my new place til tomorrow morning... that's why I haven't been able to post much :)

http://geekswithblogs.net/bpaddock

#300634

Also thought I'd mentioned that one nice thing about the above solution (using OleDbDataAdapter to convert the ADO recordset into a .NET DataSet object) is that you can do any kind of .NET Databinding that you want on it. In the example I gave, I bound the DataGrid1 control to the result table. But you can also bind a listBox to one column of results (by setting the DataSource and DataMember or DisplayMember properties) , or pretty much anything else that you could do with a live DB connection using ADO .NET.

Unfortunately, with our current implementation you cannot ask for a limited number of results - which is one way to improve perf significantly when dealing with a large list of records. We hope to fix that in a future release. Also, calling the Fill() method will dump all the results from the ADO recordset into the DataTable. I haven't had a chance to do any testing yet, but you might experience better performance if you only fill a certain number of rows to the table, since you won't have to touch n number of records. What you can or would want to do with that is entirely dependent on your app. In some cases (like word wheeling) it's easy to get by with just the top 10 results. In other cases you'll need the entire set anyway.

#300667

i love this-i have a few suggestions thou

is there any way to make it more like the windows search panel in terms of what u can search for(I.E. like system files, folders and things like that) also, maybe increase the number of results per group. FInally, I have to say that it might help ppl if you tell them what the dimensions of the chnage image should be, as i messed it up and had to reinstall it

Other than that this is a great clone and works very well

#303183

Hi guys! just wondering if your spotlight clone has died. it seems we now have at least three other clones on offer qlthough having tested them all it has to be said that Toms was still the most realistic.

Any news for our fans Tom ;)

#304779

Hi,

I am not able to open any of the files that is listed in the search. Am I missing anything? Thanks for the help.

#305138

It is not working. I installed today latest Desktop Search and latest build 18 of Spotlight. I run Google Desktop to index my files but spotlight could not find anything. I just subscribed to this forum to report this. Please can you tell me how to make it work. Thanks

#307719

Read the instructions. You need Google Desktop Search. Install that first. Then if your computer is all patched up properly, like it should be, then Spotlite will install no porblem. If not, run Windows Update. After Spotlite installs, you will be prompted to do a google desktop search. Follow the VERY SIMPLE INSTRUCTIONS on how to get Spotlite to work. Simple.

#309594

Read the instructions. You need Google Desktop Search. Install that first. Then if your computer is all patched up properly, like it should be, then Spotlite will install no porblem. If not, run Windows Update. After Spotlite installs, you will be prompted to do a google desktop search. Follow the VERY SIMPLE INSTRUCTIONS on how to get Spotlite to work. Simple.

But this Google desktop search is too slow and too long, can someone better explain me what does Google Desktop Search do exactly?

#309834

Searches your computer using Google's search technology. :P

#309840

Hi everyone, sorry I haven't updated you guys. I've been tied up with setting up a new home theater pc in my living room. I am back on working on the .net version. It might take a while because I want to make it really full featured and stable when i release it.

#309983

Hopefully with working sort/group/when/where functions? :-D

Also, more of a feature request. How about an option to (perhaps by right-click menu, since it may not actually be in the real Spotlight) open the containing folder, as provided by GDS' web interface. I more often use GDS (and would use Spotlight) to locate and copy/move/edit files than to open them.

It would also be absolutely gorgeous if the expand/close buttons worked :-D.

I love your Spotlight and use it a lot, but as with any Beta app, it can use some improvements.

#310006

TomLapp,

I think, considering the value of the reward we are all so anxiously awaiting, you are allowed to take all the time you need. Except for the fact that it sometimes jumps down from it's corner, I think build #18 is awesome and I'm perfectly fine using it forever. But if you've got something better up your sleeve... well, then, the least we can do is patiently wait.

Thanks again!

#310061

I have a problem with the build #18 installer..

after a few seconds the installer stops with the following message:

"The configuration data for this product is corrupt. Contact your support personnel"

I don't know what to do..

I've already searched through my registry and deleted everything with Spotlight in it..

Got an idea how to solve this problem?

Sorry for my bad English :)

#310631

Just updated Google Desktop to Beta 2 because now it can index external HDs, which is where most of my stuff is stored anyway - YAY!

However, I don't know if Google's own search string has changed, but your spotlight app (the best available at the moment IMHO), doesn't find ANY of my files though Google Desktop Search itself does.

In your "setup" section, it says that the search string looks something like: http://127.0.0.1:4664/search&s=d2wQ2iRxPmd...L03qFxykXCrM?q=

followed by the criteria etc.

But mine looks like: http://localhost:4664/search?q= (the full result being: http://localhost:4664/search?q=xxxxx&flags...LDFn_rv5TvnhdOA where xxxxx is what i search for) and this doesn't seem to work at all

When I load the Google Desktop website, the URL is: http://localhost:4664/&s=onwKiXYnykLd1_kzd9xa1beLoSA&q=

I tried using this as my search string too, but it doesn't work as well. Am I doing something wrong, or has Google itself changed its search string parameters?

I know you're busy but I think your application is fantastic and I'd really love to be able to use it! Thanks.

EDIT: Nevermind ... Fortunately I saved my search string from before I updated to Beta 2 and it seems to still work. But the question remains - why is my search string different as it appears in the browser?

#311524

Quickly going back to the idea of Spotlight opening with the Spotlight button on the taskbar. I think I have a solution for OB users who want to use this. All that needs to change in the code of the app is the hotkey which activates the search bar. If it can be changed to any single key stroke, then small VB script can be written emulate a keystroke when opened. This .vbs could then be shortcutted to the spotlight button on the OB-bar. So to the computer, clicking the spotlight button is like activating the hotkey to show the searchbar... wah-la!

btw, Tom, this app is superb :D I'm gonna download the newest nightly build when i get back from work...

#314279

has anyone been able to get this clone to work with GDS version 2-if so how did u you do it

#314581

Try pasting this in the URL box in spotlight if you want to use this with GDS v2

http://127.0.0.1:4664/search&s=w9bVCWXl2lo...cZzNusyLu7bQ?q=

#314670

no dice-i place it into the url pane but no results show up(and I have GDS 2 running)

#314784

anyone?????? has someone found a solution?

#315192

dang it...

i can't get it to work either... my gds webpage shows up as http://127.0.0.1:4664/search?q=xxxx&flags=...3vnBF8q0zIZuNXA

#315617

and im using gds beta 2 btw

#315618

Hi, me again :)

If anyone is interested in this kind of development for Windows Desktop Search - we now have official develop forums here:

http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=127

#315790

Yeah, I"m having the same problem, I can't get it to work the google desktop beta 2

#316395

Yeah I got the same problem, does not display any results

I tried an old version of goggle desktop search and still get the same, ie no results returned

but works fine when i run from internet explorer /google/desktop search....

tried changing 127.0.0.1 to localhost and makes no difference! (not that i thought it would - but you never know)

anyone out there got any ideas

could something else be blocking it, ie norton internet security or anti-virus?

i tried getchoo (another spotlight light clone - but not as nice ui) and it works, so that the f*** am I doing wrong

please help fellow aquaians.

thank you.

#316905

this sucks.. i cant get it to work..

#317449