I would like to know if anyone has integrated Lucene with PHP. I have a couple of Java classes which utilize Lucene to index the contents of directories and also search for a particular string in the indexed information.
I can obviously have a PHP page with a form collecting the string to search for. The current Java class simply reports back what files the string was found in via a system.out.println.
My question is,
(1) How to best send the information back to a PHP-based results page ?
(2) I would also like to show snippets of text around the string found, more google like. My point is that today I can simply search for a string and know what it has been found in certain files, not more than that. Typically, users will want to be able to see the "information" around the string found and also have it be hyperlinked.
(3) Has anyone done it ? if so, I would like to get some sample code.
Lucene is pretty cool, but it's more of a Java fit and I am trying to get it to fit to PHP. I may have to switch to JSP and Struts for this one.
Please advise.
Angelo