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: 5 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-02309: TWiki Configuration not saved
SID-02306: GMTIME problem
SID-02303: Need to include twiki code only on button click
SID-02300: PDF's not displayed
SID-02299: Editing a topic. Cursor moves to end of file
SID-02298: Want to know about TWiki and have some queries
SID-02297: Populating data dynamically in forms
SID-02296: Can I change creation date of a user?
SID-02294: Apache AD authentication
SID-02292: Twiki Plugin use
SID-02291: Securing Attachments without twiki.conf?
SID-02290: NeedHelpWithLdap
SID-02286: Access Keys Don't Work (6.0.2)
SID-02285: Need to load twiki page asynchronously
SID-02284: Can't call method "login" on an undefined value at IMAP.pm
SID-02283: No displaying GIF image
SID-02281: Show Attachment Revision

Status Answered:
SID-02310: Rename application doesn't update referring links
SID-02308: Cannot send email with SMTP
SID-02307: Want no auth check for editformfield updates
SID-02305: When purchasing latest twiki on paypal, where is DL Link?
SID-02304: TWiki link problem
SID-02302: Search finds the text in Parent-Topic-Name
SID-02301: how to have a password field in tiwki forms
SID-02295: Get the "Grandparent" of a topic
SID-02293: How do I show the authors of a topic
SID-02289: /var/www/twiki/bin/view fails to execute due to @INC
SID-02288: Can I use my AD account automatically login Twiki?
SID-02287: Activating Banner Produces Code Over Image
SID-02282: Retrieve form data with filed type select+mult

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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.