Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Force Re index

Bruno Meilick edited this page Apr 18, 2020 · 2 revisions

Automatic Indexing

The AutoID Plugin will crawl the site()->index() if there are no entries in the AutoID-Index yet.

It does not actually use the site()->index() to avoid crashing if the operation of building the Site-Index would take more than 30 seconds (usual php script timeout). Instead it will use a custom logic that will try for a maximum of 20 seconds (see Settings below) and then postpone further indexing to the next webpage reload. It will continue indexing but skip known Pages until all Pages and Files have been indexed. But unless you have a very slow webserver or 1500+ pages it will usually finish in a single run.

Flush

To remove all entries from the AutoID-Index you can call the following line anywhere within your code (Controller, Template, Snippet,...)

\Bnomei\AutoID::flush();

Force Re-Index

Calling the next line will force the site()->index() to be crawled again. It will not remove any entries from the AutoID-Index (a SQLite file in the plugins cache folder) just add new entries.

\Bnomei\AutoID::index(true);

You could also use the Janitor Plugin job called reindexAutoID and trigger the re-index from a button in the panel or CLI.

Settings

bnomei.autoid. Default Description
index.timeout 20 maximum duration in seconds for indexing per page refresh unless a forced index is performed
Clone this wiki locally