This module provides a Lua interface to PrefixIndex. It contains a single function, prefixIndex, which returns an array of titles with a given prefix. It is meant to be used from other Lua modules, and cannot be used from #invoke.
This module disables caching for pages it is used on, so it should not be deployed on widely used modules or on any pages with heavy traffic to avoid causing undue stress on the servers.
If there are more than 200 matches for a given prefix, this module will only return the first 200. This is due to constraints built into the PrefixIndex interface.
Syntax
Usage
First, load the module.
Then you can use the function to return an array of pages. For example, to get all pages prefixed with User:Example, use this:
It is possible to specify a second argument, subpagesOnly. Set this to true to limit the search to subpages only.
Setting subpagesOnly to true is equivalent to adding "/" to the end of your prefix.