PHP + Lucene integration
Posted by Kelvin on 01 Jan 2007 at 02:20 pm | Tagged as: Lucene / Solr / Elasticsearch / Nutch, programming
I've had very positive experiences integrating PHP front-end with a Lucene back-end, not with any fancy Java-in-PHP wizardry or Zend Lucene, but plain-old JSON-over-REST.
I've done some simple load tests, and it clearly outperforms Zend Lucene (though I don't can't offer you any numbers to back this claim up). Zend Lucene seems to suck bad at large (1GB+) indexes.
In terms of implementation, a servlet takes a query parameter, performs the search, then returns the results as JSON objects. There is a well defined API, and the solution offers the full expressiveness of Lucene query mechanism.
With a little creativity, you can even perform stuff like facet counting (see the left sidebar).
By abstracting the search presentation layer (JSON in this case), it would be a matter of minutes to add a XML or HTML display on top of it.
Comments Off on PHP + Lucene integration