This is a quick fix (workaroun) for the search function of www.freebsd.org. It
add the correct duckduckgo "site:" parameters for the freebsd.org sites we want
to search for the keyword.
Details
- Reviewers
bcr allanjude - Group Reviewers
docs - Commits
- rD54076: www.FreeBSD.org: fix search box
cd en_US.ISO8859-1/htdocs; make
open index.html and try to search some keywords
Diff Detail
- Repository
- rD FreeBSD doc repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Tested the search function a little more, using the keyword: "ls", only put "site: www.freebsd.org" has more useful result than passing the whole list. I'm not sure if this is a good move, but it's probably better than the current status and we can improve it in the next rounds.
Changes in rD54076 were wrong because listing the domain names with "site:" does not work correctly. I think the correct fix is removing the whitespaces between "site:" and the domain names and using OR keyword to group the domain names like this:
<div id="search" xmlns="http://www.w3.org/1999/xhtml"> <form method="get" id="search-form" action="https://duckduckgo.com/" - onsubmit="document.getElementById('words').value+=' site: www.FreeBSD.org site: docs.FreeBSD.org site: lists.FreeBSD.org site: wiki.FreeBSD.org site: forums.FreeBSD.org'"> + onsubmit="document.getElementById('words').value+=' ( site:www.FreeBSD.org OR site:docs.FreeBSD.org OR site:lists.FreeBSD.org OR site:wiki.FreeBSD.org OR site:forums.FreeBSD.org )'"> <h2 class="blockhide"><label for="words">&header2.word.search;</label></h2>
I am curious if the current version actually showed correct results. Multiple " site:" keywords cannot be used without OR operator because no operator between the two keywords means "AND" and two "site:" keywords never make sense at the same time. I could reproduce only broken results which include keyword by the user, "site" literally, or index pages of the listed domain names with no search keyword. I believe this was because "site:" and the listed names are interpret as normal keywords, not as operators. Please let me know if someone can get a reasonable result.
Any comments from reviewers of this change? The current search box is still broken as far as I can check. Does it work for you?