[pmwiki-users] Faster searches and categories

Patrick R. Michaud pmichaud at pobox.com
Mon Sep 12 16:27:51 CDT 2005

On Mon, Sep 12, 2005 at 04:47:17PM -0400, Martin Fick wrote:
> Yes, the shell command line was already filled on my setup,
> thus the use of the environment variable. :)  

The use of the environment variable doesn't eliminate
the shell command line restrictions; in

    F=`...`; grep ... $F

the shell still has to expand and parse $F for the grep command
(and the result has to fit within the command line length).

> With the indexes, what happens if users change wiki pages
> manually on disk, could the results be wrong?  I may be
> taking a leap in assuming that some users expect to be able
> to just drop in files which may overwrite older/newer
> versions of those files.  I think this ability currently
> makes pmwiki elegant and much simpler than other
> alternative wikis, like the ones that use a db to store
> page data.  Might this be an unintended sacrifice?

Changing pages manually on disk is something I wanted to
preserve; the existing implementation only runs into problems
if someone manually replaces an existing page with one that
has different targets.  It works fine if a new page is 
added or removed, or if a page is renamed.  And even when 
the existing page is replaced it's a problem only until the 
next time the page is saved again (at which point the index 
is corrected), or when a pagelist with "link=" to one of the 
old targets is encountered.

In detail, given that SomePage targets "TargetA" and "TargetB",
and an administrator manually replaces SomePage with something
that targets "TargetB" and "TargetC", then

   (:pagelist link=TargetB:)  
       works -- still shows SomePage as linking to TargetB
   (:pagelist link=TargetC:)  
       error -- fails to show SomePage as linking to TargetC
   (:pagelist link=TargetA:)  
       works -- doesn't show SomePage as linking to TargetA, but
       also updates the index
So, the only case in which this fails is if an existing page is 
replaced by a new one, and even then it only fails to show the page
for any new targets -- existing and old targets still display

All in all, it seems like a very small, rare, and edge-case sort
of sacrifice for the performance obtained.


More information about the pmwiki-users mailing list