(In progress)
WPSolr is a very powerful search plugin that allows you to configure your search however you want. This doc is an overview of the “2.1 Search” configuration tab options in the WPSolr dashboard.
“Define your search” tab
Click on the “2. Define your search” tab.
“Search” tab
- The tab we are interested in for this guide is “2.1 Search“. It is the first tab that appears at the top of the tab sidebar in the “2. Define your search” section.
Select your view
Select for which view this configuration is for. Views are only available for WPSOLR PRO & ENTERPRISE. You can select it from a drop down list at the top of the “2.1 Search” page. You need to create this view beforehand from the “1. Activate extensions>Views“.
Select the index
Select your index from the drop down list. In this case, it is called “Elastic – Dev – facets”. It is an index created by WPSOLR in the “0. Connect your indexes”. There is a documentation available for if you want to connect to or create your own elastic index. There is no limit to how many indexes you can have created and available.
This means that every option you tweak in for this view will use this index and it’s associated data. If you want to use different data for different elements you can use views. An example would be a website with the following 4 views :
- facets (filters) enabled and configured for your blog page. It uses Elasticsearch and it’s index “Elastic – index – 1” containing only WordPress posts data.
- a search that uses Weaviate (learn how to install or create your index) vector search (“Weaviate – index”) containing products, posts and pages data.
- a Woocommerce HPOS search that uses Elasticsearch but with a different index (“Elastic – index – 2”) containing exclusively Woocommerce orders.
- recommendations powered by Recombee in the Woocommerce shop page using an index called “Recombee – index” storing all products.
Replace Front-end archives
Check one of these boxes to replace the WordPress default search in the archive and instead use the index you selected above for this view and it’s associated engine. As you can see in the examples below, WPSOLR uses your own theme to display it’s own results.
Examples :
Home (url “https://localhost/” no replace vs replace) :
Search (url “https://localhost/?s=shirt” no replace vs replace) :
Replace admin archives
If you feel like managing products, images, orders, etc… is too slow or inaccurate, you can also replace the backend search with WPSolr.
Examples :
Post types :
As you can see, WPSOLR facets you created also automatically appear when searching in the backend.
Media :
To do
Woocommerce HPOS :
To do
Log the search engine queries
This is a drop-down list containing two options :
- In WordPress debug.log – Requires define( ‘WP_DEBUG_LOG’, true ); in wp-config.php
- In Query Monitor – Requires activation of the WPSOLR Query Monitor extension
In WordPress debug.log
To do
In Query Monitor
To do
Search template
This is a drop-down list containing four options :
- Use my current theme search template without ajax (with widget Facets and widget Sort)
- Use my current theme search template with Ajax (with widget Facets and widget Sort)
- (Deprecated) Use WPSOLR custom Ajax search templates
- (Deprecated) Use WPSOLR custom Ajax search templates and show parameters in url
The custom WPSOLR templates are deprecated since it is recommended you use your own themes or plugins to display results.