PhpRiot
Download This Article
Download this article in PDF format with all listings and files.

Price: $5.00 AUD
(Approx. $4.45 USD)

More information
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (10), JSON (2), MVC (1), MySQL (6), onbeforeunload (1), OOP (1), PHP (27), PhpDoc (1), PostgreSQL (6), Prototype (9), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

Comments

Article Comments (3 total)

jefftulsa, 3 June 2006

This is a helpful article to get started. In playing around with this search tool, I ran into a PHP Fatal error when trying to load large amounts of data (actually, not all that much data, but around 200,000 varchar(100) text fields): Allowed memory size of xxxx bytes exhausted (tried to allocated 119 bytes) in Zend/Search/Lucene/Analysis/Analyzer/Common/Text.php on line 65. I am curious if there are any known restrictions on the amount of data you can use withe the Lucene search?

Response from PhpRiot:

The use of Zend_Search_Lucene is subject to the normal memory limits associated with PHP. You can change these limits by changing the memory_limit value in your php.ini file.


scan, 9 August 2006

Hi, I want to know whether the Zend Framework is able to index and search txt, pdf, xml, doc files stored on the server?

Response from PhpRiot:

Yes, as mentioned in the article you will need to write a custom text analyzer, as per the instructions at http://framework.zend.com/manual/en/zend.search.lucene.extending.html


Tim Anderson, 1 November 2007

is it possible to customize the Zend_Search_Lucene scoring algorithm so it works more like this script: http://www.iamcal.com/publish/articles/php/search? Each one of my index entries only contains on average 5-6 words. The default behavior of Zend_Search_Lucene has a very hard time with small amounts of text.

For example, if I have index entries of: Red Hook Pilsner Samuel Adams Pilsner Sierra Nevada Pilsner Widmer Pilsner and i search for "Red Hook Pilsner" chances are I'll get one of the other entries like "Widmer Pilsner" as my first result. i just want the engine to work based on the principle of mysql RLIKE matches. is this possible?

Submit a Comment
Use the following form to submit a comment for this article. You can include any required code snippets, which we will format and highlight accordingly.


Note: Before your comment appears on PhpRiot, it must be manually approved. The email address field is optional. If you choose to include it, it will be displayed obfuscated to protect it from spammers.

In This Article


Article History

Apr 26, 2006
Initial article version
Dec 17, 2007
Updated to use Zend Framework 1.0.3