On Mon, 24 Mar 2003, greg wrote:
> 2. I'm trying to use the new library API, but have been somewhat
> confused.
>
> a) it appears swish-e.h is a replacement for swish.h ? (can't use both?)
Yes, for better or worse, swish-e.h contains just the functions exported
by the library, and also does not expose the internal layout of the
structures. I think it's a debatable point if using void * for the
"object" data types is a good thing.
You should not use both.
> b) the library in the VisualC++ project does not appear to #include
> "swish-e.h" (it uses swish.h) - should it ?
No. swish-e.h is really the API, but just the exported one. Why does the
"project" need to include the header? The C source files do that.
It's ugly and also a bit risky to have different headers (swish-e.h
contains functions declared in a bunch of different headers), but the
"library" was provided after the binary, so the design has a bit to be
desired. It would have been better to start with the API and then build
on that. Maybe someday things can be rearranged to make it a bit
cleaner.
> N.B. my project #includes swish-e.h and still builds OK it
> works too, but has the following problem:
>
> c) SwishResultPropertyStr only seems to return the path to the
> document, all the other properties e.g. title and description
> return "(null)".
That means the property name passed in the call does not exist in the
index.
>
> I have the following line:
> MetaNames description keywords year
> in my config file so I assume at least description should work?
You are confusing MetaNames with PropertyNames.
> ? I notice that swish-e created a file "docs.idx.prop" maybe
> the library can't find the file?
Swish will abort if the .prop file cannot be found.
> d) My application will have some features that are specific to
> the data it is indexing, but should be OK as the basis for a
> Windows gui for client-side searching. I would be honoured if
> it were (eventually) included in the Swish-e distribution
> (it appears that the Swish-e library is GPL and not LGPL?
> So, as a consequence, I guess my app also becomes GPL?)
Sounds good. As long as it's generic enough for other's to use.
> So if I am intending it to become part of Swish-e:
> Where do I put it in the source tree?
> (currently under src so I #include "../swish-e.h")
I don't know how it works on Windows, but the swish-e.h header file should
go into a standard location (by default it goes in /usr/local/include).
So I'd think you would say #include <swish-e.h> in your source code.
--
Bill Moseley moseley@hank.org
Received on Tue Mar 25 03:28:27 2003