On Fri, Sep 22, 2006 at 07:10:25PM -0700, David Brown wrote:
>
> Am I missing (in swish-e 2.4.3) a command line or configuration option to
> index only files in the specified directory without recursing into
> subdirectories?
Hum, this must of come up before.
> I am thinking I will approximate this by adding the following to the
> configuration file:
>
> FileRules directory contains regex /./
Ya, that's probably what I'd try first.
Filerules dirname regex /./
swish-e -i * -v2 -f ../index -c ../c
Kind of ugly.
> I suppose since I'm building this configuration file dynamically and will
> know the starting path, I should be able to take advantage of "Directory
> names do *not* have a trailing slash" and use
>
> FileRules dirname contains "$path/"
Yes, maybe that's a good idea.
> ..where $path is replaced by the value of IndexDir. So if the dirname has
> an extra slash beyond the starting path, it ought to be a subdirectory,
> right? I think this will be faster, but it's less general-purpose. And there
> might be issues with \ vs. / as delimiter under Windows?
>
> Am I on the right track? Other suggestions? I guess I'll discover what works
> soon enough.
You can use -T regex to see the string and pattern being matched, so
that should help in figuring that out.
> Still seems like there ought to be an easier way to turn off recursion...
> maybe something to consider for 3.0?
Assuming 3.0 even know how to read files, maybe swish-e would have -r
for recurse.
Or, maybe run this before indexing
find $path -type d | xargs rm -rf
Eh, I trust nobody really does that.
--
Bill Moseley
moseley@hank.org
Unsubscribe from or help with the swish-e list:
http://swish-e.org/Discussion/
Help with Swish-e:
http://swish-e.org/current/docs
swish-e@sunsite.berkeley.edu
Received on Fri Sep 22 21:39:43 2006