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 (11), JSON (2), MVC (1), MySQL (6), onbeforeunload (1), OOP (1), PHP (27), PhpDoc (1), PostgreSQL (6), Prototype (10), 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:

Creating A Fulltext Search Engine In PHP 5 With The Zend Framework's Zend Search Lucene

Getting Started

The first thing we must do is install the Zend Framework. At time of writing, the current version is 1.0.3, which can be obtained from http://framework.zend.com/download.

You can choose to store the framework in your own application PHP class library, or you can store it in a shared location just as PEAR typically is. Just like Pear is stored in /usr/local/lib/php, I have chosen to store it in /usr/local/lib/zend for the purposes of this article.

Listing 1 listing-1.txt
$ cd /usr/local/src
$ wget http://framework.zend.com/download/tgz
$ tar -zxf ZendFramework-0.1.3.tar.gz
$ mv ZendFramework-0.1.3/library /usr/local/lib/zend

So now all that is required is that we add /usr/local/lib/zend to our include path. For instance, my include path directive in httpd.conf for PhpRiot looks something like:

Listing 2 listing-2.txt
php_value include_path .:/var/www/phpriot.com/include:/usr/local/lib/php

Which now becomes:

Listing 3 listing-3.txt
php_value include_path .:/var/www/phpriot.com/include:/usr/local/lib/php:/usr/local/lib/zend

In This Article


Article History

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