Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:62] Coredump & index file empty

From: Jim Winstead <jimw(at)>
Date: Wed Nov 12 1997 - 19:07:48 GMT
On Nov 11, J.J. Merelo Guervos wrote:
> 	I am new to this list, and I am having trouble with
> swish. Lots of them. And I have several questions.
> 1. Is swish still being developed, after swish-e? All statementes in
> the web page seem to be in the past: was being developed, and so on.

As far as I can tell, swish-e is still being actively developed. There
are others (like me), who have their own hacked-up versions of swish as

> 2. Is there any information on the "guts" of swish? Or some kind of
> "programmer's" manual so that it can be used as a library.

You have the source. :) Seriously, though, it's not really that
complicated, although the source isn't organized all that well.

I found that turning swish into a library wasn't difficult at all
(trivial, actually). You basically just want to leave out the swish.o file
(to avoid having a main() in the library) and write your own function
modeled on the search() function to do your searching. This is what I
did to make a PHP3 module for swish searching. It's a beautiful thing
not having to launch another process to do searches. :)

> 3. My real question: I am using swish-e for indexing on an Solaris
> 4-processor machine, and then using the indices on a Linux
> machine. Sometimes, I find a coredump, and then any search on the
> index, which seems to be complete, says "index file is empty", despite
> it takes 5 megs. Any ideas?

It sounds like the index file is getting corrupted. This means that the
getindexfilenum function (in merge.c) is returning 0. You should make
a backup of the index, and do a file-compare after one of these core-dumps.
It would at least confirm that it is modifying the index file. (Although
this would be surprising, since the index files are opened read-only when

> 4. Well, another question: any idea of how to optimize swish so that
> it's faster/takes less memory or something?

Not yet. I'd love to hear about it if anyone has profiled swish. I don't
doubt that there are optimizations to be made.

Received on Wed Nov 12 11:15:38 1997