Search code examples
phpzend-frameworkzend-dbzend-studiozend-search-lucene

Implement a search using zend


I have site which is managed using CMS entirely developed on zend. Now I have to Implement a search feature too. I'vent done anything related to search in zend. Some suggestions that I received is to implement a spider. The site will have plenty of links(and it will keep on adding). I'm totally confused and I don't know where to start from. Will zend_search_lucene do the trick?


Solution

  • You probably aren't going to find something completely turnkey for this. If your content is all public, and you are fine with just using a crawler, the easiest thing to implement could be Google Site Search.

    http://www.google.com/enterprise/search/products_gss.html

    If you need to get different functionality out of the search that this wouldn't offer, you'll likely be stuck doing some code. The Zend Lucene link that Alvar posted is good. One of the ugly things about Zend_Lucene, if I am not mistaken, is that it's relying on the text based lucene indexes without any Java. It's just slower and more cumbersome to manage.

    A more robust Lucene based approach is Solr. It's Java based, and runs on it's own service with an API. It scales well, and there's a PHP Pecl out now that will help you communicate with it.

    See http://php.net/manual/en/book.solr.php

    Another option is Sphinx. This search engine bolts directly to your database, so indexing might be a little more intuitive.

    http://sphinxsearch.com/

    Good luck to you!