Re: UdmSearch: crc32() PHP function (fwd)

From: Date: Sun, 16 Jul 2000 05:18:06 +0000
Subject: Re: UdmSearch: crc32() PHP function (fwd)
Groups: php.dev 
Request: Send a blank email to php-dev+get-24648@lists.php.net to get a copy of this message
I meant to attack this a while ago, but it slipped off my radar screen. If somebody has some spare cycles, this would be a super cool addition to PHP. UdmSearch is a great search engine and having native support for it would be nifty. Contact Alexander for more info. -Rasmus ---------- Forwarded message ---------- Date: Fri, 23 Jun 2000 15:17:14 +0500 From: Alexander Barkov <bar@izhcom.ru> To: Rasmus Lerdorf <rasmus@linuxcare.com> Cc: udmsearch@search.udm.net Subject: Re: UdmSearch: crc32() PHP function Hello, Rasmus! Just a thought. You or somebody might be interested.... Take a look into search.c. It is just an application which uses libudmsearch. All functionality is impelmented in this library. Actually, search.c is just template parser. Search is performed via a couple of calls to the library. What do you think, is it hard to add libudmsearch support into PHP? It could be implemented as a set of few functions required to initialize, to close library and to perform search itself. Main function UdmFind() should have several parameters to pass things like query,page size, start page, mode being used (all words,any word),etc. It should return an array with results. I think it may look like in mysql support: <...init stuff...> $res=UdmFind($query,$start_page,$page_size,$mode,....); $pages=UdmPages($res); $first=UdmFirst($res); $last=UdmLast($res); printf("Displaying documents $first-$last from $pages found"); while($row=UdmFetchRow($res)){ printf("%s %s\n",$row["url"],$row["title"]); } <...close stuff...> I know that library interface is not excellent yet and it is under development. So, we would be glad to consider any related suggestions, etc. Ragards! Rasmus Lerdorf wrote: > > I have added the crc32.c code distributed with udm_search to PHP 4. As of > PHP 4.0.1 there will be a crc32() native function you can use instead of > having to calculate crc's through a system call. It is in CVS, or you can > grab a snapshot from http://snaps.php.net to test it out. I > just > committed it, so it might take a couple of hours before a snapshot is > generated that includes it. -- Alexander Barkov IZHCOM, Izhevsk email: bar@izhcom.ru | http://www.izhcom.ru Phone: +7 (3412) 51-23-76 | Fax: +7 (3412) 78-70-10 ICQ: 7748759

« previous php.dev (#24648) next »