Skip to main content.
home | support | download

Back to List Archive

Re: Sort by filename

From: Carlos Rocha <caroch00(at)not-real.hotmail.com>
Date: Fri Jul 25 2003 - 13:12:53 GMT
Bill,
I am sorry, I didn't notice that I was sending the email to you instead of 
the list (I just clicked on reply)

Here is some output:

C:\>c:\swish-e\swish-e.exe -s swishdocpath asc -w plasmodium -f 
c:\archives\id\ss\y2002\index.swish-e > output.txt


# SWISH format: 2.2.3
# Search words: plasmodium
# Number of hits: 37
# Search time: 0.010 seconds
# Run time: 0.040 seconds
930 
http://Carlos-Node-1/archives/id/ss/y2002/APP/ID-SS-0362-02_Marletta_Michael.htm
151 
http://Carlos-Node-1/archives/id/ss/y2002/APP/ID-SS-0326-02_Gaasterland_Terry.htm
151 
http://Carlos-Node-1/archives/id/ss/y2002/APP/ID-SS-0286-02_Kirchhoff_Louis.htm
996 
http://Carlos-Node-1/archives/id/ss/y2002/APP/ID-SS-0261-02_Wirth_Dyann.htm
1000 
http://Carlos-Node-1/archives/id/ss/y2002/APP/ID-SS-0284-02_Simon_Sanford.htm
151 
http://Carlos-Node-1/archives/id/ss/y2002/AWD/ID-SS-0264-02_Davis_Ronald.htm
950 
http://Carlos-Node-1/archives/id/ss/y2002/AWD/ID-SS-0335-02_Roos_David.htm
891 
http://Carlos-Node-1/archives/id/ss/y2002/AWD/ID-SS-0327-02_Rathod_Pradipsinh.htm
167 
http://Carlos-Node-1/archives/id/ss/y2002/AWD/ID-SS-0317-02_Boothroyd_John.htm
151 
http://Carlos-Node-1/archives/id/ss/y2002/LOI/ID-SS-0307-02_Loria_Roger.htm
891 
http://Carlos-Node-1/archives/id/ss/y2002/LOI/ID-SS-0306-02_Rabindran_Shailaja.htm
161 
http://Carlos-Node-1/archives/id/ss/y2002/LOI/ID-SS-0303-02_Lewis_Walter.htm
956 
http://Carlos-Node-1/archives/id/ss/y2002/LOI/ID-SS-0295-02_Luckhart_Shirley.htm

You may notice that they are sorted by path but within a given path, the 
sort fails.

By the way, you may notice that in your first example too:

the first four lines:
>/usr/share/doc/analog/anlgform.html
>/usr/share/doc/analog/docs/Readme.html
>/usr/share/doc/analog/docs/acknow.html
>/usr/share/doc/analog/docs/alias.html

Readme comes before acknow and from that point on the sort order is kept.


Thanks again for your help.

Carlos
>From: Bill Moseley <moseley@hank.org>
>To: Carlos Rocha <caroch00@hotmail.com>
>Subject: Re: [SWISH-E] Re: Sort by filename
>Date: Thu, 24 Jul 2003 17:48:24 -0700
>
>On Thu, Jul 24, 2003 at 08:41:18PM -0400, Carlos Rocha wrote:
> > Bill,
> >
> > I  get the output sorted by path but within a given path the output is 
>not
> > sorted.
>
>I meant can you show some output.  See I get the paths sorted:
>
>moseley@bumby:~/apache$ swish-e -s swishdocpath -x '%p\n' -H0 -w not dkdkd 
>| head
>/usr/share/doc/analog/anlgform.html
>/usr/share/doc/analog/docs/Readme.html
>/usr/share/doc/analog/docs/acknow.html
>/usr/share/doc/analog/docs/alias.html
>/usr/share/doc/analog/docs/args.html
>/usr/share/doc/analog/docs/basiccmd.html
>/usr/share/doc/analog/docs/cache.html
>/usr/share/doc/analog/docs/compout.html
>/usr/share/doc/analog/docs/custom.html
>/usr/share/doc/analog/docs/debug.html
>
>moseley@bumby:~/apache$ swish-e -s swishdocpath -x '%p\n' -H0 -w not dkdkd 
>| tail
>/usr/share/doc/urlview/html/urlview-1.html
>/usr/share/doc/urlview/html/urlview.html
>/usr/share/doc/xcdroast/README.setup-bulgarian.html
>/usr/share/doc/xchat-common/faq.html
>/usr/share/doc/xchat-common/plugin20.html
>/usr/share/doc/xchat-common/scripts-perl/xchat-perl18.html
>/usr/share/doc/xfree86-common/XFree86-FAQ.html
>/usr/share/doc/xmms-shell/xmms-shell.html
>/usr/share/doc/xterm/xterm.faq.html
>/usr/share/doc/xterm/xterm.log.html
>
>
>
> > Q1) Does Swishdocpath include the filename or not?
>
>Yes, the path includes the file name.
>
>
> > Q2)I am reading the Doc about the use of -s prog; I am a bit confused 
>since
> > I have been using -s fs.
> > Do you have an example about how to use basename().
>
>Ah on windows?  I'm not sure.  You can use perl:
>
>   perldoc File::Basename
>
>for the documentation.
>
>Or just use a regular expression.
>
>In the future please post to the list, Carlos, so others can see your
>questions.
>
>Thanks,
>
>
> >
> > Thanks a million for your help.
> >
> > Carlos
> >
> >
> > >From: moseley@hank.org
> > >Reply-To: moseley@hank.org
> > >To: Multiple recipients of list <swish-e@sunsite.berkeley.edu>
> > >Subject: [SWISH-E] Re: Sort by filename
> > >Date: Thu, 24 Jul 2003 08:26:09 -0700 (PDT)
> > >
> > >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
> > >moseley@hank.org
> > >
> >
> > _________________________________________________________________
> > The new MSN 8: advanced junk mail protection and 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
>
>--
>Bill Moseley
>moseley@hank.org
>

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus
Received on Fri Jul 25 13:13:12 2003