create new tag
, view all tags
Note: the enhancements listed below are not incorporated into this TWiki (yet) so if you try them here they won't work. They should be available to developers shortly (if not already) in the TWiki CVS repository at SourceForge. The required diffs were sent across the Codev mailing list on 07 May 2000; if you haven't subscribed you might want to do so... smile

The inline SEARCH has been extended to partially fulfill the requirements in the SearchEnhancements FeatureEnhancementRequest. The syntax for the extensions is outlined below. Your suggestions for usability enhancements are requested._
%SEARCH{"searchstr" opts }%
Inline search, shows a search result embedded in a topic. Parameter is composed of the search string, followed by optional name="value" pairs:
Pair: Description: Default:
web=nameliststr Specify Wiki web(s) to search
The list of webs is a quote enclosed string of words separated by whitespace. The single word all will search all allowed webs.
(See notes.)
Current web
scope="topic" | "text" Search for searchstr in topic names (titles) or in the body (text) of the topic. Topic text (body)
order= "topic" | "date" | "editby" Order the results of the search on the topic names, date of last edit, or last editor. Topic name
limit="all" | digitstr Limit the number of results returned. All results
regex="on" RegularExpression search Literal search
reverse="on" Reverse the direction of the search. Ascending search
casesensitive="on" Case sensitive search Ignore case
nosummary="on" Show topic title only Show topic summary
nosearch="on" Suppress search string Show search string
nototal="on" Do not show number of topics found Show number
%SEARCH{".*" web="Main Know" scope="topic" reverse="on" order="date" regex="on" limit="5"}%
Lists the last five changes from latest to earliest in both the Main and Know webs.

  • Notes:
    1. The 'all' webs selector will probably be changed to '*'.
    2. A web may set a    NOSEARCHALL=on    TWikiVariable in its WebPreferences topic to be ignored by 'all' searches. The syntax is no longer so finicky, it is now a little more forgiving than standard variable syntax. This is probably a misfeature. The modified search routines read the WebPreferences topics directly because of the way TWiki is currently set to get meta info for a web.
    3. All search result tables display a color-coded head string showing the web the on which the search was done, even single web searches. This is nice, but there is currently no way to turn it off, which is a bug. But, we may claim it's a feature.
    4. Webs for which there were zero matches are listed in the results. This may be a misfeature, but see/don't-see zero match webs should perhaps be Yet Another Option.
      Added new page for this - SearchShowsWebsWithZeroMatches - MartinWatt 15 Sep 2002
    5. The options are enhanced for form-based searches as well, a form can now pass any of the search options.
    6. The options are set for all webs in the webs string. Setting them on a per-web basis would be ridiculous, anyway. What this means is that all the options are the same for all the webs searched by any single %SEARCH... tag.

-- KevinKinnell - 07 May 2000

Advanced Search Form

  • Search: Search the TWiki
Sort by:  
Search Webs:
Result count
make search Case sensitive RegularExpression search reversed sort
don't show search string summaries total matches

-- KevinKinnell - 05 Jun 2000

Good, bad or ugly?

Kevin, it looks very good. Suggestions:

  • web option:
    • I suggest to allow value "all" or "on" (better "*" or "on" ?) for searching all webs. The idea is that you could create an alternate search form that does not show a list of webs to search, but rather a "search all webs" check box.
      I've been implementing this in the search forms with just a value tag (see above.) We can make it whatever we want in the code, but we do have a lot of flexibility in the HTML, too. kk -- 05 Jun
      PTh: Added web="on" (besides web="all" ) to search all webs. -- PeterThoeny - 19 Aug 2000

  • order option:
    • For a future implementation it would be nice to add sort by topic creation time, e.g. time of revision r1.1. This is an important step towards ThreadedDiscussions. For now I suggest to change "date" to "modified" , so that at a later time we will have
      order "topic" | "created" | "modified" | "editby"
      Argh. I forgot to change date to modified when I debugged. I'll get it next time. kk - 05 Jun
      PTh: Changed order="date" to order="modified" -- PeterThoeny - 19 Aug 2000

-- PeterThoeny - 09 May 2000

It would be very helpful for big Wikis if we:

  • add a way to use multiple words (I know, with RegularExpressions it's easy, but ...
  • ... add also a way to exclude words in the search (e.g., by prefixing with a "-")

With grep it's only matter of using the "-v" option and splitting of the searchstring.

-- AndreaSterbini - 25 Aug 2000

Follow up in SearchEnhancementsWithAndOr.

-- PeterThoeny - 29 Aug 2000

Also see SearchEnhancements, OrderBySearchOption, SearchAllTWikiWebs, SearchEngineVsGrepSearch, GoIsSearch
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2002-09-15 - MartinWatt
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.