On Wed, 30 Nov 2005, AmirBehzad Eslami wrote:

> Dear Behdad,
>
>   On 25 Nov 2005, you wrote:
>
> > Another options is to get yourself a real search engine, like
> > Apache Lucene. I've written my experience using that here:
>   >
> > http://mces.blogspot.com/2005/04/on-lucene-and-its-decency.html
>
> You always offer the most brilliant solutions!!
> Unfortunately, I have no experience with this mehotd. But I'm still eager.
> I read your weblog and met "Apache Lucene" homepage.
>
>   I'm impressed. Would you tell us how you have integrated this
> Java-driven package with PHP at http://rira.ir/ ?!!  It works
> really fast.

That's the tricky part, or where the runtime-hell comes in.  What
I did was to write a small java program based on the samples in
Lucene to connect to my database and feed the data into Lucene.
At search time, I have another little Java program that takes the
query string from command line and prints out search results to
standard output.  My PHP script then just fires up a shell script
that in turn runs the Java program, piping the output into PHP...

I don't have access to the Java codes at this time, but the PHP
code involved is available here:

  
http://cvs.sourceforge.net/viewcvs.py/rira/rira/php/page/search.php?rev=1.1.1.1&view=log


If you are developing in .NET, there is a functional port of
Lucene to .NET too.  There is even a port of an older version of
it to Python.

BTW, you need to make sure you compile it with Unicode turned on.
I don't quite remember the details, but there was some.  I also
have a Persian class written for it, but it didn't do much
anyway.  In a few weeks I will get access to rira.ir server and
hopefully move the site to the above sf.net project, so you can
see what's inside.

> Thank in advance,
>   Behzad

Cheers,

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"
_______________________________________________
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to