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:
- You'll see an info box explaining the feature
- Click the "Enable Elevation" button
- The module calls the Opensolr API to configure the component on your index
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:
- Log in as an admin with the "Administer Opensolr Search" permission
- Go to your search page at
/opensolr-searchand search for something - On each result, you'll see PIN and EXCLUDE buttons
- Click PIN to pin a result to the top โ you can set a position (lower = higher)
- 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.
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.