Tags:
create new tag
view all tags
There has been a need for SEARCH functionality that just returns the number of hits, without any text or the actual search result, just the number. This is useful for feeding into the SpreadSheetPlugin or the GaugePlugin. The following solutions have been devised:

  1. DaveAlsup has provided the QuickSearchPlugin, which has the "totalonly" parameter. However, this plugin does not incorporate the newest SEARCH feature (AND search using semicolon(;)).
  2. Locally hacking the search.tmpl file, removing the "Number of topics: " string. A formatted SEARCH using a format string of " " (note the space) will do it. This is ugly.
  3. Enhancing the SEARCH variable with something alike QUICKSEARCH's "totalonly"

Maybe the last option is the way to go?

plaintotal="on" could remove the text in front of the actual number, without conflicting with other SEARCH parameters.

See also: QuickSearchDev, QuickSearchPlugin, QuickSearchPluginDev, SearchEnhancmentsRFC

-- StefanSteuerwald - 05 Jun 2002

Just for the sake of completeness, another option is to switch the TWiki search to use a search engine (like Namazu) instead of the current grep based search before making any significant changes in functionality -- see SearchEngineVsGrepSearch

-- RandyKramer - 05 Jun 2002

I'm not sure about when the SEARCH results get rendered in relation to when the various callbacks in the plugins are called, but perhaps if all of the SEARCH is rendered before the plugins execute, then you could just have a one-liner plugin that could take out the text from the standard search total and just leave the number? Even if this doesn't work can somebody let me know what is the exact order of functions called during the whole page rendering process?

-- DavidSachitano - 11 Jul 2002

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2002-07-11 - DavidSachitano
 
  • 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-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.