[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Demo of Sputnik with LuaUsers content
- From: Petite Abeille <petite.abeille@...>
- Date: Sun, 24 Feb 2008 13:47:58 +0100
On Feb 24, 2008, at 1:03 PM, Leo Razoumov wrote:
I would argue that anything that can be done in pure PHP can be done
in
Lua.
I would second that! :)
Please, if you have time, take a look on PmWiki search syntax
http://pmwiki.org/wiki/Site/Search
Are you familiar with PmWiki's internal implementation? Looking at
pmwiki-2.2.0-beta65 scripts directory, there is no obvious 'search'
module. Would you know by any chance where/how is the search
implemented?
Nanoki itself, in addition to various navigation mechanisms, provides
title search. The search is implemented as a trie:
http://en.wikipedia.org/wiki/Trie
http://dev.alt.textdrive.com/browser/HTTP/Trie.lua
http://dev.alt.textdrive.com/browser/HTTP/WikiSearch.lua
For example, looking for 'mac'...
http://svr225.stepx.com:3388/search?q=mac
feed://svr225.stepx.com:3388/search.xml?q=mac
... would yield thinks like 'Automated Teller Machine', 'Enigma
Machine', 'Nicobar Long Tailed Macaque', etc...
While such mechanism could be extended to cover the page content as
well, most wiki do not have enough content to make it worthwhile. And
if they do, they would be better off using a proper text search engine
library such as Lucene, Xapian or such. Or rely on an external search
engine such as Google or Yahoo.
My own preference would be for a Lua implementation/binding of/to
Lucene. But that would be a rather involved project :)
Cheers,
PA.