More often than not, we will come across web applications that need support for built-in search capabilities. Sometimes the search could involve searching a simple field in a MySQL table, or at times you may want to search a document or a plain text file; there are multiple ways to address the search requirements using various search libraries. Lucene is one such library that offers excellent search capabilities for implementing full text search.
In this chapter we will be using Zend Framework's Lucene search implementation. Zend Framework 1.0 had a built-in Zend_Search_Lucene
library which supported indexing and searching with Lucene; in ZF 2.0, this library is available as ZendSearch\Lucene
, which can be downloaded and installed on your web application. In this chapter, we will be learning the fundamentals of implementing a full-text search using the Lucene search library in the following topics:
Installing the
ZendSearch
library in your applicationCreating...