Documentation

Select a category on the left, to get your answers quickly

To setup your Drupal instance with Opensolr, you can either use the Search API Opensolr module, or, you can use Search API Solr.

In both cases, the setup should be pretty straight forward.

In the first case, you also have the option for AutoConfiguration, where you won't have to worry about the Solr server setup, at all. 

All you'd have to do, is to create your index and start indexing your data.

The very important steps, however, if not using the Search API Opensolr module, are as follows:

  1. Make sure you select the correct Solr Version, when creating your Opensolr index.
    Selecting the wrong version, that is not supported or otherwise doesn't work with your version of Drupal, may cause data loss, and render your index unusable.

  2. Remember that all Opensolr Indexes are protected by Basic HTTP Auth.
    You will have to configure your Opensolr Index credentials, every time you update your Solr Server configuration.
    You can change your index credentials, at any time, from your Opensolr Index Control Panel.

    Remember that you should never use special characters in both your username and password. Those will be discarded and you may get the wrong credentials inside your Drupal Solr Server settings.
  3. Pay very close attention, when downloading the Solr Configuration Zip Archive from Drupal, so that the downloaded archive will match the Solr version you are using inside Opensolr.
    Once you did that, you simply have to upload the Zip Configuration Archive, into your Opensolr Index Control Panel.
  4. Once you did that, you can now go ahead and create your index in Drupal, and start indexing your data.
If your Normal, Search API Opensolr module won't work on your legacy Drupal, or any Drupal version, these steps might help.
 
Use the standard Basic Auth instead of the Official Opensolr Drupal Module, since that is no longer supported on Drupal 8, however the Opensolr service is supported on any Solr and Drupal versions Opensolr Drupal Basic Auth Configuration
 
- Changed the index credentials to 123/123 (something simple), just to make sure all will work ok, using the Opensolr Control Panel:

Opensolr Security Control Panel

- Added the AUTH credentials in the Drupal admin:
Opensolr Security
 
- Added /solr to the Solr Path configuration in Drupal admin:
Drupal Opensolr Config
 
- Uploaded the Drupal 8 Solr version 3 Solr configuration files, using the Opensolr Configuration Control Panel. These are required in order for Drupal to identify the correct Solr index and version.
You can find these files in a folder called conf under the ApacheSolr Search API Drupal Module

Opensolr Config Files Editor

 
Drupal - Search API Opensolr
Opensolr, is Drupal-Ready with, the Search API Opensolr Module.
Extends the main Search API Solr
 module and provides functionality for connecting and managing Solr using the Opensolr services.
Download Now

 

Some issues to be mindful about.

Drupal, has changed the way it works, and now, for path, it only requires you to have a SLASH.
Basically, what we call Path (/solr/index_name), in Opensolr, it should be / for your Drupal setup.
And what Drupal calls SolrCore, should be the Name of your Opensolr Index.

Also, if you use Opensolr in SolrCloud mode, please note that the solr server path is /solrcloud instead of /solr. (i.e.: https://server.opensolr.com/solrcloud/index_name/select?...)

So, unless Drupal has decided to hard-code the /solr part of the connection URL, you should be able to use your Opensolr SolrCloud Index, and set your path, in Drupal as /solrcloud, instead of / (slash).

Ultimately, we will help you upload your config files, regardless of the Solr Version you decide to use, as usual, we'll do this for free, and, instantly, during our office hours.

You might also want to watch the clip about all external integration issues.

Opensolr connection to Drupal

It is a common misconception, that, if your Drupal module, or any other Solr plugin, requires, say, Solr Version 6.4.x, and Opensolr only provides Solr version 6.1.x, you can't use it with Opensolr.

With small modifications to your Solr config files, we can make your config files work on any of our Solr versions, without any impact on your Solr integration, or functionality overall.

Of course, migrating from one major Solr Version to another, isn't that straight forward, but, we can even, do that.
However, I can't stress enough that, migration between any Solr minor Versions is not only possible, it's even recommended, since we'll do it all for you, if you want to save time, and money, since, of course, Opensolr also offers FREE membership now.

It has also been a common misconception, that, your Opensolr connection URL returns 404 NOT FOUND, and therefore, it can not be used, and something must be broken.

In your Opensolr Control Panel, you will see your connection url as something like the following:
https://useast612.solrcluster.com/solr/opensolr/
Now, that URL, will always return an HTTP STATUS 404 NOT FOUND.

Ironically, that means everything is OK.
Your application will use that, as a base connection URL, and append other Solr Request Handlers to it, as you can see in this example:
https://useast612.solrcluster.com/solr/opensolr/select?q=*:*&wt=json&indent=true&start=0&rows=50&fl=title,description&fq=+content_type_text:(html)

We have added the /select Request Handler, and that very same connection URL is now responding with a full Solr json format response.

It's an OpenSolr Miracle! 

Here are a few things to check if your Drupal won't connect to your Opensolr Index/Cluster.

1. Make sure you are using the latest Search API Opensolr module from the Drupal community, if you are using Drupal 8+ as this will make things much easier for you.

2. In your Drupal Solr Server settings, please select Solr with Basic AUTH OR Opensolr With Basic Auth

3. DO NOT forget to set the Opensolr Index AUTH Credentials, in your Drupal Solr Server Settings page, as it is described here

4. Try to set a shorter password for your Opensolr Index by going to your Index Security Tab in your Opensolr Index Control Panel (See image below). Replace INDEX_NAME with your own index name. (https://opensolr.com/admin/solr_manager/tools/INDEX_NAME#security)

Then try to use the new credentials in your Drupal Settings Page.

5. Make sure you upload the Solr configuration Files, provided by Drupal, in your Opensolr Index Control Panel, at: https://opensolr.com/admin/solr_manager/tools/INDEX_NAME#configuration (Replace INDEX_NAME with your own index name)

6. Make sure you use the correct connection parameters as indicated in the Opensolr Index Control Panel Dashboard: https://opensolr.com/admin/solr_manager/tools/INDEX_NAME#overview (Replace INDEX_NAME with your own index name)

In this clip we will talk about some of the most common drupal configuration issues, based on the solr configuration files provided by the Drupal search api module.

I cannot index any content from my Drupal CMS to my Opensolr index.
ISSUE:

 

Error is:

"2022-10-11 15:42:34 ERROR HttpSolrCall: - org.apache.solr.common.SolrException: java.io.FileNotFoundException: /usr/share/solr/example/multicore/INDEX_NAME/data/tlog/tlog.0000000000000002357 (No such file or directory)"

 

SOLUTION:

(replace INDEX_NAME with your own Opensolr INDEX NAME)

 

That's all because you are using updateLog in your solrconfig.xml

You can generally fix this by clicking Reload/Repair under the tools menu in your Opensolr index control panel.

Reload Repair Opensolr Index

There is also a Restart Solr Service that always fixes this issue, however that's only available if you have a Dedicated Opensolr Environment. 

 

The logic is that updateLog uses up a lot of system resources and causes the index to be corrupted until the tlog files are being removed, which is what that Reload/Repair button does among other things.
Another more permanent fix (only if you really must use updateLog in solrconfig.xml) is to move over to a larger dedicated OpenSolr Cloud server in which all server resources are not shared, and this issue will be mitigated.

Also, if you go here:

And you select solrconfig.xml form that select drop-down box, you then look for the updateLog snippet, and remove that tag entirely, for example:
<updateLog>
    <str name="dir">${solr.ulog.dir:}</str>
</updateLog>
XML
Then this issue will not show up until you upload the config files from Drupal again. At which time you will have to do this again, or tell Drupal not to add that somehow.

 

You can use that, since that will try to reset the tlog (updateLog) of the Solr Index, which that's the thing that gets corrupted, and should sort this out.
 
 

Drupal 6.x Known issue:

Looking at solrconfig_extra.xml you will find stuff like this:

<str name="accuracy">0.5</str>
<str name="maxEdits">2</str>
<str name="minPrefix">1</str>
<str name="maxInspections">5</str>
<str name="minQueryLength">4</str>
<str name="maxQueryFrequency">0.01</str>
<str name="thresholdTokenFrequency">.01</str>

You will have to change it to stuff like this:

<int name="maxEdits">2</int>
<int name="minPrefix">1</int>
<int name="maxInspections">5</int>
<int name="minQueryLength">4</int>
<float name="maxQueryFrequency">0.01</float>
<float name="thresholdTokenFrequency">.01</float>

I hope it's obvious why...
And please  try to find more occurrences of integers and floats being defined as strings, in the drupal config files... I'm sure there must be more erors like these, in other configs for other solr versions as well in drupal.





Review us on Google Business
Close Check out the Fully Automated Solr server setup for Drupal & WordPress.