Table of Contents

Search

Search is done through the Search box in top row (when using the default template).

Syntax

You can precede your keywords with + to include a word and - to exclude a word in your query. If you don't use a modifier + is assumed.

You may search for exact phrases by enclosing them with double quotes. And you can do a partial search by adding a *, eg. searching for “wiki” will only find “wiki”, but searching for “*wiki” will also find “DokuWiki”.

You may also restrict the search to namespaces. For example “wiki” @wiki:docs @work:docs will search for “wiki” in namespace wiki:docs and work:docs. …

Quicksearch

You can enter the beginning of a pagename into the search box and wait half a second. In most modern browsers you will automatically get a Popup with matching pagenames.

Some Background on the Searchindex

DokuWiki now uses an index to search even big wikis very fast. To be able to find anything the index needs to be filled with current data. Information about a page's content is added and updated when a page is viewed by a user. Each page includes an invisible image (webbug) which calls the index update process if needed.1) (That is, if the timestamp of the page is newer than the timestamp of the index file.)

The index consists of files called page.idx, w[n].idx and i[n].idx located in the cache directory. w[n].idx contains a list of all words (except stopwords) with a length of n that appear on the wiki pages. For every line in w[n].idx there is a line in the corresponding i[n].idx file that contains page references in the form of pn*freq. pn is a line number for page.idx, freq denotes how often the word appears on the page. Multiple page references are separated with a colon.

The indexer uses a language specific stopword file which contains a list of very common words which will never be indexed (eg. the word the in english). Searching for such a word will not return any hits.

If you upgraded your wiki from an older version without an index, your search won't return anything until the index is built. You can either wait until this happens by browsing your wiki or use the provided commandline script for updating the index.

1) Note that the webbug is used for other tasks, too. See http://forum.dokuwiki.org/post/3116