I'm going to make a small site which requires advanced search capabilities. Since reinventing the wheel isn't such a worthwhile activity, I've done a little googling and found there are some PHP based search frameworks, one of which is integrated into Zend framework.

What I would like to have in the framework:

  1. Both full-text and catalogue search capabilities
  2. Display results sorted by relevance
  3. Ability to filter results by category
  4. Sorting results by various criteria
  5. Fast search
  6. Fast insertion not required

Since the site will feature pretty much static content (some text and a product catalogue), I might go with some pre-generated index.

Are there any (free) frameworks that could meet the above requirements? Suggestions, tips and ideas are more than welcome. It'd be great if you could share your experiences implementing a search system.

Accepted Answer

Have a look at Omega (based on Xapian) - a link to the Xapian project page

You can integrate it cgi-wise. Because it's based on the blindingly fast Xapian it will be one of the fastest options if you set it up correctly. It can do everything you ask for (including relevance for search results, index web server documents (html, pdf, word, excel, sql databases...) do 'stemming' etc...)

Another (also very good option) would off course be Apache Lucene --> it's this one that is included in the Zend framework you referenced ("Zend Search"). It can do all the same tricks, although i personally prefer Xapian.

Edit: be aware that Omega (and Xapian) are GPL whereas Apache Lucene is LGPL if i recall correctly.

Written by ChristopheD
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki