From nzskiwi at gmail.com Sat Feb 4 15:00:15 2023 From: nzskiwi at gmail.com (Simon) Date: Sun, 5 Feb 2023 12:00:15 +1300 Subject: [pmwiki-devel] .pageindex Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From 5ko at 5ko.fr Sun Feb 5 01:36:55 2023 From: 5ko at 5ko.fr (Petko Yotov) Date: Sun, 05 Feb 2023 10:36:55 +0100 Subject: [pmwiki-devel] .pageindex In-Reply-To: References: Message-ID: <8a5dc12cceb0646dc5990bfa6491c3f9@5ko.fr> 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