To create, setup, and connect to your Solr/SolrCloud index, or just connect to your existing index, you will setup a connection to the index as seen in the following screens.
Here, you have two choices:
- Use a temporary Apache Solr index, as described before.
- Connect to your existing apache Solr index, as shown below.
Connect to your existing apache Solr index
If your index is hosted at Gotosolr, please follow the dedicated tutorial.
Click on the button “”Connect to your Elasticsearch / Apache Solr”, to open the connection setup parameters.
Here are the steps:
- Open the Apache Solr index parameters
- Select the type of index you’re connecting too (“Apache Solr” here)
- Give a name to your index. It’s just for wpsolr, it does not need to be related to your index real name. Like “dev index”, “stage site.com”, “prod do not delete”
- Choose if your index is protected with https or not (it should!)
- This is the host name of your Apache Solr server. Like localhost, www.mysite.com, subsite.mysite.com
- The port of your Apache Solr server. 8983 is the default, or 443 with https.
- This is the “path”. It’s made like this: /solr/yourindexname. If your index name is “test”, it will be “/solr/test”
- If your Apache Solr uses Basic HTTP authentication (it should!), this is the “user”
- If your Apache Solr uses Basic HTTP authentication (it should!), this is the “Password”
- This button verifies your connection (by pinging the index) and saves it if it’s fine. A green icon will be shown briefly if the connection is fine. Else, error messages in red appear.
Remove or update your Apache Solr index connection
After creating your connection, you can either:
- Create another one
- Change it’s parameters or check that it is still alive
- Remove the connection from wpsolr. It does not delete the index from Apache Solr: it just removes the connection from wpsolr’s connections list.
Common error messages
Solr HTTP error: HTTP request failed, Could not resolve host: XXXX
Your host name does not exist, probably because of a typing mistake. Ensure there is not http, not :, not // in the host name.
We could not join your Solr server. Your Solr path could be malformed, or your Solr server down (Solr code 404)
Solr HTTP error: OK (404)Error 404 Not Found
HTTP ERROR 404
Problem accessing /solr/test/admin/ping. Reason:
Your path is wrong: it should start with /solr/ followed by the index name. Or the index does not exist: you have to create it first. Or the index is in bad shape: verify the error messages in your Solr admin UI logs menu.
We could not connect to your Solr server. It's probably because the port is blocked. Please try another port, for instance 443, or contact your hosting provider/network administrator to unblock your port.
Solr HTTP error: HTTP request failed, Failed to connect to localhost port 8983: Connection refused
The Apache Solr server is down: verify that you can access it’s admin UI. Or your WordPress hosting company blocks all outgoing ports, but 80 and 443: ensure your apache Solr uses one of those ports.