Solr search engine within Symfony

Posted: August 12th, 2009 | Author: Marc | Filed under: powerful | Tags: , , , , | 4 Comments »

Today I released my first plugin (yay!) for the symfony framework. It’s called uvmcSolrSearchPlugin and it permits you to integrate your solr search service within symfony, giving you the power of a real search engine in your website.

What is Solr?

From the official solr website:

Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON APIs, hit highlighting, faceted search, caching, replication, a web administration interface and many more features.

Solr is massively used by big names like Digg and AOL among others… Yes, using solr is like having a ninja specialized in search, just for your website.

So, what does the plugin do?

The plugin provides an easy way to index the models you want by using the symfony event dispatcher. It leaves your model free of sfContext and handle indexing/deletion even in the admin generator.
If you’re eager to know more, please visit the uvmcSolrSearchPlugin dedicated page.

Greetings

Big thanks to miximum for his symfony & solr integration tutorial (french).

Please don’t hesitate to give me your opinion on this plugin! ;-)


4 Comments on “Solr search engine within Symfony”

  1. 1 Alisa Roberts (healthylivinggal) 's status on Friday, 14-Aug-09 15:29:06 UTC - Identi.ca said at 17:29 on August 14th, 2009:

    [...] http://symfony.isgonna.be/powerful/solr-search-in-symfony-plugin/ [...]

  2. 2 Janneaa said at 16:21 on October 16th, 2009:

    Thanks for this great plugin! I’m starting to use it.

    Could you clarify a couple of things? First of all, where in the model should I put getSolrDocumentFields()? Should it be for example in /lib/model/Doctrine/company.class.php?

    And where does the dispatcher code go to?

    Thanks again,
    Janneaa

  3. 3 Janneaa said at 14:24 on October 20th, 2009:

    Well I’m not sure if anyone notices these comments anymore but I’m still having some problems with the plugin.

    This search code doesn’t work:
    $event = $this->dispatcher->notify(new sfEvent($this, ‘umvc_solr.search’, array(’query’ => $q)));

    Any idea why it doesn’t do anything? Solr doesn’t even notice a new request. The static add method with sfContext::getInstance()… worked fine but the search code doesn’t.

    I would appreciate any help.

  4. 4 Marc said at 14:40 on October 20th, 2009:

    Hello Janneaa,

    Sorry for my late reply, i’m currently very busy. Thank for your feedback. Please keep in mind that this plugin might not be suitable for production environment. Also, could you please create a ticket on google code? Here is the link: http://code.google.com/p/uvmc-solr-search-plugin/issues/entry

    I’ll try to fix this asap.


Leave a Reply