These steps connect Search API Solr to your Opensolr Index by hand. With Search API Opensolr, its Autoconfigure page does all of it for you: Drupal Search API Opensolr.
01 · The server form in Drupal
Under Configuration › Search and metadata › Search API, click Add server, choose the Solr backend and fill it in like this:
| Field | Value |
|---|---|
| Solr Connector | Basic Auth |
| HTTP protocol | https |
| Solr host | The Host shown on the Info tab of your index, without https:// |
| Solr port | 443 |
| Solr path | /, a single slash |
| Solr core | The name of your index, for example my_index |
| Username, Password | The username and password of your index (under HTTP Basic Authentication) |
/solr/ and the core name to the address by itself. The Info tab shows the path as solr/ plus your index name: do not copy it into Solr path, or every request goes to /solr/my_index/solr/my_index and fails.Indexes in China show port 80 on the Info tab: use http and port 80 for them.
02 · The username and password
A new index uses the username opensolr and your master API key as password. The key is on your Dashboard as Master REST API Key, and under Account › API Keys.
To change them, open the index, click Security, type the new Username and Password under Authentication and click Save. Use letters and digits only: other characters are removed when you save. The new values work after about 10 seconds.
Generating a new API key does not change the password of the indexes you already have.
More: HTTP Basic Auth and Default HTTP Auth Credentials.
03 · Upload the Solr configuration
Get config.zip
Save the server in Drupal, then click Get config.zip on the server page. Search API Solr builds the files for the Solr version it reads from your index.
Upload it
In the Opensolr Control Panel, open your index, click Configuration, choose the zip under Upload Config Zip and click Upload File.
Nothing to reload
The progress page saves every file and reloads the index by itself; it ends with ALL DONE!. Details: Upload a ZIP. If the upload reports an error: Can not update/upload configuration files.
04 · Index your content
Add a Search API index on the new server, choose the content and the fields, and click Index now on the page of the index.
Does not connect? Opensolr Connection Issues lists the usual causes.