On Fri, 14 Mar 2003, J Robinson wrote:
> Hello All:
>
> I'm looking at swish.cgi (from the current dev version
> of swish-e) and I'm wondering what's the
> best way to have it supply a simple "search" box - I
> don't want any of the extra "limit search to", "sort
> by", or "select date range" features presented on the
> page.
>
> Is there a 'best practices'-type way to have the
> output from swish.cgi have a single search textfield
> and "Search" button, followed by the Results for that
> search?
Kind of. Here's a config file that disables those features.
They could also be commented out in the config of the swish.cgi script.
moseley@bumby:~/swish-e/example$ cat .swishcgi.conf
return {
metanames => undef,
date_ranges => undef,
sorts => undef,
};
But you will also need this change in the script, though:
Index: swish.cgi
===================================================================
RCS file: /cvsroot/swishe/swish-e/example/swish.cgi,v
retrieving revision 1.38
diff -u -r1.38 swish.cgi
--- swish.cgi 7 Mar 2003 23:23:23 -0000 1.38
+++ swish.cgi 14 Mar 2003 20:41:34 -0000
@@ -1279,7 +1279,7 @@
my $metaname = $q->param('metaname') || 'swishdefault';
- return unless $self->is_valid_config_option( $self->config('metanames'), 'Bad MetaName provided', $metaname );
+ return unless $self->is_valid_config_option( $self->config('metanames') || 'swishdefault', 'Bad MetaName provided', $metaname );
# save the metaname so we know what field to highlight
# Note that this might be a fake metaname
--
Bill Moseley moseley@hank.org
Received on Fri Mar 14 20:47:29 2003