create new tag
, view all tags

SID-01302: Search and Categorize

Status: Answered Answered TWiki version: 5.0.2 Perl version:
Category: CategorySearch Server OS: Linux SLES 11 Last update: 4 years ago

I have topics with a formfield 'Category' and I need to do a single search and to display topics under different categories.

For example if I have topics under categories Apples Oranges and I need to display the topics under each category
Topic 1
Topic 3
Topic 4

Is there anyway to achieve something similar with a single search ?

-- RonMascarenhas - 2011-10-23

Discussion and Answer

You can do that by assigning each search hit to a SpreadSheetPlugin variable, using one variable per category.

Here is an example doing a SEARCH on the latest 30 support questions. We keep two spreadsheet variables: StatusAsked containing the list of topics with status "Asked", and StatusAnswered containing the list of topics with status "Answered". We then use the LISTMAP function to iterate over the list to create table rows showing all topics of a category:

Status Asked:
SID-02229: WysiwygPlugin/tml2html Retrieval Error
SID-02228: How to prevent TWiki from serving mixed content
SID-02225: Deleting Users From Twiki
SID-02222: Turkish Characters
SID-02215: Calendar Plugin Enablement
SID-02214: Format issues after lift and shift of Twiki between machines
SID-02211: Perl-codes in html, error
SID-02209: In NuSkin no webnav and user menu shown, however logged in
SID-02208: Could not load installer script
SID-02207: Browser/Edit google chromium bug? (GPL vers chrome)
SID-02203: Connection Timed Out

Status Answered:
SID-02231: When save I receive that ERROR!
SID-02230: How can I set image to box title
SID-02227: Skype/chat integration with Twiki?
SID-02226: Expanded boxes
SID-02224: There has been a problem adding your user id to the Password
SID-02223: Spreadsheet Plugin - LIST2HASH Empty List Entries
SID-02221: Can't start Twiki today
SID-02220: Twiki work to slow when have box in the page
SID-02219: Check the configuration for TemplateDir and TemplatePath?
SID-02218: SpreadSheetPlugin CALCULATE variable not rendered
SID-02217: Need help setting up an alternate topic view
SID-02216: Automatic conversion of a specific word into a link.
SID-02213: Searching for author/user
SID-02212: Is it possible to set an referenced table?
SID-02210: Using VarCache with Include - Or Alternate Best Practice
SID-02206: Delay a search until search criteria selected
SID-02205: When Editing post i receive ERROR message in regex;
SID-02204: new TWiki installation have not icons
SID-02202: INCLUDE with a character limit

View the raw topic for details.

-- PeterThoeny - 2011-10-24

Thanks Peter that solution suits me fine.

However just for my information , is there any way to generate the list, not knowing beforehand what the categories would be. For example there may be many categories or maybe the categories keep increasing and I don't want to have to edit the search every time.

-- RonMascarenhas - 2011-10-24

You could simply do a SEARCH and sort by the category, such as with order="formfield(Category)". Details in VarSEARCH.

-- PeterThoeny - 2011-10-25

-- RonMascarenhas - 2011-11-18

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Status Answered
Title Search and Categorize
SupportCategory CategorySearch
TWiki version 5.0.2
Server OS Linux SLES 11
Web server apache2
Perl version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2011-11-18 - RonMascarenhas
  • 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-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.