Schema and guidelines for creating a staticSearch engine for your HTML5 site
Martin Holmes
Joey Takeda
2019-2024
This documentation provides instructions on how to use the Project Endings staticSearch
Generator to provide a fully-functional search ‘engine’ to your website without any
dependency on server-side code such as a database.
Stemming of terms (so searching for ‘wait’ will also retrieve ‘waiting’, ‘waits’, ‘waited’ etc.). Our default stemmer is the English Porter 2 stemmer, but there is also a French
stemmer, as well as an ‘identity’ stemmer (which makes no changes) and a diacritic-stripping
stemmer. If you have documents in another language, you can create and plug in your
own stemmer.
Boolean search operators. Adding + (plus) before a word means that search results must contain that word, and adding a - (minus) means that results must not contain that word. Words without plus or minus are treated as may contain, contributing to the score of any retrieved document.
Phrasal searches. Any quoted phrase will be searched as-is, and when quoted phrases
are included in a search, any hit document must contain at least one of them. Note
that phrasal search support requires a specific setting in your configuration file,
because it increases the size of the index.
Keyword-in-context search results. This is also configurable, since including contexts
increases the size of the index.
Wildcard searches, using the asterisk (*), question mark (?) and character classes
([ab]). So you can search for lo[uv]e? to find ‘loved’, ‘loued’, ‘loves’, ‘louer’, etc. If you don't have a stemmer for the language of your document collection, this
feature is a good alternative (although it can be combined with a stemmer as well
for greater flexibility).
Search filtering using any metadata you like, allowing users to limit their search
to specific document types, date ranges, or other features.