Skip to main content.
home | support | download

Back to List Archive

C# Wrapper Update

From: Deane Barker <deane(at)not-real.blendinteractive.com>
Date: Mon Sep 11 2006 - 14:29:14 GMT
A few months ago, I asked if anyone had written an C# wrapper for
Swish-E.  If not, I offered to write one.

Well, we have gone and written this.  We're not quite ready to give it
up to community yet (we need to polish it a bit), but it seems to work
well.  It's a combination of two C# classes -- a command line
interface, and a Swish-E wrapper for that.  We've implemented on one
ASP.Net site with great success.

It works kind of like this:

---------------

SwishESearch SearchObject = new SwishESearch();
SearchObject.SetExecutableLocation(@"C:\Program Files\SWISH-E\swish-e.exe");
SearchObject.AddIndex(@"C:\Index\MyIndex.index");

SearchObject.AddMeta("swishrank", "rank");
SearchObject.AddMeta("url");
SearchObject.AddMeta("swishtitle", "title");
SearchObject.AddMeta("swishdescription", "preview");
SearchObject.AddMeta("date");
SearchObject.AddMeta("author");
SearchObject.AddMeta("keywords");

SearchObject.AddSearchText(SearchString);

SearchObject.SetPageWeight(20);
SearchObject.SetPageNumber(1);

XmlDocument SearchResults = SearchObject.GetResults();

--------------------

And it returns an XML document that can be parsed, manipulated,
transformed, etc.

So, anyway, just an update.  We're implementing on two more sites in
the next few weeks, which will hep shake some more bugs out of it.  We
hope to release it to the community in October.

Deane
Received on Mon Sep 11 07:29:16 2006