On Oct 31, 2008, at 6:14 AM, Kraus, Ralf | pixelhouse GmbH wrote:
Hey,
I think it will have the disadvantage of being a lot slower though...

How were you handling things with Lucene? You must have used Java then? If you even want to get close to that performance I think you need to use non http embedded solr.
I am using this :

- I wrote a JAVA JSP file to get an EmbeddedSolrServer
- Now I call this JSP file from my PHP script and the JSP makes my search request to SOLR
- after that I generate a CSV file out of the JSP and read it from PHP

It´s the same way I did it with the prior LUCENE engine I used.
But now the peformence is 10% from the prior LUCENE speed :-(

No need to involve JSP at all to get Solr results in PHP.

Rather than those hoops, simply use one of the PHP response writers. Look in the example Solr config, uncomment this:

<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>

Then in PHP, hit Solr directly like this:

        $response = unserialize(file_get_contents($url));

Where $url is something like http://localhost:8983/solr/select?q=*:*

  Erik


Reply via email to