What is the toolset views add-on
The toolset add-on makes it possible for the toolset plugin to work in tandem with WPSOLR. With the toolset plugin you can tailor WordPress to your individual needs. You can create custom post types, fields and taxonomies. You can create templates, archives, grids, tables and lists.
Install the Toolset plugin
Click on “Plugins” then on “Add New”.
Click on “Add plugins” then on “Upload Plugin”.
Add the toolset plugins. You will have to upload the toolset views and the toolset types plugins.
Install the Query monitor plugin
Click on “Add New”.
Install the Query monitor plugin.
Create a WPSOLR index
Click on the WPSOLR plugin.
Click on “Connect to your search server or search service”.
Choose the Search engine and the hosting service. Then pick the WPSOLR index name. Lastly, fill in the endpoint url, user and password you got from the hosting service.
Add the Toolset add-ons
Click on “Activate extensions” to install the toolset add-ons.
Click on “Toolset Types” in the sidebar.
Click on the first checkbox to activate the add-on. If you select the second checkbox, you will replace WPSOLR facets label with Toolset Types label.
Click on Toolset Views next.
Click on the first checkbox to activate the plugin and replace the Toolset archives and views queries with WPSOLR queries. The second checkbox allows you to use Toolset Views caching but you don’t need it since WPSOLR already speeds up your search.
If you want to have more options when customizing search filters, you will need to activate the Theme add-on. For example you will not be able to use a slider without the Theme add-on.
Click on the first checkbox to activate the extension then save.
Click on “Query Monitor” in the sidebar.
Then click on the checkbox to activate the add-on.
Click on “Define your search with ‘No index selected'”.
Click on “Search” then click on “Search with this search engine index” and select the index. Then save.
Don’t forget to log the search engine queries in Query monitor.
Click on “Data” in the sidebar.
Then on the content you would like to use. Here i chose products.
Choose the taxonomies you would like to use.
Then choose fields you would like to use. if you want to use a slider for example, you will have to change the type of the field. For the price field i chose to use floating point numbers and integer numbers for the stock field.
When you’ve saved the changes, click on “Filter” in the sidebar.
Then click on the facets you would like to use as filters. Then save
You can then customize the filters. Choose a name for the filter. It will be shown on the front end. Then pick a layout. I decided to use the range slider. You can pick a skin to use with the slider as well.
Do the same thing for the stock filter.
For the stock status i used check boxes but I changed the title of the item label. To change it, click on “Override each item label” then choose the title you want.
Index the content
Click on “Send your data”.
Then click on “Index selected post types”.
Install the WPSOLR facet widget
Click on “Customize” in the frontend part of your website.
Click on “Widgets”.
Then click on “Sidebar”.
And click on “Add a widget”.
Type in “WPSOLR Facets” then publish.
Create Toolset archive
Hover your mouse over “Toolset” in WordPress admin, then click on “WordPress Archives”.
Click on “Add New”.
You will then see this page. Choose the loop the archive will be used for then choose what kind of archive you want. I chose one with custom search. Then name the WordPress Archive.
You should see this page. You can further customize the archive if you want but i chose to leave the defaults.
Then if you scroll down you should see these to images. In the first image we can see that the layout is started and the items are fetched. The number of items counted are displayed next to the phrase “Item count:” and the number of items found are displayed next to the phrase “Items found:”. The page number is displayed next to the word “Page:” and the total number of pages is displayed next to “Total pages”. The loop starts and a table is created. In the table is stored the wpsolt title (in this case the product title) and the wpsolr excerpt (product excerpt and featured image). We then define for how many products this process will be repeated and the loop ends. the wpv-items from before are displayed. if none are found, then the message “No items found” is displayed.
You can also write some CSS. Here the nav links are displayed inline and the pagination is not displayed.
Here the products link are displayed, as well as the excerpt and the product category.
Test website search
Here is how the websites search looks like without the toolset plugins.
Here is how it looks like with the toolset plugins activated. Of course further customization is possible if you want fine tune the appearance of the results.
If you want to see the differences, here is some information about the query when Toolset is deactivated.
This is the information we see when WPSOLR is deactivated. If you need additional explanations you can watch this video: