I have a program that creates pages in new namespaces. How can I have DokuWiki index these new pages? It seems, bin/indexer.php walks through all existing pages in the wiki.
mforkel It seems, bin/indexer.php walks through all existing pages in the wiki.
No. It traverses your data directory and will index new pages as well.
andi It traverses your data directory and will index new pages as well.
That's what I meant. I'm looking for a way to specify which page(s) or namespace(s) to index without revisiting pages already indexed.
Ah I see. A pull request to extend the command line tool to accept a single page argument to (re)index would be welcome.
Workaround from a non-techie: Just have your program not only to create new pages but also to have them edited (Url?do=edit) and saved (do not know how) once by dokuwiki!
Thanks for the suggestion, that gave me an idea! I don't know enough PHP to create a pull request. But I think I should be able to use a Python wrapper for the XML-RPC API. I would hope that creating pages that way will set them up for indexing.
mforkel no. it makes no difference how a page is created. indexing happens independently when the page is viewed in the browser.
Ok, thanks for saving my time, then. So it's not editing or saving a page in the browser (or accessing its contents with wiki.getPage) that triggers the indexing but viewing the page afterwards. Does that mean I could create a page, then "view" it with e.g. curl (or may be wiki.getPageHTML) and it would be indexed? ?
No. The indexing is triggered via the taskrunner. See https://www.dokuwiki.org/taskrunner you could do a curl on that.