>Not realy : it's much more flexible if you do it outside than
>inside of SWISH. Think to the following cases :
>- You want to print the result in reverse order
>- You want to be able to display the total number of result
>- You want to display a list of pages so that it's possible to jump
> directly to one or another...
> (Ie : Page : 1 | 2 | 3 | 4 -> next ).
> All this is trivial in the outside program. But doing it inside
> SWISH would simply made it impossible to customize without modifing
> the core program.
All of these features could be implemeted in the CGI even if swish-e could
be called with a -S skip function.
- Print results in reverse order would be tricky. You'd need to call
swish-e once with a maxhits of zero to get the number of total hits. Once
you have that number, it'd be easy to call using a maxhits of Number of
Results and a skip of Number of Results - n then outputting the results in
a descending loop. For this feature I'd choose not to use the skip option.
- The total number of results is available in the returned comments.
- Displaying links to next hits would be as easy as parsing the Number of
Results from the comments and looping through the link output, incrementing
skip and maxhits by n for each.
>What you need is a good front-end to SWISH-E. (better than the current
>demo script). It can be included in the distribution. It can be
>writen in C if you want.
That's true enough, but from the perspective of someone helping to develop
an interface to swish-e that supports multiple pages, it would be a LOT
easier if I could just tell swish-e to skip the first n results.
>But it doesn't make sense to add those features inside of SWISH itself.
For me it does. It makes the work a lot easier for the end user writing
custom interface scripts. It would be OPTIONAL; no need to use it if you
don't want to.
I don't want to see the swish-e code cluttered with special-case options
that are only of use to a couple people, but I feel that this change would
be of user to quite a few users.
Jason Birch - firstname.lastname@example.org
GIS Applications Programmer / System Admin
Pacific Spatial Systems Ltd. (www.pssltd.com)
Ph: 250.756.9831 Fx: 250.756.9840
Received on Fri Jan 22 12:17:19 1999