Search: stop words, phrase bonus, group order, compounds, plural, relaxed queries - #310
Merged
Conversation
…axed queries Five ranking defects measured on the real index, each pinned in test/search.test.mjs: - "how do i install" answered with Client API > check_on_init: `a`, `i`, `to`, `do` are a prefix of something in every entry and each earned a title-hit's worth of points. Stop words are no longer search terms while a real word is left. - "abap cloud" preferred abap-cleaner over the heading "ABAP Cloud": the words next to each other now earn a bonus. - "dialog" opened on four pages that mention the word above 47 samples that are dialogs: groups come in the order of their best hit, the documentation leading only when it has a real answer. - "messagebox" missed the heading "Message Box", "tables" found 33 of 202: a field is also matched with its spaces taken out, and a plural `s` is taken off before the prefix match. - "tabel" and "readonly" found nothing: a query that finds nothing sets the rarest word aside, then tries one edit away against the titles, and the box says what it answered instead; synonyms are data in the index builder (readonly -> editable, f4 -> value help, ...). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017JMbwNQAZ65yn4GrgRdvsi
Three links at the left edge under three boxes that span the width read as a fourth thing that did not get finished. In the published stylesheet and in VitePress's copy of the rule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017JMbwNQAZ65yn4GrgRdvsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Five ranking defects in the search box, each measured on the real index before the change and pinned in
test/search.test.mjs:a,i,to,doare a prefix of something in every entry and each earned a title-hit's worth of points. Terms of one or two letters (ui,f4) count at a word start only.scomes off before the prefix match: "tables" found 33 entries, "table" 202.hits.relaxedTo). Synonyms are data in the index builder (SYNONYMSinscripts/lib/search-index.mjs: readonly → editable, f4 → value help, …), added totermsso the alias finds the entry and the ranking stays with the entry's own words.Files
docs/.vitepress/theme/search-engine.js— the matcher (the playground's copy is brought in step in abap2UI5/playground)docs/.vitepress/theme/SearchBox.vue— the "Nothing matches X — showing Y" line, highlight of the query that answeredscripts/lib/search-index.mjs—SYNONYMS,enrich( )test/search.test.mjs— nine new testsAGENTS.md— the rules and the reasonsVerification
npm test: 245/245🤖 Generated with Claude Code
https://claude.ai/code/session_017JMbwNQAZ65yn4GrgRdvsi
Generated by Claude Code