On Tue, Mar 09, 2004 at 01:47:40PM -0800, Bill Moseley wrote:
> On Tue, Mar 09, 2004 at 01:33:58PM -0800, Peter Ensch wrote:
> > Is there a way to query swish so that I can build the section
> > list on the fly? IE. have it tell me what sections were captured
> > by ExtractPath and stored in the 'section' metaname.
>
> Not in a very nice way. What you are asking it to dump the index file
> and see what words are associated with the metaname you are using for
> ExtractPath.
>
> So, assuming you are using "site" as the metaname:
>
> $ swish-e -T index_metanames | grep site
>
> Then use
>
> $ swish-e -T index_words_meta
>
> and grep out the id (the second column) that matches the "site" meta id
> number.
>
Bill,
Thanks for the reply.
This will work; I can dump the index and parse out the words
associated w/ a metaname at the time I index and use the output
to build my form widgets.
I am concerned w/ the output however. The word names appear
truncated. I guess they are printf'ed for formatting purposes,
but this does limit their usefulness. Is there a way to
prevent this w/out hacking on the source code?
An example of what I'm talking about is below.
Thanks,
Peter
---
ExtractPath section regex !^/path/to/my/site/([^/]+)/.*$!$1!
%> ls -1 /path/to/my/site
cgidata
design_manual
design_methodology
efuse
getstr
io_functions
legal
mls
pdf
pyramid
relnotes
test
%> swish-e -T index_words_meta | egrep '13$'
cgidata 13
design 1 10 13
efus 1 10 13
getstr 13
io 1 10 13
legal 1 13
manual 1 10 13
methodologi 1 10 13
ml 1 10 13
other 1 10 13
pyramid 1 10 13
relnot 13
test 1 10 13
--
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
pensch@ti.com A-1140 (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Received on Wed Mar 10 10:37:07 2004