Punctuation Preprocessor for Search

Component ID

1082788

Component name

Punctuation Preprocessor for Search

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

2707

Component created

Component changed

Component body

This module implements a punctuation pre-processor that provides special handling for punctuation characters when they are encountered within word strings during searching and indexing.

Though the core Drupal search module provides some basic punctuation processing, some characters (such as hyphens, periods and underscores) are never treated as word boundaries. This means that strings like "word-power" are only matched in a search for the whole string ("word-power") but NOT the individual fragments ("word" or "power").

The punctuation pre-processor attempts to overcome this limitation by analyzing all punctuated word strings during searching and indexing (before the core search applies its own processing), and enforcing word boundaries when appropriate. It also ensures that all combinations of punctuated words are recorded and searchable (e.g., "word-power" will be matched with a search for "word", "power", "word-power" and "wordpower").