Skip to main content.
home | support | download

Back to List Archive

Re: Sort by filename

From: <moseley(at)>
Date: Thu Jul 24 2003 - 15:26:11 GMT
On Thu, Jul 24, 2003 at 07:51:06AM -0700, Carlos Rocha wrote:
> I have asked this question before at when I first tried the solution given 
> by Jose it worked fine.
> I added
> metanames swishdocpath to the config file and the -s switch to the command
>    .......   -s swishdocpath asc
> When I installed a fresh copy of Swish-e at a different computer, the result 
> is a random entry at the top and then most of the items in descending order 
> and at the bottom again items is random order.

Can you show an example?

After reviewing the sorting code yesterday I did find some problems, but 
the sort you are doing should work.  (I'm going to work on the sort 
code today.)

> Q2)Going one step further, I would like to sort by filename only, ignoring 
> the file path.
> Do I have to do it programatically within my CGI or there is a way to sort 
> by filename that I am missing?

There's currently no way to do that.  You can extract out parts of the 
path name for indexing (searching) but not as property.  What I'd do is 
use -S prog when indexing and take the path name use basename() to get 
the name and store that as a separate property.

Bill Moseley
Received on Thu Jul 24 15:26:26 2003