Drupal Configuration Steps

Drupal

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:

FieldValue
Solr ConnectorBasic Auth
HTTP protocolhttps
Solr hostThe Host shown on the Info tab of your index, without https://
Solr port443
Solr path/, a single slash
Solr coreThe name of your index, for example my_index
Username, PasswordThe username and password of your index (under HTTP Basic Authentication)
Solr path is a single slash. Search API Solr adds /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.

03 · Upload the Solr configuration

1

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.

2

Upload it

In the Opensolr Control Panel, open your index, click Configuration, choose the zip under Upload Config Zip and click Upload File.

3

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.