Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (32 sloc) 2.92 KB
<?xml version="1.0" encoding="utf-8" ?>
<pluggable type="plugin">
<license url="">Apache Software License 2.0</license>
<author url="">Ian Barber</author>
<description><![CDATA[Replace the built in search functionality. Requires configuration after installing before any functionality is added.]]></description>
<p>This plugin is designed to work with Habari 0.7 and above, and offers advanced search, including stemming and spelling correction where available. The plugin can make use of multiple different open source engines, including the Xapian search engine and Zend Search Lucene.</p>
<p>When activated, this plugin will not take any affect until the engine is configured. Initially select choose engine, select the engine, then afterwards select configure to decide basic details, like the directory the search index should be stored in to. Once this is configured all published content will be synced to the search engine. Afterwards, all items which are published will be also be added to the engine.</p>
<p>By default, the engine will hook into the search page and provide the results</p>
<h3>Other Features</h3>
<p>Note that not all engines support all features, so they may not activate even if in the theme</p>
<p>To add a spelling correction element to your theme, add the line: </p>
<p>To your search.php file, and this will output a correction if there is one. </p>
<p>To retrieve similar posts you can use the theme function, which will return an array of posts</p>
<p>Xapian is a high performance open source search engine written in C. To use <a href="">Xapian</a>, make sure you have Xapian and the Xapian extension installed. Often this will be available via package management, but make sure to get both the Xapian and Xapian Bindings packages (if available) to ensure the PHP extension is available. You'll need a line in your php.ini like:</p>
<p>And to make sure the bundled xapian.php file is somewhere in your path (worst case put it in the plugins/xapiansearch directory)</p>
<p>Xapian will also need to be able to write to whichever directory the database is to live in - currently by default that's xapian.db in the user directory. </p>
<h3>Zend Search Lucene</h3>
<p>Zend Search Lucene is the native PHP port of the Lucene search engine which is part of <a href="">Zend Framework</a>. To use this, you will need Zend Framework 1.5 or greater installed somewhere in the path. </p>
<p>The engine will also need to the ability to write to whichever directory it is configured to.</p>
Jump to Line
Something went wrong with that request. Please try again.