Request: Search Only in Visible Text

Improve quality of searches by excluding comments, macros, etc.

The Problem

Certain searches can return WAY too many results, so many that you can't find what you're looking for. Often this is not because your search terms are bad, but because the search function matches in the raw markup.

A symptom of this might be that you do a search, click on one of the matches to see what it says, and you can't find your search word(s) anywhere on the page (because they are only in the markup and don't make it to HTML).

I could list a bunch of examples, but I hope the issue is obvious. For more info, see UsabilityObservation/SearchingInsideComments.

My assertion is that when people do a search, they want matches on what they'll see when they view the page normally, not what they would see when editing the markup. Only on rare occasions does anyone need to search within comments, directives (acl), and macro names. So it would still be nice to have the ability to search raw markup, but it should not be the norm.

Possible Solutions

Search cached page output

Probably, after the rendered output is cached, strip out all the HTML markup and save this copy for searching. (Or the formatter could be altered to generate them both at the same time.)

Good:

Bad:

Different:

Discussion


CategoryFeatureRequest

MoinMoin: FeatureRequests/SearchOnlyInVisibleText (last edited 2007-10-29 19:10:18 by localhost)