00758: searching predefined sections of pages

Summary: searching predefined sections of pages
Created: 2006-06-14 12:36
Status: Open
Category: Feature
From: Pico
Assigned:
Priority: 3
Version:
OS:

Description: Is there a way to restrict searches to defined portions of pages?

Clearly pagelist templates can be used to return a defined portion of pages: the faq template uses an include that is delimited by the faq achors contained in pages to limit the displayed results to the portions of pages defined by the faq anchors.

What is unclear, however, is whether a search can be restricted to examining a defined portion of pages, so that the results will be restricted to pages where the search terms are contained within the defined portion. Or stated differently, the results will exclude pages where the search term appears in the page, but not in the defined portion of the page.

In a thread discussing WikiTerms-Proposal, the issue was raised in this exchange, but it was not clearly resolved.

Example: The following searchbox uses the faqs template (and DocumentationIndex trail), and supplies a default search term "macIntosh" that should return only one page: AccessKeys

Search and Show FAQs, order by name
(:searchbox trail=PmWiki.DocumentationIndex fmt=#includefaq order=name value='Macintosh':)

Search and Show FAQs, order by name

Note: The search term "Macintosh" does not appear in the defined faq portion of the page displayed above; it appears elsewhere in the page (second paragraph).