There should be an easy way to exclude underlay pages from searches.

Most of the time, I do not want to match on underlay pages. They are about "how to use MoinMoin", which is not the main theme of my wiki, and should never really be intermixed with search results from my core pages.

Currently, I know of no simple way to do this. I would prefer that underlay pages be excluded from search results by default, unless I enter a special page for "help" or "MoinMoin".

Solutions

Possible solutions (or parts of solutions):

Using a WikiFarm:

Note: you will have to delete the help files each time you upgrade your wiki farm. You can automated this with a simple one line script:

find /path/to/wiki/underlay -name 'Help*' -type d -exec rm -rf "{}" \;

Discussion

I just tried the WikiFarm approach, and you lose many "special" pages, such as RecentChanges and FindPage. It would be nice if those pages could be classed together separately from the other underlay pages...

I think WikiFarm ist a good idea but there should be a config option called "HelpWiki" that changes links to underlay pages so that they link to the "help" wiki...
e.g. a link to RecentChanges becomes [HelpWiki:RecentChanges] -- DanielAlder 2006-10-13 10:25:49

The wiki farm approach was not described correctly: leave the system pages in your underlay directory, but delete all the help pages (all starts with 'Help'). Then add a help wiki with only moin underlay pages.

a hack

If you dont't need the help pages at all you could just delete them from the underlay directory. That's what i did for a website (using moinmoin as cms).
Actually I removed (copied to a backup to be precise) everything except the 'UserPreferences' pages; Result: There's no help or other pages i want ordinary surfers to make my machine to search in.
If other pages from the underlay are needed they should stay where they are, naturally. -- oftl

I think including system pages into a search result should be optional, while they should not be shown as hits by default.—This is like we already handle system pages on TitleIndex. -- MartinBayer 2007-04-15 18:15:40

Further Discussion

   1 2008-12-22T09:40:18  <dreimark> ThomasWaldmann: may be we should make that feature configurable
   2 2008-12-22T10:10:01  <dreimark> http://moinmo.in/ReimarBauer?action=AttachFile&do=view&target=advanced_s.patch
   3 2008-12-22T10:10:06  <CIA-27> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 4220:5ee5b69eefdc 1.8/MoinMoin/macro/ (WikiConfig.py WikiConfigHelp.py): fix Dependencies of WikiConfig/WikiConfigHelp macro
   4 2008-12-22T10:10:37  <dreimark> we could make the default settings of advanced search configurable
   5 2008-12-22T10:10:45  <dreimark> and use it also for the theme
   6 2008-12-22T10:11:55  <ThomasWaldmann> no
   7 2008-12-22T10:11:58  <dreimark> why?
   8 2008-12-22T10:13:05  <ThomasWaldmann> because search should behave the same in every moin wiki
   9 2008-12-22T10:13:32  <TheSheep> it should also behave sanely
  10 2008-12-22T10:14:07  <ThomasWaldmann> yes, but you can't do too much assumptions about what the user wants to search
  11 2008-12-22T10:14:38  <TheSheep> I wish that the underlay pages at least had acls with some default groups (one for utility pages, one for help, one for admin stuff) so that you could control which ones of them should appear in search results
  12 2008-12-22T10:14:39  <dreimark> I think the searchbox in the theme should be used to find own content
  13 2008-12-22T10:15:02  <ThomasWaldmann> like disabling search for underlay or enabling search for history
  14 2008-12-22T10:15:04  <TheSheep> ThomasWaldmann: too many hits is worse than too few
  15 2008-12-22T10:15:14  <dreimark> acls are bad because noone whould read underlay then
  16 2008-12-22T10:15:33  <TheSheep> dreimark: unless here was a 'search' right :)
  17 2008-12-22T10:17:36  <ThomasWaldmann> TheSheep: search acl sounds nice for some cases, but it won't help for system/help pages.
  18 2008-12-22T10:19:53  <dreimark> we should destinguish between search in the wiki of own content and search in underlay/system pages
  19 2008-12-22T10:19:57  <TheSheep> there are many pages you don't really want to be searched
  20 2008-12-22T10:20:02  <TheSheep> groups, templates
  21 2008-12-22T10:20:34  <ThomasWaldmann> and what if you DO want to search them?
  22 2008-12-22T10:20:54  <dreimark> this means only we need a flag or checkbox
  23 2008-12-22T10:21:09  <TheSheep> ThomasWaldmann: then you use the FindPage
  24 2008-12-22T10:21:14  <TheSheep> ThomasWaldmann: and advanced search
  25 2008-12-22T10:21:15  <dreimark> yeah
  26 2008-12-22T10:21:36  <TheSheep> please don't add more controls on every page though ;)
  27 2008-12-22T10:22:02  <dreimark> yeah, I know I wanted to tell the same but you were faster
  28 2008-12-22T10:22:19  <ThomasWaldmann> well, make a feature request page. this is too critical and too complex to do quick hacks.
  29 2008-12-22T10:22:33  <TheSheep> btw, when I use moinmoin as a cms, one thing that I often have to do in custom themes is removing the title search button
  30 2008-12-22T10:22:37  <TheSheep> might be an option
  31 2008-12-22T10:23:08  <ThomasWaldmann> i use title search often as a quick fuzzy goto
  32 2008-12-22T10:23:16  <dreimark> me also
  33 2008-12-22T10:23:27  <TheSheep> yeah, it works for wikis :)
  34 2008-12-22T10:23:39  <TheSheep> I use the location bar for that
  35 2008-12-22T10:23:41  <dreimark> and title:title word
  36 2008-12-22T10:24:19  <ThomasWaldmann> also, i like to prefer title search for performance reasons
  37 2008-12-22T10:24:39  <TheSheep> yes, but that's not an issue for those 8-page cms sites
  38 2008-12-22T10:24:42  <ThomasWaldmann> so the first thing a user should try for finding some stuff on a wiki is a title search
  39 2008-12-22T10:24:44  <TheSheep> not even cms
  40 2008-12-22T10:25:11  <TheSheep> I am aware that it's not what moin is supposed to be used for
  41 2008-12-22T10:27:32  <TheSheep> I think this needs more discussion
  42 2008-12-22T10:27:36  <TheSheep> h2h
  43 2008-12-22T10:27:37  <dreimark> sometimes you know the attachment name but not the page where it is
  44 2008-12-22T10:27:48  <dreimark> so people often use text search


Related Issue: FeatureRequests/SearchModifierUnderlay

CategoryFeatureRequest

MoinMoin: FeatureRequests/ExcludeUnderlayFromSearch (last edited 2008-12-23 21:37:38 by ReimarBauer)