Using Lucene


This knowledge base uses Lucene for searching articles. The search string is passed to the Lucene query parser pretty much as-is, so any valid Lucene query syntax should be supported.

Available tokens are as follows...

  • title
  • desc
  • category
  • tag
  • slug

All the above are included in wildcard searches (when a token isn't specified). At the time of writing the actual content of the article is not indexed, but might come later if/when the knowledge base grows.

Example Query

An example of a Lucene query that can be used on the knowledge base...

category:"raspberry pi" -category:linux +tag:upgrade

Translated this is broken down as follows...

  • category must have a matching phrase of "raspberry pi"
  • and category must not have a matching term of linux
  • and tag must have a matching term of upgrade

Debug Mode

You can enable or disable "Debug Mode" by searching for debug-on or debug-off.

Alternatively, add or remove debug=true to the querystring of the URL.

Debug mode shows the article tags and also the Lucene "document score" for the query. The higher the number the closer the match basically.


Related Articles

My articles use markdown. This is a test to see how the Markdown to HTML rendering works.

Stuff