Connect to an Apache Solr index

804 views March 13, 2017 July 13, 2019 admin 0

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.

 

 

First step to connect an index

First step to connect an index

Here, you have two choices:

 

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.

Details to connect an apache solr index

Details to connect an apache solr index

Here are the steps:

  1. Open the Apache Solr index parameters
  2. Select the type of index you’re connecting too (“Apache Solr” here)
  3. 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”
  4. Choose if your index is protected with https or not (it should!)
  5. This is the host name of your Apache Solr server. Like localhost, www.mysite.com, subsite.mysite.com
  6. The port of your Apache Solr server. 8983 is the default, or 443 with https.
  7. This is the “path”. It’s made like this: /solr/yourindexname. If your index name is “test”, it will be “/solr/test”
  8. If your Apache Solr uses Basic HTTP  authentication (it should!), this is the “user”
  9. If your Apache Solr uses Basic HTTP  authentication (it should!), this is the “Password”
  10. 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

Update or delete an Apache Solr connection

Update or delete an Apache Solr connection

After creating your connection, you can either:

  1. Create another one
  2. Change it’s parameters or check that it is still alive
  3. 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:
Not Found

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.

Was this helpful?

Join Our weekly Newsletter

Receive our latest news once a week, each Thursday afternoon.
Your email is kept 100% private, and you will not receive other stuff in your mailbox.

We keep your data private and share your data only with third parties that make this service possible. Read our Privacy Policy.