DokuWiki

It's better when it's simple

使用者工具

網站工具


zh-tw:search

搜尋

經由右上角(若使用預設樣板)的搜尋框來進行搜尋作業。

語法

在輸入的關鍵詞之前加上+,代表要包含這個詞;若加上-,代表不要包含這個詞。若沒有加任何符號,會認定為+

若要做精確搜尋,請在關鍵詞前後加上雙引號。你也可以使用萬用字元*。例如,用”wiki“來搜尋,就只會找到”wiki“,若用”*wiki“來搜尋,就還可以找到”Dokuwiki“。

你可也以把搜尋範圍限制在某些分類名稱中。例如:“wiki” @wiki:docs @work:docs 將只在wiki:docs和work:docs兩個分類名稱中搜尋“wiki”

快速搜尋

你可以在搜尋框中輸入某頁面的開始部份,等待數秒。大部份的瀏覽器會自動彈出視窗顯示符合搜尋條件的頁面。

關於搜尋索引的兩三事

Dokuwiki目前使用一搜尋索引來進行搜尋作業,即使在大型wiki系統中搜尋仍然很有效率。為了找到東西,在索引中必須填入當下的資料。當使用者在瀏覽頁面時,頁面內容增加、更新的資訊都會填入。每個頁面包含一張看不到的印象(image)(webbug),它在必要時要求索引進行更新。1) (也就是說,如果頁面的時間戳記比索引還要新的時候,就會更新)。

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)
請注意,webug也可用在其他作業,請參考 http://forum.dokuwiki.org/post/3116
zh-tw/search.txt · 上一次變更: 2013-01-06 20:26 由 IchirouUchiki

若無特別註明,本 wiki 上的內容都是採用以下授權方式: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki