A WordPress plugin that replaces the default WordPress search with a Solr based search.

This plugin uses either an account on SolrHQ or a Solr instance running on your own servers.


Features include:

* Index pages and posts
* Enable faceting on fields such as tags, categories, author, and page type.
* Treat the category facet as a taxonomy
* Add special template tags so you can create your own custom result pages to match your theme.
* Completely replaces default WordPress search, just install and configure.
* Completely integrated into default WordPress theme and search widget.
* Configuration options allow you to select pages to ignore, features to enable/disable, and what type of result information you want output.
* i18n Support

The sample schema is available from http://members.solrhq.com/samples/wp-schema.xml

To use this plugin with SolrHQ:
a) Select the pre-canned schema ‘wp-schema.xml from the Members area and restart that instance.
b) You will need the API key from your member’s area – Update User or Super User API key
for the WordPress configuration screen.
To use this plugin with your own instance of Solr:
Note that this plugin requires you to have an instance of Solr using a schema with the following fields: id, permalink, title, content, numcomments, categories, categoriessrch, tags, tagssrch, author, type, and text. The facet fields (categories, tags, author, and type) should be string fields. You can make tagssrch and categoriessrch of any type you want as they are used for general searching.

1. Upload the `solrhq-seach-for-wordpress` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Configure the plugin with your solrHQ API Key or the hostname, port, and URI path to your Solr installation.
4. Load all your posts and/or pages via the “Load All Posts” and “Load All Pages”  button in the settings page.

Custom Theme Integration

1. Create a new theme file called “s4w_search.php”.
2. Insert your markup, use template methods s4w_search_form() and s4w_search_results() to insert the search box and results respectively.
3. Add result styling to your theme css file, see `solr-for-wordpress/template/search.css` for an example.
4. You can use the search widget in your sidebar for search, or use a custom search box that submits the query in the parameter “s”.

Frequently Asked Questions


(Note: these do not include the added SolrHQ controls as yet)

1.Configuration Page
2. Example of results page in default WordPress Theme

Q/A from WP suppport

This WP plugin is based on Solr for WordPress,
Author URI: http://www.mattweber.org
Plugin URI: https://launchpad.net/solr4wordpress
Donate link: http://www.mattweber.org
Requires at least: 2.7.0
Tested up to: 2.7.1
Stable tag: 0.2.0