oddmu-search(7)

Name

oddmu-search - understanding the Oddmu search engine

Description

The wiki keeps an index of all the hash tags and page titles in memory. Using hashtags and predicates in your queries speeds them up because fewer files are opened.

A hashtag starts with a number sign ('#') and contains numbers, letters, and the underscore ('_').

Example: #old_school random encounter

The title predicate filters for pages where the term is contained in the page title.

Example: title:geo title:cache zürich

The blog predicate filters for pages where the page name begins with an ISO date like "2023-09-26" if true, or doesn't begin with an ISO date if false.

Example: blog:false fountain

The sorting of all the pages does not depend on the number of matches or any kind of score because computing the score is expensive as this requires the page to be loaded from disk. Therefore, results are sorted by title:

The effect is that first, the pages with matches in the page title are shown, and then all the others. Within these two groups, the most recent blog posts are shown first. This assumes that blog pages start with an ISO date like "2023-09-16".

When searching for a hashtag, a page name (not the title!) matching the hashtag exactly (without the leading '#') is listed first, even if it doesn't contain the hashtag. It is assumed that this page offers some kind of introduction to people searching for the hashtag.

Example: When people click on the hashtag "#Oddµ" and a page named "Oddµ" exists (in other words, the file "Oddµ.md" exists), it is prepended to the results even if it doesn't have the hashtag "#Oddµ" and even if it has a title of "Oddµ, a minimal wiki" (which wouldn't be an exact match).

The score and highlighting of snippets is used to help visitors decide which links to click.

Each document found is scored. Each of the following increases the score by one point:

A document with content "This is a test" when searched with the phrase "this test" therefore gets a score of 8: the entire phrase does not match but each word gets four points.

Environment

To exclude subdirectories from searches, use the ODDMU_FILTER environment variable. Set it to a regular expression matching sub-directories such as "^projects/". If search starts in a directory matching the regular expression, it is limited to the directory tree, as always. However, if search starts in a directory that doesn't match, subdirectories that do match are skipped. See oddmu-filter(7).

oddmu-filter(7)

To prevent access to a private directory tree, you must configure the web server in addition to setting the ODDMU_FILTER environment variable.

See also

oddmu(1), oddmu-search(1), oddmu-filter(7), oddmu-apache(5), oddmu-nginx(5)

oddmu(1)

oddmu-search(1)

oddmu-filter(7)

oddmu-apache(5)

oddmu-nginx(5)

Authors

Maintained by Alex Schroeder alex@gnu.org.

alex@gnu.org