Drupal

Opensolr Drupal — find answers to your questions

App Server Management — Your Stack, Fully Managed

YOUR SERVERSOPENSOLRMANAGEDDDrupalLLaravelWWordPressNNode.jsPyPython+Any StackYOUR APPS
Full-Stack Server Management

We manage your servers. You run your business.

Opensolr now manages complete application stacks — not just Solr. Drupal, Laravel, WordPress, or any custom app. One team, one infrastructure partner, zero DevOps headaches.


24/7 Monitoring & Auto-Healing
Continuous watchdog on every service. If something drops, it gets restarted automatically — usually before you even notice.
Git Integration & CI/CD
We set up and manage your Git workflows — push to deploy, staging pipelines, rollback capability. Development stays smooth and safe.
DR & Staging Environments
Full replicas for Disaster Recovery and staging. Your team tests confidently in production-identical environments before anything goes live.
Load Balancing & Scaling
Horizontal scaling, auto-replication, and intelligent load balancing. Your platform grows with your traffic — seamlessly.
Enterprise-Grade Security
SSL, firewall management, OS hardening, automated patching. Your infrastructure stays locked down and up to date.
White-Glove Support
Personalized onboarding, seasoned engineers, direct communication. No ticket queues — real people solving real problems, fast.

Your infrastructure, handled.
Tell us about your stack and we'll design, build, and manage the entire system — app servers, Solr search, everything in between. Over a decade of experience, at your service.
Read Full Answer

Slow Solr Queries Debugging

Understanding and Fixing Slow Drupal Solr Queries

Your Drupal site is slow when searching. You check the Solr debug output and discover that the query itself runs in 200-300ms — but faceting takes 1,500-2,000ms or more. The bottleneck is not Solr's search — it is all the extra work Drupal asks Solr to do.

WHERE THE TIME GOES IN A DRUPAL SOLR QUERYQuery: 278ms (fast)Faceting: 1,704ms (SLOW — 86% of total time)Other: 18msThe query is fine. The facets are the bottleneck.


Why Drupal Queries Are Slow

1. The *:* Query Pattern

Drupal often sends {!boost b=boost_document} *:* — meaning "match every single document." Even with filter queries narrowing results, Solr still has to evaluate the entire index first.

2. Too Many Facets

Drupal's Facet API requests facet counts for every active facet field. Each facet must count every term across every matching document. With 10+ facets and facet.limit=-1 (return all values), this is the main performance killer.

3. FCS Method (Slow)

Solr's default FieldCache Scanning (FCS) method scans the entire field value space. Modern alternatives like JSON facets or streaming facets are much faster.

4. Excessive Filters

Dozens of fq parameters — especially negations like (*:* -field:value) and range queries — each add cost.


Fixes in Drupal

A. Reduce Active Facets

Go to Configuration > Search API > View Modes and disable facets that are not visible on the page. Every active facet triggers Solr work, even if Drupal does not render it.

B. Limit Facet Results

In Facet API settings, change facet.limit from -1 (return everything) to a reasonable number:

facet.limit = 50
facet.mincount = 1

C. Use the JSON Facet API

If your Solr version is 7.x or newer, switch Drupal's Search API backend to use the JSON Facet API. It is faster, parallelized, and supports streaming facet counts.

D. Enable Caching

Enable Drupal's Search API query cache and facet cache to avoid recomputing identical facets for repeated queries.


Fixes in Solr

A. Enable DocValues on Facet Fields

Ensure all fields used for faceting have docValues="true" in your schema:

<field name="field_category" type="string" stored="true"
       indexed="true" docValues="true"/>

DocValues make faceting dramatically faster.

B. Use facet.threads

Parallelize facet computation:

facet.threads=4

C. Enable Filter Cache

In solrconfig.xml, ensure you have a properly sized filter cache:

<filterCache class="solr.FastLRUCache" size="512"
             initialSize="512" autowarmCount="128"/>

D. Switch to JSON Facets

Replace classic facet.field parameters with JSON facets:

json.facet={
  categories: { type: "terms", field: "field_category", limit: 50 },
  formats: { type: "terms", field: "field_format", limit: 50 }
}

Optimization Checklist

Area Action Typical Gain
Reduce facet count Disable unused facets in Drupal 60-80% faster
Set facet.limit Change from -1 to 50 Major
Enable DocValues Add docValues="true" to facet fields Major
Use JSON facets Modern Solr API 2-5x faster
Enable caching Drupal + Solr caches Significant
facet.threads=4 Parallelize computation 20-40% faster
Remove facet.missing Unless needed by UX 5-15% faster

Before vs After

Before (slow):

q={!boost b=boost_document} *:*&facet.limit=-1&facet.field=field_a&facet.field=field_b...

After (fast):

q=*:*&fq=available:true&facet.limit=50&facet.threads=4&
json.facet={
  categories:{type:terms,field:field_category,limit:50},
  formats:{type:terms,field:field_format,limit:50}
}

Need help optimizing your Drupal search performance? Reach out to us at support@opensolr.com — we can analyze your query patterns and recommend the right optimizations.

Read Full Answer

Drupal Setup with Opensolr

Drupal + Opensolr Setup

Drupal with Opensolr gives you enterprise-grade search — instant full-text results, faceted navigation, autocomplete, and relevance scoring — without running your own Solr server. There are two ways to connect:

TWO WAYS TO CONNECT DRUPAL TO OPENSOLRSearch API Opensolrdrupal.org/project/search_api_opensolrOne-click AutoConfigureAuto config file uploadBuilt-in security managementNo manual setup neededRecommendedSearch API Solrdrupal.org/project/search_api_solrManual config uploadFull control over setupWorks with any Solr hostRequires version matchingAdvanced users


Option 1: Search API Opensolr (Recommended)

The easiest path. The Search API Opensolr module includes AutoConfiguration — it creates your Opensolr Index, uploads config files, and sets up the Drupal search server automatically.

Install

composer require 'drupal/search_api_opensolr:^2.2'

AutoConfigure

  1. Enable the module in Drupal
  2. Go to the module's configuration page
  3. Click AutoConfigure
  4. Done — your Solr server is created, configured, and ready to index

No need to manually download config files, match Solr versions, or upload zip archives. The module handles everything.


Option 2: Search API Solr (Manual Setup)

If you prefer full control, use the standard Search API Solr module with manual Opensolr configuration.

Step 1: Choose the Correct Solr Version

When downloading config files from the Search API Solr module, make sure the Solr version matches what your Opensolr Index runs. Mismatched versions can cause schema errors or data loss.

Check your Solr version in the Opensolr Index Control Panel dashboard.

Step 2: Configure HTTP Authentication

All Opensolr Indexes are protected by HTTP Basic Auth. In your Drupal Solr server settings:

  1. Select Basic Auth as the authentication method
  2. Enter your Opensolr username and password
  3. Keep credentials simple — avoid special characters that Drupal may not encode correctly

You can view and change your credentials in the Security tab of your Opensolr Index Control Panel.

Step 3: Upload Solr Config Files

  1. In Drupal, go to your Search API Solr server settings
  2. Download the Solr config zip for your Solr version
  3. Upload the zip to your Opensolr Index via the Config Files Editor in the control panel
  4. Click Reload to apply

Step 4: Create Your Index and Start Indexing

  1. Create a Search API index in Drupal
  2. Select which content types, fields, and processors to use
  3. Click Index now to start sending content to Solr

Important Notes

  • Always use Basic Auth — Opensolr Indexes require authentication. See our HTTP Auth guide for default credentials.
  • Keep passwords simple — no special characters in username or password. Drupal's URL encoding can cause connection failures with complex passwords.
  • Version compatibility — if your Drupal module expects Solr 9.x but Opensolr runs 8.x, contact us. We can adapt your config files to work on any Solr version without impacting functionality.

Quick Checklist

  • Easiest path: Install Search API Opensolr and use AutoConfigure
  • Manual path: Install Search API Solr, download config zip, upload to Opensolr
  • Always configure Basic Auth credentials in Drupal's Solr server settings
  • Match the Solr version when downloading config files
  • Keep credentials simple (no special characters)
  • Reload your Opensolr Index after uploading config files

Need help connecting Drupal to Opensolr? Reach out to us at support@opensolr.com — we set up Drupal integrations daily and can do it for you, free of charge.

Read Full Answer

Loading more articles...