Installing and Configuring JSolr
JSolr is distributed in two parts; Index and Search.
Prerequisites
The following prerequisites will need to be met in order to run JSolr successfully:
- PHP 5.2.3 or greater (may run on earlier versions of PHP 5),
- Apache Solr 1.4,
- Apache Solr PHP extension 0.9.11 (installation),
- Joomla! 1.5.22 (may run on earlier iterations of Joomla! 1.5).
JSolr Index
JSolrIndex and its associated plugins will crawl your Joomla! data and index it.
The JSolrIndex component is configured to install supporting plugins, greatly simplifying the installation process.
To install JSolrIndex:
- Download The JSolrIndex bundle,
- Use Joomla!'s extension manager to install JSolrIndex,
-
Configure your Solr connection by browsing to JSolrIndex's configuration panel. Specify the following information:
- Host name: Your Solr server's root url,
- Port: Your Solr server's port number,
- Path: The relative path to your Solr server,
- Username: The Solr instance's username, or blank if the Solr server is public,
- Password: The Solr instance's password, or blank if the Solr server is public.
- Save your settings by clicking the Save button,
- Use the Test connection button to check that JSolrIndex can access your Solr server,
- (Optional) You can also run an initial crawl by clicking on the Start indexing button. Alternatively, you can use the command line crawler to execute an index. See "Running a Scheduled Index" for more information about command line indexing.
- Using the Plugin Manager, enable the plugins installed by JSolrIndex. Each plugin is responsible for indexing a particular component's data, so you have control over which data you wish to index. To view all JSolrIndex plugins, select jsolrcrawler from the Plugin Manager's type dropdown.
Running a Scheduled Index
JSolrIndex also provides a command line tool for running a crawl across your Joomla! data. The command line crawler can be executed manually for one-off indexing, or, if you would like to keep your index up-to-date, you can run the command line crawler from a cron job (or other scheduler).
The crawler can be run by simply executing the crawler.php file that is installed by default to your Joomla! site's root directory. To run, execute the crawler using:
php crawler.php
If you are running the crawler from a cron job or scheduler, it is recommended you run crawler.php with the command line flag quiet:
php crawler.php -q
This will suppress any errors or information being output to the screen. Instead, use the Joomla! logs (located by default in the Joomla! logs directory) to troubleshoot any problems you may have with the crawler.
JSolr Search
JSolrSearch, like JSolrIndex is bundled with a number of plugins and modules for formatting, displaying and categorizing your indexed data.
To install JSolrSearch:
- Download The JSolrSearch bundle,
- Use Joomla!'s extension manager to install JSolrSearch,
-
Configure your Solr connection by browsing to JSolrSearch's configuration panel. Specify the following information:
- Host name: Your Solr server's root url,
- Port: Your Solr server's port number,
- Path: The relative path to your Solr server,
- Username: The Solr instance's username, or blank if the Solr server is public,
- Password: The Solr instance's password, or blank if the Solr server is public.
- Save your settings by clicking the Save button,
- Use the Test connection button to check that JSolrSearch can access your Solr server,
- Using the Plugin Manager, enable the plugins installed by JSolrSearch. Each plugin is responsible for indexing a particular component's data, so you have control over which data you wish to display in the search results. To view all JSolrSearch plugins, select jsolrsearch from the Plugin Manager's type dropdown.
- (Optional) You can also configure the search filter module to provide targeted searching and filter-specific results formatting. To enable the search filter module, use Joomla! module manager.