mozilla/kuma — pull request #1653 by lmorchard (2013-11-13 20:11:29+00:00)
Title: bug 926316: Advanced search queries for kumascript, CSS, and attributes

This PR requires a reindex of documents for search. But, once done, you should be able to manually add these query params onto a /search URL:

* `locale=*` - to match documents in all locales, not just the current locale
* `kumascript_macros=ifsummary` - to find pages that contain the `{{IFSummary}}` macro.
* `css_classnames=livesample` - to find pages that use the `livesample` CSS class name.
* `html_attributes=href%3D%22https%3A%2F%2Fwww.mozilla.org` - to find pages with links pointing to pages at mozilla.org

That last example shows some need for a form or front-end UI, if only because it's hard to URL-encode. But, I'd like to iterate a bit and see what makes sense, since these searches are meant for "power users"

And of course, for power users, you can change `search` to `search.json` in the URL to get JSON data. One thing this PR adds to the JSON output is an `edit_url` key to each result, since there was demand to easily offer edit buttons from search result lists in KumaScript