Skip to main content.
home | support | download

Back to List Archive

RE: Possible to reverse sort on secondary in config

From: <moseley(at)not-real.hank.org>
Date: Fri Jun 06 2003 - 14:17:13 GMT
On Fri, Jun 06, 2003 at 07:01:46AM -0700, Jody Cleveland wrote:

> No, I actually had this in search.cgi:
> 	sorts		   => [qw/swishrank swishlastmodified swishtitle
> swishdocpath/],
> 	secondary_sort => [qw/swishdocsize asc/]'
> 
> But, that didn't seem to work. Well, it half worked. It would sort by
> rank, then title, but it would sort desc for size.

Ok, might have to wait as I'm about to go out for the morning.

> > So you can do something like change:
> 
> >    # Set the sort option, if any
> >    return unless $self->set_sort_order;
> 
> I didn't see that in the config file at all. So, I just added this:
> 
> >    my @sorts = qw/ swishrank desc swishdocsize/;
> >    $self->swish_command( '-s', @sorts );

I'm not sure which version of swish.cgi you are using.  You can either 
send me directly a copy of your swish.cgi and wait until I can get to 
it, or you can do what I'll do: open swish.cgi, search for "sorts" and 
see how it adds the -s parameters to the command line.  And then hack it 
to manually add the sort parameters you want.

> Didn't like it. It gave me this error:
>  Error message:
> Premature end of script headers: search.cgi

That's a secret coded message that says: "look in the error log file".

-- 
Bill Moseley
moseley@hank.org
Received on Fri Jun 6 14:17:18 2003