Offline Search in Hugo
Search for your Hugo Website | Hugo
Hugo JS Searching with Fuse.js
Fuse.js
Fuse is slow for me.
Client Side Search Engine for Hugo Website
Hugo JS Searching with Fuse.js
Lunr.js
Theme using Lunr is pacollins/hugo-future-imperfect-slim
Not the right way is creating index with node.js like dgrigg/hugo-lunr or stkevintan/hugo-lunr-zh
The right way:
- The easier way to use lunr search with Hugo | Almost Secure
- Janik Vonrotz - Simple Hugo page search with Lunr.js
- Use Hugo Output Formats to generate Lunr index files for your static site search · Bart de Goede
- Add Search to Your Static Site with Lunr.js (Hugo, Vanilla JS) Use it on client: https://gist.github.com/sebz/efddfc8fdcb6b480f567
I can pre-build index with node.js but also with PHP GetDKAN/lunr.php
Elasticlunr.js
Based on lunr.js.
Adding search to Hugo with elasticlunr · Camping Coder
FlexSearch.js
fuzzy capabilities are really lousy and plain basic
Typical basic full-text search features include:
tokenization: strings are broken into words differently across languages
stemming: caring for elders matches results for care for elders
stopword handling: avoid irrelevant results caused by common words such as a and the
basic fuzzy matching: service workers matches results for Service Worker
Advanced full-text search features include:
autocomplete: typing progre… invokes suggestions including "Progressive ..."
suggestions: typing "Porgessive" suggests "Progressive"
search expressions: enables search to use AND, OR, NOT operators
phrase matching: enables to control how much distance can be allowed between words in a search phrase. For instance, one may configure a search for black friday to match the exact phrase black friday or to match also descriptions that include the words black and friday
synonym search: typing shoes or footwear should return similar results
Most of the benchmarked full-text search libraries provide the aforementioned search basic features. FlexSearch additionally provides advanced features like suggestions, partial matching, phonetic matching, pagination and search expressions. FlexSearch does not however provides synonym search.
chenningg/hugo-flexsearch: A library implementing Flexsearch to enable full text search for Hugo sites.
frjo/hugo-theme-zen implements FlexSearch.js
Alternative string-scoring and fuzzy-matching libraries
-
fwextensions/quick-score; library based on the Quicksilver algorithm; better than rmm5t/liquidmetal or any other Quicksilver based library
-
farzher/fuzzysort; fast SublimeText-like fuzzy search; development may be stalled; probably way faster than Fuse.js (2.8 op/s vs 0.2 op/s 1);
Quote by author: I tried using existing fuzzy libraries like fuse.js and fuzzyset.js and also found them to be terrible, so I wrote one which behaves basically like sublime’s search; I don’t handle misspellings (because sublime’s search doesn’t); DO read the comments
-
atom/fuzzaldrin; part of official Atom by GitHub editor. Should be excellent
-
glench/fuzzyset.js is quite active; for some reason, I believe this one is awesome
-
wouter2203/fuzzy-search; maintained
-
nol13/fuzzball.js; port of the fuzzywuzzy Python library
-
EthanRutherford/fast-fuzzy; ranking algorithm is a modification of levenshtein distance
-
mattyork/fuzzy; old, abandoned; based on Sublime Text
-
bripkens/fuzzy.js; abandoned, old
-
jakealbaugh/fuzzy-search; abandoned, old
-
bevacqua/fuzzysearch; old and abandoned
Mostly full-text, less fuzzy-search
- nextapps-de/flexsearch is the fastest one, without comparison; has something like fuzzy-search
- they also offer nextapps-de/bulksearch but that’s also full-text focused
- bvaughn/js-search; began as a lightweight implementation of Lunr.js, but faster
- weixsong/elasticlunr.js; full-text search engine; based on lunr.js, but more flexible; soon to be abandoned
- kbrsh/wade; abandoned; also very fast
Amazing!
Self-hosted fuzzy search engine, like fast-Google, alternative to Algolia, much easier than Elasticsearch, as one binary written in C++: typesense/typesense or similar MeiliSearch
Pagefind je novi favorit