Tags:
create new tag
view all tags

Question

Hi, I have enabled search from my WebLeftBar with this command:

<form action='%SCRIPTURLPATH{"search"}%/%WEB%/'>
<input class="twikiInputField" type="text" name="search" size="22" />&nbsp;<input type="submit" class="twikiSubmit" value="Search" /> - [[WebSearchAdvanced][advanced search]]
</form>

But it searches only the text body but not the topic titles. I figure that the 'search' script searches the text body but not the topic titles. How can I make it search just the topic titles and not the text body ? (If I want to search the body, I would go to 'advanced search')

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows 2000
Web server: Apache 1.3.39
Perl version: 5.008008 (cygwin)
Client OS: Windows XP
Web Browser: IE 6
Categories: Search

-- ChengappaCB - 24 Aug 2008

Answer

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.

When I have a question on TWiki, this is not the first time that:

  • I try to find the ansfer myself, leaving no stone unturned
  • Post the question at the Support Page
  • I stumble upon the answer ! (This time, I had a look at the code around the 'Search' button on WebHome)

I solved it by replacing the command given abve with:

<form name="pagesearch" action="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/WebSearch"> 
<input type="hidden" name="scope" value="topic" />
*Search page names:* <input type="text" name="search" size="22" class="twikiInputField" />&nbsp;<input type="submit" value="Search" class="twikiSubmit" /> %BR%
[[WebSearchAdvanced][advanced search]]
</form>

This does not modify the search script but achieves the result. Hope this is the right way.

Thanks a lot anyway!

-- ChengappaCB - 25 Aug 2008

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-08-25 - ChengappaCB
 
  • 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.