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)
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.
Reporter | ||
Updated•9 years ago
|
Component: General → Wiki pages
Comment 1•9 years ago
|
||
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
Comment 2•9 years ago
|
||
(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.
Reporter | ||
Comment 3•9 years ago
|
||
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
Reporter | ||
Comment 4•8 years ago
|
||
(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)
Assignee | ||
Comment 5•8 years ago
|
||
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)
Comment 6•6 years ago
|
||
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.
Assignee | ||
Comment 7•6 years ago
|
||
Deployed with the Elasticsearch 5.6 update.
Assignee: nobody → jwhitlock
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•