Skip to main content.
home | support | download

Back to List Archive

Re: swish-e incremental and -S prog (patch and problem)

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Thu Feb 10 2005 - 20:00:21 GMT
I've added this patch, but I have a few questions:

First, in extproc. patch I reset the update mode back to the original
mode after adding each file.  Otherwise the mode would be left in
whatever it was on the previous document passed in.

I also abort if the update header is passed in.  Well, I guess that
would also get caught with the following:


> +		/* should we dump error here? It seem to work without update mode! - dpavlin */
> +		if (sw->Index->update_mode != MODE_UPDATE && sw->Index->update_mode != MODE_REMOVE)
> +			progwarn("Update-Mode header is supported only if swish-e is invoked in update (-u) mode");

Good question.  I guess -u -r (or without) would set the default mode
if the header is not specified in the source file.

Now this:

> Index: headers.c
> ===================================================================
> RCS file: /cvsroot/swishe/swish-e/src/headers.c,v
> retrieving revision 1.10
> diff -u -w -r1.10 headers.c
> --- headers.c	9 Nov 2004 23:03:53 -0000	1.10
> +++ headers.c	9 Dec 2004 23:08:18 -0000
> @@ -56,6 +56,7 @@
>      {  "Saved as",          SWISH_STRING, 2,  offsetof( INDEXDATAHEADER, savedasheader ) },
>      {  "Total Words",       SWISH_NUMBER, 2,  offsetof( INDEXDATAHEADER, totalwords ) },
>      {  "Total Files",       SWISH_NUMBER, 2,  offsetof( INDEXDATAHEADER, totalfiles ) },
> +    {  "Removed Files",     SWISH_NUMBER, 2,  offsetof( INDEXDATAHEADER, removedfiles ) },
>      {  "Total Word Pos",    SWISH_NUMBER, 2,  offsetof( INDEXDATAHEADER, total_word_positions ) },
>      {  "Indexed on",        SWISH_STRING, 2,  offsetof( INDEXDATAHEADER, indexedon ) },
>      {  "Description",       SWISH_STRING, 2,  offsetof( INDEXDATAHEADER, indexd ) },

Total Files includes the deleted files.  Seems like that should be
not include the deleted files.

I think we should also have a header that tracks Removed Words count,
so that will be accurate, too.


> Index: index.c

I reorganized that code.  It would be great if you could look it over
(and test).

Thanks again for your patch and sorry it took so long to get to.


-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Thu Feb 10 12:00:28 2005