Tags:
create new tag
, view all tags

SID-02302: Search finds the text in Parent-Topic-Name

Status: Answered Answered TWiki version: 6.0.0 Perl version: v5.10.0
Category: CategorySearch Server OS: Suse Linux Enterprise Server 11 SP1 Last update: 8 months ago

I have following situation

In my Web "ServicePortfolioManagement" I have a Topic "ServicePortfolioManagement" which is the parent for "ApplikationsListe" which is parent for "PanDa405" which ist parent for some topics starting with the Name "SpmSchnittstelle" (i.E. SpmSchnittstelleGeschaeftspartnerreplikation SpmSchnittstellePanda001Replikation SpmSchnittstellePanda005StadaktionAnfrageFambeih, etc.)

The content of the topics starting with "SpmSchnittstelle" consists of the Name of another Applikation who uses this "SpmSchnittstelle"

With a %SEARCH I want to find all topics starting with "SpmSchnittstelle" and the content of the text contains i.e. "!PanDa405".

%SEARCH{"PanDa405" topic="SpmSchnittstelle*" format="   *  $topic" scope="text" type="literal"}%

Now the problem is, that the search-result contains topics where the text I'm looking for (PanDa405) is NOT located in the body of the topic, but as PARENT-Topicname.

But I want only the topics, where the search-pattern is located in the body-text.

I tried it - if I remove the parent-topic from a topic "SpmSchnittstelle", it is no longer found by the search.

-- Peter Starek - 2017-02-27

Discussion and Answer

Yeah, that's a side effect of literal searches being based on a plain grep which isn't too sensitive about metadata.

As ever so often, the QuerySearch comes to the rescue. Compare those two searches:

%SEARCH{"PanDa405"        topic="SpmSchnittstelle*" format="   *  $topic" scope="text" type="literal"}%
%SEARCH{"text~'PanDa405'" topic="SpmSchnittstelle*" format="   *  $topic" scope="text" type="query"}%

The second stanza is a query search, asking "does the text match 'PanDa405'". Query search is a bit of a learning curve, but provides an excellent fine tuning of what is being searched.

-- Harald Jörg - 2017-03-02

Many Thanks - a little correction does the right thing "text~'*PanDa405*'" -- the asterisks around PanDa405 are necessary

-- Peter Starek - 2017-03-03

Thanks for the correction! In my attempt to create a simple test case I've created a Topic where the text contained nothing but PanDa405. I've failed the "Everything should be made as simple as possible, but not simpler" test smile

-- Harald Jörg - 2017-03-04

      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 Search finds the text in Parent-Topic-Name
SupportCategory CategorySearch
TWiki version 6.0.0
Server OS Suse Linux Enterprise Server 11 SP1
Web server Apache httpd 2.2.10
Perl version v5.10.0
Browser & version Firefox 49.0.1
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2017-03-04 - HaraldJoerg
 
  • 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.