StaticSearch v0.5.0 update
522 words, 3-minute read

StaticSearch v0.5.0 was released on . There should be no breaking changes but – more importantly – it has a new logo!..
Logical OR/AND searches #
Search results now contain a new found
value that gives the proportion of search words found on a page. For example, a page featuring two of the four search words entered has a found
value of 0.5
. You can set a new minfound
attribute on the web component or bind module to limit results to pages with an equal or higher found
value.
Consider a cooking website (thanks for the suggestion, Jos!) where users can search for recipes according to ingredients they have in the cupboard:
setting
minfound="0"
(the default) is a logical OR.A recipe page appears in results when it contains ANY of the ingredients. Recipes containing all ingredients should be at the top, but there will be less useful recipes featuring a single ingredient.
setting
minfound="1"
is a logical AND.A recipe page appears in results when it contains ALL the ingredients. That may be a little too restrictive.
setting
minfound="0.8"
means a recipe page appears in results when it contains at least 80% of the ingredients.Again, recipes containing all ingredients should be at the top, but there could be useful results featuring four of five ingredients entered.
StaticSearch allows you build a custom recipe search where the user could click ingredients and use a slider to change the precision / fuzziness of results.
Additional language support #
StaticSearch removes commonly-used stop words considered insignificant to the meaning of text – such as “and”, “the”, and “but” in English. This can produce better results and v0.5.0 now supports stop words in:
- Danish (
da
) - Dutch (
nl
) - English (
en
) - Finnish (
fi
) - French (
fr
) - German (
de
) - Italian (
it
) - Norwegian (
no
) - Portuguese (
pt
) - Spanish (
es
) - Swedish (
sv
) - Turkish (
tr
)
The lists are courtesy of Stopwords ISO.
StaticSearch on Frontend Focus #
The Frontend Focus newsletter, issue 703 featured StaticSearch, so many thanks to their editors.
Get started #
The StaticSearch documentation provides a quick start guide, and details about the indexer, web component, bind module, and JavaScript API.
StaticSearch works well with Publican sites. The Publican documentation provides a quick start guide, a detailed set-up guide, API references, and common recipes you can use and adapt for your own projects.