The Search API, the search widget and other DigitalNZ search tools share a powerful search syntax borrowed from the Apache Lucene search engine.
You can test your query syntax using DigitalNZ Search. Note that the results from the DigitalNZ Search interface, may vary slightly from the results returned directly via the API as some material can be blocked from the interface, but still available from API.
The DigitalNZ search system uses Apache Lucene syntax, which is fully described in the Apache Lucene Query Parser Syntax documentation.
Lucene syntax is very powerful, and gives you access to numerous features, including fielded search, boolean operators, Google-style operators, nesting and grouping, proximity operators, wildcards, even fuzzy search.
You can search for text in a specific field by entering field:value in your search string, eg category:Images.
Note that DigitalNZ generates the year, decade and century values based on any date metadata associated with a record.
Date indexed fields can be searched using date range syntax. Fields that can be searched using date range indexing include
The "text" field is the default search field: if you do not specify a field explicitly, the text field will be searched.
The text field contains a copy of all these fields: title, description, category, content_partner, creator, subject, year, placename, and fulltext.
Complex queries can be built up using boolean operators (AND, NOT) and with field searches using field:value syntax.
For example, results for the name 'William' from within the Dictionary of New Zealand Biography website:
For example, last modified records from Flickr: