[pmwiki-users] How to be sure pageindex is being used for pagelists (using debug messages ?)
Petko Yotov
5ko at 5ko.fr
Sat Jan 9 01:26:27 CST 2016
On 2016-01-09 00:05, ABClf wrote:
> For new year first question, I would like to know how to be sure
> .pageindex is used for creating pages. Do informations given by
> $EnableDiag help ?
For creating pages? .pageindex is used (scanned) when a pagelist or a
visitor searches for terms or link targets in the wiki pages. When
searching, you will see something like:
16: 00.17 00.16 PageListTermsTargets begin count=1038
17: 00.17 00.16 PageIndexGrep begin
18: 00.28 00.27 PageIndexGrep end
19: 00.96 00.94 PageListTermsTargets end count=222
The "PageIndexGrep" lines indicate that .pageindex was used.
> (For example : does this page
> http://www.pmwiki.org/wiki/Test/PagelistExample use pageindex or no ?)
No, this page does not use .pageindex because the pagelist does not need
to search for terms or link targets.
Moreover, we use $PageListCacheDir so the whole list of pages from the
pagelist will be saved once and as long as the cache is not obsolete, it
will use the cache without scanning the pages or .pageindex.
If you wonder if .pagelist is updated with the terms and targets of a
newly created or a modified page, the answer is yes. To see it in the
diagnostic output, disable redirects ($EnableRedirect=0;) then when you
save a page, you will see these two lines:
30: 00.38 00.35 UpdatePage: PostPageIndex (Test.WikiSandbox)
31: 00.38 00.35 PageIndexQueueUpdate: queued 1 pages (1 total)
try it here: http://www.pmwiki.org/wiki/Test/WikiSandbox (you can delete
and recreate this page if you want).
---
Change log : http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes : http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade : http://www.pmwiki.org/wiki/PmWiki/Upgrades
More information about the pmwiki-users
mailing list