Ray, et al -- ...and then Ray Hunter said... % % On Fri, 2004-02-06 at 06:47, David T-G wrote: % > Very, very simple stuff. The list of directories and files is held in an %...
% That is simple enough, however, I dont see much flexibility in it with
Just between you and me, I tend to agree, but at this point we don't need
flexibility.
% searching. So you are doing searching on directories and file names
Not quite; the serialized array *does* contain the directory list.
Imagine
$tree =
(
[0] =>
(
[0] => ./d1 ,
[1] => ./d2 ,
[2] => ./d2/s1 ,
[3] => ./d2/s1/s2 ,
) ,
[1] =>
(
[0] => ./d1/f1 ,
[0] => ./d1/f2 ,
[1] => ./d2/f3 ,
[1] => ./d2/f4 ,
[1] => ./d2/f5 ,
[2] => ./d2/s1/f6 ,
[3] => ./d2/s1/s2/f7 ,
[3] => ./d2/s1/s2/f8 ,
)
)
or so. Now my input is 'd1' or 'f2' or even 'd1 f2' or such.
% based on what is in the serialized array? Will you need to search the
% document in the near future?
Presumably; this is a way to look through a directory tree and return
pointers to those that match. Typically we'll have an array of 20 or 30
directories; often we'll have maybe 100; on rare occasion we might have
250 or more.
%
% Lucene has that logic in it. However, not sure if lucene is the way to
% go. It will work for what you are doing. However, it might be an
OK; I'll at least read up on it. Thanks!
% overkill depending on how many files you are searching on. You might be
% able to write a regexep using preg_match that will return what you are
% looking for.
Probably, but I'm more worried about handling some wacky input like
(this or that) and the and (ot or her)
or something wonky. So I could always kick back a "no way, buddy!" error
but I don't want to throw up all over everything getting confused by it.
%
% --
% Ray
Thanks & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature

