When to Ignore Drupal Settings for SearchStax Site Search

The SearchStax Module lets Drupal users choose whether SearchStax or Drupal configurations control specific search features.

Use this article if you plan to maintain your search experience with a Drupal View instead of SearchStax UI Kits. These settings let you ignore selected Drupal configurations so SearchStax can control features such as Search Fields, ranking and boosts, highlighting, and Spellcheck.

If you're deciding whether to keep using Drupal Views or move to UI Kits, see Why You Should Move from Drupal Views to UI Kits.

Before You Start

This article assumes:

  • The SearchStax Module is installed and connected to your Search App.
  • You're using a Drupal View for your search experience.
  • You can access Drupal admin and the Site Search dashboard.
  • You can edit and publish Site Search configurations.

This article focuses on the Drupal settings that let SearchStax ignore selected Drupal search configurations. It doesn't cover full SearchStax Module installation or initial connection steps.

Re-Route Searches via Site Search Configurations

In Drupal admin, go to Configuration > Search and metadata > SearchStax settings. Check Re-route searches via Site Search configurations, and then save the Drupal configuration.

This setting must be checked before you can choose which Drupal search settings SearchStax should ignore. After you save, additional feature settings appear below it. Each setting includes a checkbox that lets you ignore the Drupal setting for that feature.

If you don't check Re-route searches via Site Search configurations, searches continue to behave based on the Drupal search settings. In that case, the only relevancy features in the Site Search dashboard that influence search relevancy are Synonyms and Stopwords.

If you haven't used Synonyms or Stopwords before, make sure you're searching against Fulltext fields in your Drupal search settings. These features rely on parsing data from Fulltext fields.

For more context on how Drupal Views can override SearchStax settings, see Why SearchStax Changes Aren't Affecting the Drupal View Search Experience.

Parse Mode and Searched Fields

Check Parse mode and searched fields when you want queries sent from Drupal to the Site Search App to be very simple and rely on SearchStax configurations instead.

Before you check this setting, make sure you've configured the necessary Search Fields and ranking or boost settings in SearchStax. These settings should mimic the configurations you previously maintained in Drupal.

Configure Parse Mode and Searched Fields

  1. On the SearchStax settings page in Drupal, make sure Re-route searches via Site Search configurations is checked.
  2. Check Parse mode and searched fields.
  3. Save the Drupal configuration.
  4. In Site Search, open your Search App.
  5. Go to Configurations > Basic Configurations > Search Fields.
  6. Assign all the fields you want to search against.
  7. Publish your changes.
  8. Go to Ranking.
  9. Configure boosts to elevate relevancy for specific search fields, search field values, or search functions.
  10. Check Enable Field Ranking.
  11. Publish your changes.

To learn more about configuring fields and boosts in Site Search, see Setting Up Search Fields, Ranking, Stop Words, and Spell Check.

Note: Use search fields intended for search. Fulltext fields are recommended and are the easiest to maintain. String fields are less effective, and nGram fields add complexity and performance overhead. To learn more about field types generated by Drupal, see Understanding Drupal Field Names in SearchStax.

Impact

When Parse mode and searched fields is checked, Drupal View configurations for search fields or boosts are ignored. Continue to maintain these settings in SearchStax, where you can rapidly publish changes instead of relying on new Drupal configuration deployments for each adjustment.

This configuration also allows additional features, such as Promotions and Rules, to work properly.

If Search Fields haven't been configured in SearchStax yet, the change in search relevancy can be noticeable and undesirable when you switch from a Drupal configuration that previously determined search fields.

Highlighting

Check Highlighting when you want to rely on hit highlighting in SearchStax to highlight keyword matches in the fields displayed for search results.

Configure Highlighting

  1. On the SearchStax settings page in Drupal, make sure Re-route searches via Site Search configurations is checked.
  2. Check Highlighting settings.
  3. Save the Drupal configuration.
  4. In Site Search, open your Search App.
  5. Go to Configurations > Basic Configurations > Results Fields.
  6. Check Hit Highlighting.
  7. Publish your changes.
  8. In Drupal, uncheck the Highlight processor and search excerpts highlighting if either setting was checked previously and you don't need search excerpts in your search results.
  9. In Drupal admin, go to Configuration > Search and metadata > Search API.
  10. Find your SearchStax server and edit it.
  11. Under Advanced, check Retrieve highlighted snippets.
  12. Save the server settings.
  13. If you're using Drupal Views, go to Structure > Views and edit your search view.
  14. In the Fields section, edit each field you want to highlight.
  15. Check Use highlighted field data for each field you want to highlight.
  16. Apply the field changes, and then save the view.

For a more detailed walkthrough, see How to Enable Hit Highlighting in Drupal.

Impact

When Highlighting is configured, search results displayed in a Drupal View or with SearchStax UI Kits highlight keyword matches in the displayed fields.

Note: Search excerpts aren't available after you uncheck the Highlight processor. Leave the processor checked if you include excerpts in your search results.

Spellcheck

Check Spellcheck when you want to rely on spellcheck results returned by the SearchStax Spellcheck feature.

Configure Spellcheck

  1. On the SearchStax settings page in Drupal, make sure Re-route searches via Site Search configurations is checked.
  2. Check Spellcheck settings.
  3. Save the Drupal configuration.
  4. Index your content to the SearchStax App.
  5. In Site Search, open your Search App.
  6. Go to the Spellcheck feature.
  7. Check Enable Spellcheck.
  8. Consider using the Data + Dictionary driven method.
  9. Select a field to use for spellcheck recommendations. The recommended field is a content or title field for the language you're configuring.
  10. Optionally, upload key business terms as a dictionary.
  11. Publish your changes.
  12. In Drupal, install and configure the Search API Spellcheck module.
  13. Go to Structure > Views and edit the search Views where you want to display spellcheck recommendations.
  14. Add new Views area plugins. You can add these plugins to the header, footer, or no results displays of search Views.
  15. Save the view.

For more information about configuring spellcheck behavior in Site Search, see Spell Check.

Impact

Spellcheck recommendations for the Did you mean feature and no-result searches are powered by the words uploaded in the dictionary and the indexed data from the data field you selected.

Articles in this section