Connect to an Elasticsearch index

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

To create, setup, and connect to your Elastisearch index, or just connect to your existing index, you will setup a connection to the index as seen in the following screen.

First step to connect an index

First step to connect an index

Connect to your new or existing Elasticsearch index

Click on the button “”Connect to your Elasticsearch / Apache Solr”, to open the connection setup parameters.

Details to connect an Elasticsearch index

Details to connect an Elasticsearch index

Here are the steps:

  1. Open the Elasticsearch index parameters
  2. Select the type of index you’re connecting too (“Elasticsearch” 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. Real name of your index in your Elasticsearch server (no whitespace, no special characters).
  5. Choose if your index is protected with https or not (it should!)
  6. This is the host name of your Elasticsearch server. Like localhost, www.mysite.com, subsite.mysite.com
  7. The port of your Elasticsearch  server. 9200 is the default, or 443 with https.
  8. If your Elasticsearch uses Basic HTTP  authentication (it should!), this is the “user”
  9. If your Elasticsearch  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 Elasticsearch index connection

Update or delete an Elasticsearch connection

Update or delete an Elasticsearch 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 Elasticsearch: it just removes the connection from wpsolr’s connections list.

Common error messages

No handler for type [keyword] declared on field [id]
Your Elasticsearch version is 2.x. WPSOLR requires a 5.x version, with the mapper attachment plugin.

Couldn't resolve host
Your host name does not exist, probably because of a typing mistake. Ensure there is not http, not :, not // in the host name.

no such index [index: bad-request]
The index name contains unsupported characters, like white spaces. Or the index is in bad shape: verify the error messages in your Elasticsearch logs.

Couldn't connect to host, Elasticsearch down?
The Elastisearch server is down: verify that you can access it’s admin UI with this port. Or your WordPress hosting company blocks all outgoing ports, but 80 and 443: ensure your Elasticsearch 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.