How to set smart url in zend framework?

PHP: Zend Framework PHP implemention of Lucene or Solr for a API service?

  • I need of indexing a lot of data (mostly text). We offer these data in API mode (LAMP platform with PHP / MySQL) and exchange data in json format. I would like to use Solr search server, but I know that there is also an implementation of Lucene in the Zend PHP Framework. Anyone have experience with Solr or Lucene in the Zend PHP Framework? The goal is to obtain the best possible performance with fulltext queries type (database = around 1M records)

  • Answer:

    Use Solr. The Lucene implementation in ZF is okay for small sets of data, but not nearly as performant as the original Java implementation. Solr uses the Java implementation, and adds a bunch of features around it, of which caching will be quite important to your needs.

Matthew Weier O'Phinney at Quora Visit the source

Was this solution helpful to you?

Other answers

The latest versions of Solr already start to provide PHP response format http://wiki.apache.org/solr/SolPHP#Solr.27s_PHP_response_format, which is ignored by many developers. According this test http://www.raspberry.nl/2012/02/28/benchmarking-php-solr-response-data-handling/, it's the easiest and efficient way to connect PHP with Solr.  You just need several lines PHP codes like this. $serializedResult = file_get_contents('http://localhost:8983/solr/select?q=iPod&wt=phps'); $result = unserialize($serializedResult); print_r($result);

Liang Shen

At Magento we ran a few tests with the ZF implementation and found that performance was not good on medium to large data sets.

Yoav Kutner

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.