[Back to the list]
On Fri, Apr 01, 2005 at 10:42:28AM +0200, CheHax wrote:
> > For indexing? Just have a script read the database and feed the data
> > to swish in a pipe.
> Ok well I figured that out now, but does the prog has to be in PERL ?
> Or can it be any language, not a PERL script but a VB one for example.
I suspect the docs explain that, but -S prog input method can read
either from a pipe or from stderr. So, swish has no idea what is
generating the data. Perl just happens to be a tool well suited for
this kind of task.
> > The dll is in windows, AFAIK. Sorry, I don't really know what a COM
> > object is.
> A COM object is one you can use in ActiveX for instance and use like :
> set mySE = Server.CreateObject("Swish-e.Search")
> mySE.IndexFile = "c:/se/myindex.idx"
> mySE.SearchString = "how to use a pipe for swish-e"
> mySE.AddProperty PrimaryKey, TableName
> mySE.Boundaries 0, 10
> myResult = mySE.GetResultArray
> set mySE = nothing
>
> I wonder if I could build a COM object like that with the DLL. I
> should give it a try.
The Perl module included in the swish distribution, SWISH::API, does
basically the same thing -- it takes the C procedural interface and
provides an object interface to the library in Perl. So I suspect you
could do that with like your example above.
--
Bill Moseley
moseley@hank.org
Received on Fri Apr 1 06:06:12 2005