Iām especially interested in feedback on how well (or not) itās finding what youāre looking for, so try finding things youād normally search for, and let me know if the results are what you expect.
Itās a custom built search/indexer which uses fuzzy matching and a scoring system.
The numbers you see in each result (e.g ā37 = 92/100ā) reflect the score; a score of 40 (100/100) or higher is considered a confident result, a good match. Scores are assigned per matching word. Right now, a match in the page title is 10 points, matches in the other headers are 4 points (limited to 20 points for 5 occurrences in all headings), and body content is 1 point (limited to 20 points for 20 occurrences). Iāll probably play with these numbers a bit still though.
At the moment, only English docs for 2.x are indexed, so no results for 3.x or Russian/Dutch is expected (coming soon!). Some other things Iāll be working on include showing an extract of the result page, pagination, reindexing changed documentation, perhaps some more control over the fuzzy matching, and the code needs cleaning up and restructuring to make it easier to extend down the road.
From a UX standpoint, a brief description/extract of the results might be more useful than the score. I would even drop the score altogether. But If you must keep it, you should reduce its font-size and use a muted gray color.
Also, the search doesnāt return the If extra, probably due to the minimum character number being higher than 2, which is understandable.
And, the search finds 623 results for the term MODX, but not all are returned.
It looks like āIfā isnāt indexed because itās a stopword; i.e. too commonly used in sentences that itās filtered out as not having any real meaning. Like āaā and ātheā. It does show up when searching for āconditionā. Maybe Iāll take āifā out of the stopword list as that does have some real meaning for usā¦
It definitely isnāt done yet; like I mentioned showing an extract and adding pagination to see more than 10 results is still on the to do list.
Shows an extract of the page. Currently the start of the page body; might change it to get the relevant portion of the page instead later.
Shows breadcrumbs leading to a page for a bit of very useful context (e.g. search for āroadmapā)
Pagination added, so you can see beyond the first 10 results.
The search now uses 100% of the weight on exact matches, and 75% for fuzzy matches (e.g. searching for friendly urls will use 100% of the weight for urls, but 75% of the weight for url).
Itās now possible to quote individual words to force it to only use the exact match, e.g. friendly "urls". The search page will also tell you thatās possible when fuzzy matches are used.
The score is shown more subtly now, but can also be clicked to get a bit more insight into why a certain page has a certain score.
If words are ignored because theyāre too short or a stopword, it will now tell you. (e.g. search for āifā or āwhat is a modxā)
Still more to be done but it should be a lot more user friendly with this update
Iāve updated the searching algorithm to also match on terms that youāre starting to type (e.g. synt will āautocompleteā to syntax). Thatās not a fuzzy search (e.g. gertes wont figure out youāre typing getresources) but does help with another new search featureā¦ live results as you type:
Exciting milestone - the legacy docs have now been replaced with this new system and content on docs.modx.com! Thatās now on hardware sponsored by MODX LLC.
Iāll keep docs.modx.org running as a mirror (and probably rename it to docs-mirror.modx.org with a note at the top or such providing a link to the official version). The canonical is already updated, so search results should update automatically as well.
By popular request, thereās now an improved language/version switcher in the top right (top left on mobile). Based on initial work a while ago by @christianseel, which Iāve tried to not mess up too much.
The options point to the current page in the other language if available (that used to be right below the documentation title before), or if that page was not translated (like for Dutch in this example) it points to the index of that translation instead.