Search Query Syntax

The NZOR Web API uses the Lucene search engine internally for performing searches. This provides a rich query language through its query parser which can transform a given search string into a powerful Lucene query.

Overview

The query syntax for Lucene is defined in detail at lucene.apache.org.

Terms

A query can consist of both terms and operators. There are two types of terms: single terms and phrases which are groups of words surrounded by double quotes. Operators are used to form more complex queries by combining terms together with boolean operators.

Fuzzy Searches

Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a single word term.

For example to search for a term similar in spelling to "lichen" use the fuzzy search:

lichen~