Zend_Search_Lucene Quick Start

Posted in PHP, Programming and Zend Framework on Tuesday, the 3rd of June, 2008.

Tagged: , and

I recently had a spontaneous urge to add a search form to my weblog - this one you're reading right now - and it seemed like a good opportunity to have a look at Zend_Search_Lucene.

I'm really impressed with the simplicity and power of the module. Sadly the documentation, whilst extensive, isn't particularly clear - so here's a quick overview of getting Zend_Search_Lucene up and running.

Comments

Posted by Ciaran McNulty on Sunday, the 8th of June, 2008.

Out of interest, why index on a schedule rather than on an update?

Posted by Simon Harris on Saturday, the 28th of June, 2008.

Absolutely no reason other than simplicity! I'm not using any kind of CMS as it stands, so there's not really anywhere to hook the indexer in.

If I were integrating Zend_Search_Lucene with a CMS I'd want to look at - as you say - triggering the indexer on an update event, and having it run asynchronously. The Zend Platform (of which, more later!) "job queue" looks quite neat for that kind of thing.

Posted by Clive on Friday, the 11th of July, 2008.

Short, sweet, simple and super - thank you for this. :-)

Posted by Zeno on Thursday, the 22nd of January, 2009.

It is very useful, and take a look of the other article (Search engine indexing)

http://devzone.zend.com/node/view/id/91

Posted by Alok on Friday, the 10th of April, 2009.

great article concise and straight.

Posted by Cristobal on Tuesday, the 16th of February, 2010.

Zend_Search_Lucene how long it takes to index? I'm indexing 10 documents of 100 kb each and takes 2 minutes ... if i do index 1000 files?

Ty.

Posted by Prasad on Thursday, the 28th of February, 2013.

Very nice article. Very useful.
Thanks for sharing ..!!!

Posted by Doug on Wednesday, the 29th of October, 2014.

I know this article is very old now but still relevant I think.

The issue I'm having right now is, how can I build an Index from an existing database. I have a table I wish to index which contains 2500+ row. Is there an automated way to turn the entire table into an index?
I use Symfony2 and Doctrine if that helps at all.

Enter your comment: