Re: [pmwiki-users] How to force-update the pageindex

2010-08-12 Thread Simon
This then is a timely opportunity to ask people to vote for the resumption
of http://www.pmwiki.org/wiki/PITS/00447  Distinguish !Page and
Category.Page in backlinks

bunp
Simon


On 12 August 2010 19:40, Randy Brown  wrote:

> That explains what happened. Thank you!
>
> Is there a way in PHP to cause all pages to refresh their target attribute?
> Expirdiff iterates through all the pages to purge their history - perhaps I
> can adapt that. Can you suggest an instruction that would trigger a targets
> refresh instead?
>
> BTW, other than this targets-corruption issue, I've found that it's very
> easy to distinguish links that refer to a Category page from links that
> define a page as belonging to a Category:
>
> I simply created a group header for a group called Categorized, and made it
> redirect to the Category group header, like this: (:redirect
> Category.{*$Name} quiet=1:) Thus pages that are categorized using the
> [[!MyCategory]] markup link to the empty "Categorized" group but send the
> user who clicks on the link to the Category group page, where documentation
> of the category can live and where the pagelist looks for
> link={$CategoryGroup}.{*$Name}. It was that easy!
>
> The cool part is: no user-created pages need to be changed if
> categorization was originally done with [[!MyCategory]] markup. Everything
> so far seems to work as usual, except from now on the user can write
> "[[Category.MyCategory]] to refer to the MyCategory page without as a side
> effect categorizing it as belonging to MyCategory.
>
> Randy
>
>
> On Aug 12, 2010, at 1:32 AM, Peter Bowers wrote:
>
> > This is stored in the
> > targets= attribute of each individual page in addition to the
> > .pageindex file.  So by deleting the .pageindex you fixed part of the
> > problem, but each page is going to have to have that targets=
> > attribute updated.
>
>
> ___
> pmwiki-users mailing list
> pmwiki-users@pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



-- 

http://kiwiwiki.co.nz
___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-12 Thread Randy Brown
That explains what happened. Thank you!

Is there a way in PHP to cause all pages to refresh their target attribute? 
Expirdiff iterates through all the pages to purge their history - perhaps I can 
adapt that. Can you suggest an instruction that would trigger a targets refresh 
instead? 

BTW, other than this targets-corruption issue, I've found that it's very easy 
to distinguish links that refer to a Category page from links that define a 
page as belonging to a Category:

I simply created a group header for a group called Categorized, and made it 
redirect to the Category group header, like this: (:redirect Category.{*$Name} 
quiet=1:) Thus pages that are categorized using the [[!MyCategory]] markup link 
to the empty "Categorized" group but send the user who clicks on the link to 
the Category group page, where documentation of the category can live and where 
the pagelist looks for link={$CategoryGroup}.{*$Name}. It was that easy!

The cool part is: no user-created pages need to be changed if categorization 
was originally done with [[!MyCategory]] markup. Everything so far seems to 
work as usual, except from now on the user can write "[[Category.MyCategory]] 
to refer to the MyCategory page without as a side effect categorizing it as 
belonging to MyCategory. 

Randy


On Aug 12, 2010, at 1:32 AM, Peter Bowers wrote:

> This is stored in the
> targets= attribute of each individual page in addition to the
> .pageindex file.  So by deleting the .pageindex you fixed part of the
> problem, but each page is going to have to have that targets=
> attribute updated.


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-11 Thread Peter Bowers
On Thu, Aug 12, 2010 at 2:07 AM, Randy Brown  wrote:
> Having changed the name of my Category group, my pageindex is now hopelessly 
> out of date.
> I thought I could just delete the hidden .pageindex file in my local wiki (I 
> haven't set any special
> $WorkDir, so I think that's the right file) and then it would be 
> automatically re-created.

After reading more carefully (sorry) I see that you are changing your
Category group.  This means that the links to categories (which are
stored with each page) were something like Category.MyCategory and now
are in something like MyNewCatGroup.MyCategory.  This is stored in the
targets= attribute of each individual page in addition to the
.pageindex file.  So by deleting the .pageindex you fixed part of the
problem, but each page is going to have to have that targets=
attribute updated.

If this type of link=X is the source of the erroneous pagelists then I
believe this is the source of your problem.  I'll go ahead and update
the documentation at http://www.pmwiki.org/wiki/PmWiki/Categories, but
if I've missed the boat here then feel free to change my docs back...

-Peter

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-11 Thread Peter Bowers
On Thu, Aug 12, 2010 at 2:07 AM, Randy Brown  wrote:
> I assume I must be deleting the wrong pageindex file, or failing to clear out 
> a cache - but I don't see
> my mistake. Does anyone have any tips on how to force--update the pageindex?

Any possibility you have  $PageListCacheDir set?

Note that .pageindex is updated during the creation of a pagelist as
well as during the page update process.

I confirm that simply deleting the .pageindex file *is* sufficient to
start the rebuild process and under normal circumstances will *not*
result in incorrect results in your pagelists.

What are the specific incorrect results you are getting?  Are pages
being included that shouldn't be included or pages not being included
that should be included?  Are they the pages related to the renamed
group?  If you can give some more details here it may help diagnose...

-Peter

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-11 Thread Randy Brown
Thanks for your quick response, DaveG. Unfortunately, I'm as baffled as ever.

I can understand if, as you suggest, the page index sometimes contains 
incomplete optimization information and as a result pagelists run slower. I 
can't understand, however, why pagelist would ever give incorrect results. 

If the correctness of pagelist results depends on the pageindex being up to 
date, then there needs to be a way to rebuild the page index and to guarantee 
that it is ultimately complete. If that's not feasible, then a warning needs to 
be placed next to the suggestions that you can change the $CategoryGroup, 
advising admins that they will destroy the accuracy of their pagelists in their 
existing wikis if they do so.

More importantly, if page indexing is never guaranteed to be up to date, and 
the correctness of results suffers whenever it isn't, then that needs to be 
stated in the documentation, so wikis where accurate results matter don't 
attempt to use page indexing. 

I'm not sure what's going on with my wiki, but if I set "$EnablePageIndex = 0;" 
my results and the speed of pagelists doesn't change at all. No .pageindex file 
is created, however. I would have expected pagelists to run significantly 
slower and to start giving correct results again. 

Randy

On Aug 11, 2010, at 10:38 PM, DaveG wrote:

> 
> 
> On 8/11/2010 9:46 PM, Randy Brown wrote:
>> I now believe I've managed to delete the old pageindex, but until it's 
>> rebuilt my pagelists are returning incorrect results. Is there any recipe 
>> that traverses all pages and updates each or otherwise rebuilds the 
>> pageindex?
> I was under the impression (and going back to some mail archives confirms) 
> that simply deleting the index and then editing a page would subsequently 
> cause it to be recreated, and that pageindex is not an authoritative source, 
> more used for optimization. So it's possible some things you might expect to 
> see there are not yet/ever populated.


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-11 Thread DaveG



On 8/11/2010 9:46 PM, Randy Brown wrote:

I now believe I've managed to delete the old pageindex, but until it's rebuilt 
my pagelists are returning incorrect results. Is there any recipe that 
traverses all pages and updates each or otherwise rebuilds the pageindex?
I was under the impression (and going back to some mail archives 
confirms) that simply deleting the index and then editing a page would 
subsequently cause it to be recreated, and that pageindex is not an 
authoritative source, more used for optimization. So it's possible some 
things you might expect to see there are not yet/ever populated.


And a quote from Pm:
"We don't want to rebuild the entire .pageindex
every time a page is edited or saved -- it takes way too long
(which is why PmWiki does it incrementally over a number of
searches and/or edits)."

 ~ ~ Dave

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] How to force-update the pageindex

2010-08-11 Thread Randy Brown
I now believe I've managed to delete the old pageindex, but until it's rebuilt 
my pagelists are returning incorrect results. Is there any recipe that 
traverses all pages and updates each or otherwise rebuilds the pageindex?



___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] How to force-update the pageindex

2010-08-11 Thread Randy Brown
Having changed the name of my Category group, my pageindex is now hopelessly 
out of date. I thought I could just delete the hidden .pageindex file in my 
local wiki (I haven't set any special $WorkDir, so I think that's the right 
file) and then it would be automatically re-created.

But that's not what happened. I've tried several things besides deleting the 
.pageindex file: setting EnablePageIndex to 0 and then back to 1, commenting 
out $PageListCacheDir and then putting it back in, stopping and re-starting the 
server in the hope that would clear out the cache, and making global changes 
through WikiSh. Nothing so far has updated the pageindex except my manually 
re-saving each page, one by one. 

I assume I must be deleting the wrong pageindex file, or failing to clear out a 
cache - but I don't see my mistake. Does anyone have any tips on how to 
force--update the pageindex? 

Randy


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users