Closed Bug 1180144 Opened 9 years ago Closed 6 years ago

'kumascript_macros' parameter doesn't match exact macro name

Categories

(developer.mozilla.org Graveyard :: Search, defect)

All
Other
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sebo, Assigned: jwhitlock)

Details

(Keywords: in-triage, Whiteboard: [specification][type:bug])

What did you do? ================ Searched for occurrences of the 'csssyntax' macro in en-US locale: https://developer.mozilla.org/en-US/search?locale=en-US&kumascript_macros=csssyntax What happened? ============== I also got matches for pages, which include the 'csssyntax2' macro. What should have happened? ========================== The parameter value of 'kumascript_macros' should be matched exactly, so searching for 'xyz' should match pages including the macro {{xyz}}, but not pages including the macros {{abcxyz}}, {{xyz123}} or {{abcxyz123}}. Is there anything else we should know? ====================================== If substring matching for macros is needed, this could be implemented using wildcards. So kumascript_macros=*xyz* would match all three variants above.
Component: General → Wiki pages
CC'ing Jannis our search expert. I guess a start is this file: https://github.com/mozilla/kuma/blob/master/kuma/wiki/search.py Jannis, if this is a good first bug, any pointers are welcome.
Component: Wiki pages → Search
(In reply to Sebastian Zartner [:sebo] from comment #0) > What should have happened? > ========================== > The parameter value of 'kumascript_macros' should be matched exactly, so > searching for 'xyz' should match pages including the macro {{xyz}}, but not > pages including the macros {{abcxyz}}, {{xyz123}} or {{abcxyz123}}. Agreed.
Severity: normal → minor
Keywords: in-triage
Note that this is needed to ensure there are no pages anymore using csssyntax, which will get broken once the CSS info pages are killed. See bug 1198949. So it would be great if this could be fixed. Sebastian
(In reply to Florian Scholz [:fscholz] (MDN) from comment #1) > CC'ing Jannis our search expert. > > I guess a start is this file: > https://github.com/mozilla/kuma/blob/master/kuma/wiki/search.py > > Jannis, if this is a good first bug, any pointers are welcome. As Jannis just removed himself from CC, I redirect this question to John. Sebastian
Flags: needinfo?(jwhitlock)
No, this is not a good first bug. All search bugs require 1) domain knowledge of ElasticSearch, 2) enough content for local development tests. The first is rare in first contributors, and the second requires staff access to anonymized production data. It should be prioritized in the staff bugs process.
Flags: needinfo?(jwhitlock)
Commit pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/d8ad405b2396c89cfaa43208464819c81c94f88a bug 1180144: Use exact matches for keywords For the keyword queries (kumascript_macros, css_classnames, html_attributes) match on the exact value provided, rather than add in a prefix match by default. If a '*' or '?' is included, continue with an exact match without those characters, and a wildcard match with the additional characters. A keyword query of just '*' or '?' is ignored.
Deployed with the Elasticsearch 5.6 update.
Assignee: nobody → jwhitlock
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.