Query Elevation - Pin & Exclude Results

Editorial control over search results

Query Elevation

Query Elevation lets you pin important results to the top or exclude irrelevant results for specific search queries. This gives you editorial control over what visitors see.

Where to configure

Go to the Elevation tab (/admin/config/search/opensolr/elevation).

Enabling elevation

The first time you visit this tab, it checks if Query Elevation is enabled on your Solr index. If it's not:

  1. You'll see an info box explaining the feature
  2. Click the "Enable Elevation" button
  3. The module calls the Opensolr API to configure the component on your index
✅ Already enabled

If you set up your index through the module's Save & Connect flow, elevation is enabled automatically. You can skip straight to managing rules.

Two ways to manage elevation

Method 1: Visual management (recommended)

The easiest way to pin or exclude results is directly from the search page:

  1. Log in as an admin with the "Administer Opensolr Search" permission
  2. Go to your search page at /opensolr-search and search for something
  3. On each result, you'll see PIN and EXCLUDE buttons
  4. Click PIN to pin a result to the top โ€” you can set a position (lower = higher)
  5. Click EXCLUDE to hide a result from this query

Changes take effect immediately โ€” no page refresh needed.

Method 2: Manual form

On the Elevation tab, expand "Add Rule Manually" and fill in:

  • Search Query โ€” the exact query this rule applies to (case-insensitive)
  • Document URL โ€” the full URL of the page to pin or exclude
  • Document Title โ€” optional, just for your reference
  • Action โ€” "Pin to top" or "Exclude from results"
  • Position โ€” for pinned results, controls the order (1 = first, 2 = second, etc.)

Use cases

📌 Pin to top

Your pricing page should always be the first result for "pricing". Pin it! Works for key landing pages, promotions, or important announcements.

🚫 Exclude

An outdated blog post keeps showing up for "getting started"? Exclude it. The page stays on your site, just not in that search result.

💡 Exact query match

Elevation rules match the exact query (case-insensitive). A rule for "drupal hosting" won't apply to "drupal" or "hosting drupal". Create separate rules for each query variation.

Deleting rules

To remove an elevation rule, click the Delete link next to it on the Elevation tab. A confirmation dialog prevents accidental deletion.