What is the MyListing add-on
The MyListing add-on makes it possible to use search listing with WPSOLR. This allows the theme and WPSOLR to be used together.
Install the MyListing theme
To install the theme click on appearance in the admin sidebar.
Then click on “Add New”.
Then click on “Upload Theme”.
Then drag the theme you downloaded earlier into the page.
Then click on the “Activate” button.
Then install the recommended plugins.
Install the demo website
If you want to install a demo website and maybe modify it instead of starting from scratch, click on “Theme Tools” < “Demo Import”.
You will have a choice between three demos. I am going to install the “Main Demo”.
Here is the result.
Configure listing types
Click on “Listing Types” in the sidebar.
Then edit the your listing types. Here I chose to edit “Cars for sale”.
Click on “Search Forms”
You can now see the filters that will be displayed on the front end.
Create a WPSOLR index
Click on “Connect your indexes” in the menu bar at the top in the WPSOLR admin section to create an index.
Then click on “Connect to your search server or search service”.
Choose the search engine and the hosting service. Choose a language and give your index a name and a search engine index name. Then copy the endpoint url you got from the hosting service. Leave the default of shards and replicas if you don’t know how many you need. Finally, fill in the user and the password you got from the hosting service.
Activate the Theme add-on
Click on “Activate extensions” in the menu bar.
Then click on “Theme” in the sidebar.
Click on the checkbox to activate the extension. This is useful if you want to be able to customize the search filters and use sliders for example.
Activate the MyListing theme in WPSOLR
Click on “Activate themes” in the menu bar.
Then click on “MyListing” in the sidebar.
Click on the first checkbox to activate the theme. If you click on the second checkbox you will speed up search in MyListing. Click on the second checkbox to display the search bar and the WPSOLR search filters faster. Click on the fourth checkbox to speed up similar listings.
Configure WPSOLR
Click on “Define your search with” in the menubar at the top.
Then click on the search checkbox and select “index1” in the “Search with this search engine index” section.
Click on “Data” in the sidebar.
And choose the content you want to search in. Here I chose to search in listings. Then choose the taxonomies you want to use.
Then select the fields you want to use. You can also change the type of the field. Here I chose to use a floating point number for the car-price field because I want to display it as a slider. Sliders will not work with a text field.
Index your content
Click on “Send your data” in the menubar.
Click on “Index selected post types in index”.
Test WPSOLR search
Test the website search
As you can see search is working well and the filters are displayed correctly.