In spirit of this Pull Request, a better search/indexing mechanism could beimplemented with:
having boost factors for standard DokuWiki syntax
allow syntax plugins control what gets added to the index
allow syntax plugins add boost
be based on it's own renderer
allow to search for syntax as an option
display search snippets without syntax (unless above option was used)
More talk about this can be found at this mailing list post and its replies.