The Dasboard Interface for “WP Solr” Plugin
Upon activating the plugin, a Solr Settings menu is created in the Dashboard menu options.
Select the menu option to configure the plugin.
Before you continue, refer to the Installation
Guide to Configure Solr. Upon downloading the schema.xml and
solrconfig.xml, you can continue to the other options.
Click on the “I uploaded my 2 compatible configuration files to my solr core” button to continue.
Set Solr Instance Settings
- If Solr is hosted locally, select Self Hosted
Set the fields accordingly. For e.g. Solr Host: localhost, Solr Port: 8983 Solr Path: /solr
- If Solr is hosted on gotoSolr, select Other Host
If your index url is: https://877d83f3-1055-4086-9fe6-cecd1b48411f-index.solrdata.com:8983/solr/e86f82a682564c23b7802b6827f3ccd4.24b7729e02dc47d19c15f1310098f93f/select
Then you need to set the details as follows:
- Host: 877d83f3-1055-4086-9fe6-cecd1b48411f-index.solrdata.com
- Port: 8983
- path: /solr/e86f82a682564c23b7802b6827f3ccd4.24b7729e02dc47d19c15f1310098f93f
Upon entering the appropriate data, click on ‘Check Solr Status Then Save’. This option will validate your inputs, and test the connection to the Solr Index Server. In case there is a problem, an error message will be displayed to help you resolve the issue. If the connection is successful your settings will be saved.
Set the Indexing Options according to your Preference
Select the post type, taxonomies and fields which have to be indexed, to optimize the search process. That is, the search will be limited to only the post types, taxonomies and fields you choose to index.
For example, if you select post and
page, only the content in your posts, will be searched with the search term. Content in custom post types,
comments, and other fieldswill not be searched.
Important: If you make any changes in the index settings, remember to click Load Data under Solr Operations, for
the changes to take effect.
Set the Facets Options according to your Preference
Faceted search allows search results to be filtered based on the selected aspects. Example, if you wanted to allow the end user, to filter the results, based on a particular category, you will need to
select ‘categories’ in the ‘Facet
Options’. This will provide him/her an option, when searching to filter results, based on a particular category
Select ‘+’ to add a new facet and ‘-‘ to remove a selected one.
Select Options for Search Results
Important to note the option for ‘Replace WordPress Default Search’. If this
option is checked, WordPress default search will be replaced by Solr Search. Else, the default search will still be
available, and you can add the Solr search box in a Page or Post using the shortcode
Perform Solr Operations
- Load Data: Load the data as per the index settings.Important: This operation must be
performed once the plugin is activated, and after any change in the index settings.
- Delete Data:Delete the loaded indices.
Using the Solr Search Box
The WP Solr Plugin creates a separate search page with a Solr Search box. The Solr Search box, will be displayed like any other search box. A
match search is performed on the search phrase or word. By default, the results are sorted by the latest post. Pagination is applied to display ten results per page, by default. This value can be changed in the
‘Result Options’ settings.
There are several options provided to the end user, to sort and filter the search results.
Sorting Search Results
The search results can be sorted based on the following options:
- Newest: The results will be sorted based on the latest posts. The newest post will be displayed
first. This is the default option.
- Oldest: The oldest post, among the search results, will be displayed first. The results are
sorted in descending order of post dates.
- Most Comments: The posts with the most comments will be displayed, sorted in descending order
of the number comments.
- Least Comments: Results will sorted based on the posts with least comments. The posts will be
sorted in the ascending order of the number of comments.
Filtering Search Results
Results can be filtered, based on the facets you have specified in the ‘Facets
Options’ settings. Example, if ‘Category’ is added as a facet option. The user will be able to filter the results on a