[pmwiki-devel] .pageindex

2 views
Skip to first unread message

Simon

unread,
Feb 4, 2023, 6:02:08 PM2/4/23
to PmWiki Devel Mailing List
Just ruminating here

Is there documentation available on the .pageindex ?

Can a user recipe add or remove terms in the page index. 
e.g. each time a page is called or updated, or uploads are added or removed to a page, a user recipe recipe removes or updates terms it added last time, and adds terms to the .pageindex

ngā mihi

Simon

Petko Yotov

unread,
Feb 5, 2023, 4:37:42 AM2/5/23
to Simon, PmWiki Devel Mailing List
On 05/02/2023 00:00, Simon wrote:
> Is there documentation available on the .pageindex ?

Here is something from Pm on the mailing list:

https://www.pmwiki.org/pipermail/pmwiki-users/2006-June/029028.html

You can search the mailing list for "pageindex from:pmichaud" here:

https://www.pmwiki.org/search-ml.php?split=v


All this is handled by functions in scripts/pagelist.php, search for
$PageIndexFile.

Basically, when you save a page, wiki.d/.pageindex is updated for that
page.

When someone searches, or there is a pagelist with search terms, or
arguments link= or category=, first .pagelist is scanned, then pages,
and if .pageindex is not up-to-date for some pages, the pages are added
to a queue to be indexed later. The queued pages are indexed in batches
of 10 seconds max.


> Can a user recipe add or remove terms in the page index.
> e.g. each time a page is called or updated, or uploads are added or
> removed to a page, a user recipe recipe removes or updates terms it
> added last time, and adds terms to the .pageindex

Every time a page is saved, .pageindex is updated, this means, the new
attachment file names are added to the .pageindex for that page,
attachments that were removed are also excluded from the .pageindex
entry for the page.

If you edit pages programmatically, or have a recipe action that
modifies a page, I recommend you call the function UpdatePage($pagename,
$page, $new) to save your pages, this way the .pageindex will be updated
automatically (but also ROSPatterns, recent changes, page history, and
all other benefits).

Petko

_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
Reply all
Reply to author
Forward
0 new messages