[dokuwiki] Re: Search Result

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 27 Feb 2008 01:23:30 +0000

On 26 Feb 2008, at 23:21, Todd Augsburger wrote:

Chris, although the index is presently from wikitext, as you say, I tested its behavior with a INDEXER_PAGE_ADD plugin, replacing the default text with text from the rendered page. Seemed to work beautifully, as far as searches went. So I think it's _possible_ to put whatever we want into the index, without significant work. It's more a matter of _what_ should be put there.

I'd at least do a strip_tags() before handing the text off to the indexer.

If you make the search results SE like, display the page summary rather than a context snippet. I'm not sure if that is available in metadata or you will need to use the xhtml_summary renderer (results could already be cached). If you are only doing this for a page (limited number) of results, a worst case of running the xhtml_summary or metadata renderer over 10-20 pages is probably ok. Both of those renderers operate far faster than the xhtml renderer - as long as current instructions are in place. Instructions aren't expired much so they shouldn't be a problem - but don't try search with PURGE=1 or immediately after updating DW ;)

- Chris
DokuWiki mailing list - more info at

Other related posts: