[Pmwiki-users] Re: Pmwiki search enhancement

Radu Cornea ccradu
Fri Sep 17 15:48:16 CDT 2004


On Fri, 17 Sep 2004, Patrick R. Michaud wrote:

> On Fri, Sep 17, 2004 at 01:47:57PM -0700, Radu Cornea wrote:
>>
>> Hi,
>>
>> Is it possible to enhance the pmwiki search to show some text snippets
>> along with each search results (a few words would be enough), like for
>> example Google does?
>> I find it more difficult to find something once the number of pages in
>> wiki is large, because the search page only lists the page name. So having
>> the surrounding text (maybe with the search words highlighted) would help
>> a lot. I have no idea if this is easy to implement though...
>
> It's not terribly easy to implement.  One of the challenges is knowing
> what to snippet -- especially when there are multiple search terms involved
> or when a search term appears multiple places in a document.
>
> If someone can tell me how the system should choose what to snippet, I
> can see about adding it to the search function...
>

What about the way google does it (i.e. print the surrounding text, 
separated by '...' in case of multiple words; for terms appearing 
multiple times, I think google just shows the first two or so).

For example, for the search terms "pmwiki php" and the text below:

--
PmWiki is a WikiWikiWeb clone developed by PatrickMichaud in the PHP 
scripting language. PmWiki has been primarily designed as a tool to 
support easy, collaborative authoring and maintenance of web sites. PmWiki 
is distributed under the General Public License (GPL).
--

It could print:

"_PmWiki_ is a WikiWikiWeb clone ... in the _PHP_
scripting language... _PmWiki_ has been primarily designed ..."

or even shorter (_word_ means a highlighted word).


Regards,

-- 
Radu




More information about the pmwiki-users mailing list