>From: Andreas Gohr <andi@xxxxxxxxxxxxxx> > Well snippets need to show context around the searched keywords to be > useful at all so your suggestion doesn't really work. When I searched > for a word which occurs at the end of the page I want to see that part > of the page in the snippet not the first 50 words of the text. Or did I > misunderstand you? Oh, right. I guess the best you could do is cache a pre-stripping of the HTML tags. If you can eliminate the heavy string concatenation and object creation, that would speed things up. But I don't know whether in this case file access time might overshadow string cat'ing/object creation costs. If you're using a single preg or two to remove tags, that probably doesn't involve many intermediate string cats or objects. I know. Pre-cache one snippet for every possible search string. =) ~joe -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist