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:    [EMAIL PROTECTED]      | http://www.izhcom.ru
Phone:    +7 (3412) 51-23-76 | Fax: +7 (3412) 78-70-10
ICQ:      7748759
______________
If you want to unsubscribe send "unsubscribe udmsearch"
to [EMAIL PROTECTED]

Reply via email to