Tags:
create new tag
view all tags

SID-02213: Searching for author/user

Status: Answered Answered TWiki version: 6.0.2 Perl version: v5.10.1
Category: CategorySearch Server OS: CentOS 6.7 kernel 2.6.32 Last update: 9 years ago

I'm trying to make a table to output search results and created a topic WebSearch containing:

%INCLUDE{"%TWIKIWEB%.%TOPIC%"}%

and I get this nice box which will search for attachments and list the user, date and so on. I'd like to know how to limit the search output to a single user. Any help?

-- John Huber - 2016-06-16

Discussion and Answer

Sorry: It was WebSearchAttachments I made from the one on this wiki. -pat

-- John Huber - 2016-06-16

If you want to limit the WebSearchAttachments query to a particular user you need to clone TWiki.WebSearchAttachments in your TWiki and customize the search result.

Look for this:

  $SETLIST(
    afNames,
    $LISTIF(
      $SEARCH(
        %GET{af}%,
        $LOWER($item)
      ),
      $GETLIST(attNames)
    )
  )

And change it to this untested example (using "JohnHuber" as the user) :

  $SETLIST(
    afNames,
    $LISTIF(
      $AND(
        $EXACT(
          $GETHASH(attUsers, $item),
          JohnHuber
        ),
        $SEARCH(
          %GET{af}%,
          $LOWER($item)
        )
      ),
      $GETLIST(attNames)
    )
  )
-- Peter Thoeny - 2016-06-24

      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.
SupportForm
Status Answered
Title Searching for author/user
SupportCategory CategorySearch
TWiki version 6.0.2
Server OS CentOS 6.7 kernel 2.6.32
Web server Apache 2.2
Perl version v5.10.1
Browser & version Chrome 50
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2016-06-24 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.