Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Porter Algorithm Search Stemmer

711 sites Security covered Drupal 10–11
View on drupal.org

This module improves English-language searches by applying the Porter stemming algorithm. It reduces word variations to their root form, making searches for terms like 'blog', 'blogs', or 'blogging' equivalent. This helps to return more relevant search results.

This module implements the Porter stemming algorithm to improve English-language searching with the Drupal built-in Search module.

Stemming is a process for truncating words in a search index to a basic root so that variations on a word ('blogs', 'blogger', 'blogging', 'blog') are treated as equivalent in search. This generally results in more relevant search results.

This module implements Version 2 of the Porter stemming algorithm. An interface for testing how the algorithm stems words can be found at https://stemmer.markfullmer.com/demo/

Note: although the Porter stemming algorithm is not specific to American English, some British spellings will not be fully stemmed. Most notably, -ise word endings are not stemmed as well as -ize, due to the algorithm.

Installation and usage

This module only needs to be enabled for it to work with Drupal search. There is no configuration necessary. If you are using the search_api module, you do not need this module: Search API provides its own Porter Stemmer implementation.

After installing and enabling this module (in the usual way), you will need to rebuild the search index. To do this:

  1. Visit Administer > Site configuration > Search settings, and click on "Re-index site".
  2. Ensure that cron has run sufficient times so that the Search Settings page shows that the site is 100% indexed. You can run cron manually by visiting Reports > Status report and clicking on the "Run cron manually" link.

Limitations and Notes

  • The Porter stemming algorithm has a few parts that work better with American English than British English, so some British spellings will not be stemmed correctly. It is also definitely English-specific, and non-English content will not be stemmed correctly.
  • The core Search module in Drupal 7.x does not provide a way for a stemming module (such as Porter Stemmer) to know the language of content or search terms during searching or search indexing. So, if you have a multi-lingual Drupal 7 site and enable the Porter Stemmer module, it will unfortunately try to apply its stemming algorithm to all the content on your site, regardless of language. See this issue for details: #363336: Add option for Porter-stemmer to only stem English or language neutral content for a multi-language site.. Drupal 8 does not have this problem.
  • The Porter stemming algorithm attempts to reduce words to their lingustic root words -- it does not do general substring matching. So, for instance, it should make "walk", "walking", "walked", and "walks" all match in searching, but it will not make "walking" a match for "king".
  • In Drupal 7.x, there is an issue with excerpts in Porter Stemmer (see: #437084: Excerpt fails to find stemmed keyword). For example, if a page contains the word "walking" and someone searches for "walk", that page will be included in the search results, but the search excerpt will not display the portion of text containing "walking" (it will probably just display the first paragraph of text on that page). This should not be a problem in Drupal 8.x.

Maintainers

The Porter Stemmer module is currently co-maintained by jhodgdon and mark_fullmer. If you have questions or comments about this module, please communicate with the maintainers by posting an issue (see issues area in sidebar of this page). That way, others can benefit from the answers as well.

Depends on

Dependencies of the latest stable release

  • search Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
2.0.3 Stable 10–11 Jun 30, 2026