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 > array (a separate process uses File_Find->maptree() to make it after any > updates and writes the serialized array to a cache file, and then I read > it in) and I just want to do a text match. At the moment I'm using > preg_grep but that just got a little unweildy because the next requirement > was for 'or' separated by spaces, so I quickly explode(' ')d the input > and now loop through the search array but I really don't want to have to > write a boolean parser (did it for class in college; that was enough :-)
That is simple enough, however, I dont see much flexibility in it with searching. So you are doing searching on directories and file names based on what is in the serialized array? Will you need to search the document in the near future? 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 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. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php