Using the Drupal Quant Search module
The optional Drupal Quant Search (
quant_search) submodule allows for creating Quant Search Pages within Drupal. Quant Search leverages the powerful Algolia search platform.
Quant Search is an add-on feature with a nominal cost.
- Connect Drupal with Quant
- Enable Quant search in Dashboard
- Add the
quantcdnproject to your site, e.g.
composer require drupal/quantcdn
- Enable the
- Go to the Drupal Quant Search admin page (
- You should see a
Search is enabled for *project*message
For Drupal sites, the
quant_search module is the preferred method for adding Quant search pages. If you add search pages within the Quant Dashboard, these will not show up in Drupal. And, any search pages created in Drupal do not show up in the Dashboard Search section. Search pages created in Drupal can be viewed with regular content in the Dashboard Content section.
Unlimited Quant search pages can be added in Drupal. They are pushed to Quant automatically when creating or updating search pages.
- Go to the Drupal Quant Search Pages admin page (
- Click the
Add Quant search pagebutton
- Fill in the page details including, at minimum,
- The page can be enabled or disabled as needed and defaults to disabled
- The options are fairly self-explanatory, but some notable options are detailed below
- Click the
Savebutton to save the search page and send the page to Quant
See the Algolia Filter documentation for details on the types of filters that can be added.
Search facets can be added and will allow the user to filter the content.
- There are 3 facet styles: checkbox, select, and menu
Languagefacets have no additional configuration
Taxonomyfacet requires you to select a
Facet headingis optional, but good for UX and accessibility
- For multilingual sites, the
Facet languagecan be chosen
- To remove any facet, click the
- To add a facet, fill in the bottom facet details and click the
- Facets can be reordered using drag-and-drop or by changing the
- After changing any facet information, click the
The Quant Search index contains all the information sent to Quant based on the entity configuration and search pages.
- Go to the Drupal Quant Search admin page for index status (
- Click the
Clear indexbutton to remove all the content from the search index
- Go to the Drupal Quant Index admin page to reindex content (
Clearing the index means all of the search-related data is removed, but the Drupal pages will remain in Drupal and in Quant. If you have active search pages, these will show no results if the index has been cleared and not updated.
- If you intend to remove search from your site, it is best to disable all search pages first and then clear the index
- If you are temporarily removing search index data, make sure to reindex as soon as possible
Some of the search results details are configurable such as the result title, summary, image, and view mode.
- Go to the Drupal Quant
Entity configurationadmin page (
- The configuration defaults to common search requirements
- Enable or disable
termcontent with the checkboxes
- No other configuration is currently available for taxonomy
- Click the
Save configurationbutton to save changes
Search content for
nodes (pages) can be configured per content type.
- There are default options for
Content view mode
- For each content type, there are overrides available for these options
- Content types can also be excluded from the search index entirely
- Reindex content if the configuration has changed
Excluding a content type after its content has been added to the search index, requires clearing the search index before reindexing.
To show images in the search results, update the image token to the correct image style for your content type. Example: