This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19401 - Upgrade site search
Summary: Upgrade site search
Alias: None
Classification: Unclassified
Component: Search (show other bugs)
Version: unspecified
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: team-webplatform-admin list
QA Contact: public-webplatform-bugs list
: 19351 (view as bug list)
Depends on:
Reported: 2012-10-09 17:39 UTC by Scott Rowe
Modified: 2013-03-14 14:05 UTC (History)
7 users (show)

See Also:

JavaScript snippet for adding search (598 bytes, text/plain)
2012-12-12 20:59 UTC, Dan Wendorf
Sample for custom search box (893 bytes, text/html)
2012-12-12 21:00 UTC, Dan Wendorf

Description Scott Rowe 2012-10-09 17:39:37 UTC
Search with "WebSocket"
Notice that results 2 - 4 are duplicates, as are results 5 - 7
It's much worse under "Page text matches"
Comment 1 James Phillpotts 2012-10-17 10:01:57 UTC
Related to this are the comments on the forums here:
Comment 2 Jonathan Garbee 2012-10-31 21:29:40 UTC

*** This bug has been marked as a duplicate of bug 19351 ***
Comment 3 Alexis Deveria 2012-12-01 00:47:00 UTC
I do not believe this bug is a duplicate of bug 19351, that one refers to the snippet text content that appears in search results, this one refers to the fact that many duplicate results appear for a search.
Comment 4 Jonathan Garbee 2012-12-01 09:17:51 UTC
They both would be fixed by an upgrade to the search function.  I am referencing as See Also between the two.

I think the key to solving this one is having the search read the output of the page source compared to the direct source.
Comment 5 Dan Wendorf 2012-12-12 20:59:59 UTC
Created attachment 1279 [details]
JavaScript snippet for adding search
Comment 6 Dan Wendorf 2012-12-12 21:00:49 UTC
Created attachment 1280 [details]
Sample for custom search box

Copy the behavior of the #searchform form to post to the search page.
Comment 7 Dan Wendorf 2012-12-12 21:14:10 UTC
This solution in my previous two attachments uses the Google Custom Search API to peform the search in-page. The default code snippet includes its own search box, but to have a site-wide search box, replace the current form behavior with that of #searchform in the custom search box sample.

Next steps: This code still needs to be integrated in the actual search page and styles, and the site-wide search box needs to be replaced.

The code snippets in the attachments use a sample Google Custom Search account I have created, but a new account can easily be created at
Comment 8 Dan Wendorf 2012-12-12 22:01:57 UTC
After a further discussion about implementation, we found a pre-made extension for MediaWiki at that may be a simpler way to integrate Custom Search Engine.
Comment 9 Jonathan Garbee 2012-12-13 19:49:40 UTC
*** Bug 19351 has been marked as a duplicate of this bug. ***
Comment 10 Jonathan Garbee 2012-12-13 19:51:18 UTC
I just made this bug report the central location for site search issues.

Also, there are a handful of search extensions that we could use (including one for Google Site Search). has a list of them. We should review a few of them once we have the codez online and see which would be best to use.
Comment 11 Jonathan Garbee 2013-03-14 14:05:32 UTC
New location: