Re: boolean search class

From: Date: Fri, 06 Feb 2004 13:47:21 +0000
Subject: Re: boolean search class
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-177003@lists.php.net to get a copy of this message
Ray, et al -- ..and then Ray Hunter said... % % On Thu, 2004-02-05 at 20:46, David T-G wrote: % > % > I'm implementing a search and would like to move beyond accepting .. % > are not in a database, so I won't be passing SQL code off to a real % > searcher.] % % How are you doing the search if not with a database? What is your logic % for implementing the search? 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 :-) % % I have used lucene (Jakarta-Apache) for doing searchs that is % outstanding. Hmmm... Does this sound applicable? What does lucene search? % % -- % Ray Thanks & HAND :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#177003) next »