This page covers the topic of using Wikit's built in search functionality; the page really did not need to mention Tcl'ers Wiki since it is part of the general functionality of a Wikit.
Searching the quick way:
Go to page "2" - the page Search - type a keyword in the edit field and press Enter.
Note that this is a one-level search only and it is a fine art to come up with the right keyword.
But:
Searching and bookmarking is quite flexible in Wikit. To search for the word "cgi" in all page titles, you can use the URL:
http://purl.org/tcl/wiki/cgi
To search for this word in all titles and in the full texts, use:
http://purl.org/tcl/wiki/cgi*
Or, if you prefer, you can enter the search word on the search page, at:
http://purl.org/tcl/wiki/search
But there's a little more to it. That last URL is actually a form of fuzzy bookmarking. There is no web page called "search". Wikit presents its contents as if it were a directory with pages, but it is all smoke and mirrors..
First of all, note that all Wikit pages have a unique identifying number. The "About" page is at http://purl.org/tcl/wiki/1.html , for example. But although these unique IDs are effective for internal links, they are quite awkward as bookmarks, since they convey no information whatsoever about the title or contents of a page.
To offer a more useful way of bookmarking, pages which are not of the form <number>.html are treated as search instructions to locate a page. The following URL is an instruction to look for a page titled "hawaii":
http://purl.org/tcl/wiki/hawaii
Assuming there is a page titled "hawaii" (case is ignored), the above URL will lead directly to that page.
But wikis change. So do page titles, occasionally [even though there is no trival method for doing this]. Some page titles are long and may contain embedded spaces or other inconvenient characters. This all makes the above search mechanism a bit too brittle for long-lasting URLs.
The solution which has been adopted here is to refine the search process as follows (everything after the slash will be called the search term):
Approximate matching - if the search term has upper-case letters, for example "OneTwoThree", it is turned into a match pattern (using the glob / string match syntax). In the example given, a search would be performed on page titles matching the pattern "*[Oo]ne*[Tt]wo*[Tt]hree*"
What's the point of all this? Well... this mechanism allows you to specify URLs pointing into the Tcl'ers Wiki with some quite attractive properties:
For an example, here's a link to Don Libes' book on Expect:
http://purl.org/tcl/wiki/Expect
And here's a search which lists all pages where the word "expect" is used:
http://purl.org/tcl/wiki/expect*
Some searches give more hits than you would like:
http://purl.org/tcl/wiki/Web
And some work out nicely (right now there is a single match):
http://purl.org/tcl/wiki/CGIWeb
But it's not all peaches - the following won't match:
http://purl.org/tcl/wiki/CgiWeb
(reason: the string match is case-sensitive - maybe this can be improved).
Conclusion: the Tcl'ers Wiki has several ways to help you define bookmarks which do not break quickly when the wiki changes (which it will, constantly!)
-- JC
LV: 2000/March 24
How do I express a URL using the fuzzy matching and multiple words ?
Answer: try replacing any white space by %20
RWT: 2000/March 26
I believe that you capitalize the first letter of each word. For instance, this page is http://purl.org/tcl/wiki/SearchingAndBookmarkingURLsOnTheTcl'ersWiki
willdye Nice trick! It seems to work just fine, though apparently one must be careful to also capitalize the first word of such strings. I wish the URL matcher would try to accept titles where spaces have been replaced by dashes or underlines -- e.g. "Searching_and_bookmarking_URLs". Hmm. Maybe I should just implement that myself instead of whining about it..
Wouldn't it be great if the Wiki generated a bookmark URL at the bottom of each page? (Complete with the purl address!) Something like adding Bookmark [L1 ] to the end of the footer at the end of the page. Then you could easily copy the link into news, email, or other web pages
LV 2001/June/19: Do the words become a phrase or are they independantly anded together? And if I stick an * after a series of words like that, is it a search for any (or all?) of these words in a page?
willdye As far as I can tell, a wiki search for "spam and eggs" will treat the search term as a unified phrase, so pages with the string "eggs and also spam" will not match. Whenever I want to search for several words which are on the same page, but not necessarily all together in a single phrase, I just use Google (with "site:wiki.tcl.tk" included with the search terms)
glennj: 2001-06-19
What if I want to search for any wiki pages that contain the words "windows" and "start", but not necessarily the term "windows start"??
2002-08-13
To answer myself, use google:
http://www.google.ca/search?q=windows+start+site%3Awiki.tcl.tk
or add this form onto a web page:
<p>Search the Tcl'ers Wiki: <div align=right> <form method=GET action="http://www.google.ca/search"> <input type=text size="15" name="q" value="search words site:wiki.tcl.tk"><br> <input type=submit> </form></div></p>
sbron: 2006-01-14
You can add the Tcl'ers Wiki to the list of search engines available in Mozilla/Firefox by creating a file called something like wikitcl.src and placing it in the searchplugins directory:
# Mozilla/TCLer's wiki plug-in by Schelte Bron <search name="TCLers wiki" description="The TCLers wiki" method="GET" action="http://wiki.tcl.tk/2" > <input name="Q" user> <interpretsels browserResultType="result" charset = "UTF-8" resultListStart="</p><ul>" resultListEnd="</ul><p>" resultItemStart="<li>" resultItemEnd="</a>" > </search>
Find a nice 16x16 gif image to go along with it, call it wikitcl.gif and place it in the same directory.