Skip to content.
|Networking government in New Zealand.
You are here: Home » Services » newzealand.govt.nz » Portal search specification » 1 Portal search specification

1 Portal search specification

1.1 Purpose of this document

This specification catalogues the searches available on the Portal, describing where they may be launched from, how the request is processed, and how the results are displayed.

The specification does not describe:

  • how media releases are sourced

  • what government web pages are indexed, and how the indexing works

1.2 Search Servlet & Midgard

The Portal has two main services that it uses to handle searches. One is a Search Servlet (hereafter referred to as 'the Servlet'), the other a content management system product named Midgard. There is also some content retrieved from the old NZGO database.

The Servlet provides an XML interface for the Portal front-end code to select from a menu of searches. The Servlet executes some of these searches by using the Autonomy search engine, to search indexes created from:

  • a Portal-specific domain of government and related web sites

  • the Microsoft SQL Server database known as Metalogue, containing NZGLS metadata

The Servlet executes its remaining services using direct SQL queries against the Metalogue database.

This specification describes what Servlet searches are requested, what parameters are passed to them and what is used from the result set. The Servlet searches themselves are described in a separate document, the 'Search Interface Specification'.

1.3 Universe of data for query

All Metalogue data returned by the Servlet will be from records with a status of 'Public'.

1.4 User searches

This section describes the search objects directly accessible to users of the Portal. Each search is described in 3 sections, as follows:

Presentation - search entry

Describes where the search can be launched from and how it's launched

Processing Logic

Describes how the user request is processed, including all invocations of the Servlet. Note that the elements shown under 'Required Results' are the subset of those elements returned by a Servlet search that will actually be used by the Portal.

Presentation - results

Describes how the results of the user search are displayed, and includes annotated screenshots

The User Searches are:

  • Home page

  • Services (Services by Topic)

  • Things to know when...

  • A-Z govt contacts (A-Z Government)

  • A-Z govt services (A-Z of services)

  • About New Zealand

  • Participate (Participate in Government)

  • Media Releases (News)

  • Services for Māori (Māori)

  • Text Search (Search)

  • Advanced Search Template (Advanced Search)

  • Single Service/Document Display

  • Agency Display

1.4.1 Home page

1.4.1.1 Presentation - search entry

The Home Page may be accessed from any part of the Portal, using the 'Home' link on the top navigation bar. It does not activate any Servlet searches, but the News links are altered editorially on a frequent basis.

1.4.1.2 Processing logic

When the 'Home' link is clicked, the Home page is retrieved from Midgard. News items are retrieved from Midgard by firstly retrieving all Midgard titles and identifying those with a certain keyword, then performing a further search to retrieve the content associated with those titles.

1.4.1.3 Presentation - results

Screen shot of a page of the government portal.

Home page screen elements key

Screen Element

Link Destination or Data Origin

Notes

T1a

Links to 'About This Site' page, English version, in Midgard

T1b

Links to 'About This Site' page, Māori version, in Midgard

T2a

Links to 'Contact Us' page, English version, in Midgard

T2b

Links to 'Contact Us' page, Māori version, in Midgard

T3

Links to the top level of the Services By Services by Topic hierarchy

see Services search

T4

Links to the A-Z Government Contacts search

T5

Links to the top level of the Things To Know When hierarchy

T6

Links to the Services search associated with the Māori node of the Services by Services by Topic hierarchy

T7

Links to the Participate search

T8

Links to the About New Zealand search

T9a

T9b

Links to the Media Releases page in Midgard

see Media Releases search

T10a

T10b

Links to the Privacy page in Midgard

T11a

T11b

Links to the Copyright page in Midgard

R1

Titles and content of those Midgard news items that contain a specific keyword

Titles are displayed as links

T12

Links to the Media Releases Item Request search (to retrieve a single news item)

T13

Links to the Text search using the contents of the search box

T14

Links to the Advanced Search Template

See Advanced Search Template search

1.4.2 Services By Topic

1.4.2.1 Presentation - search entry

A Services By Topic search is labelled on the Portal as 'Services'. It retrieves services aggregated under the topic heading selected by the user.

A Services By Topic search is a pre-defined search usually launched from a node on the Portal Services By Services by Topic hierarchy, the top page of which is reached via the Services link on the Portal home page. The hierarchy is pre-compiled from the NZPG CVL Import File (refer SSC document 262748, 'How to make changes to the Portal Topic hierarchy'), with one page for each hierarchy node, referenced with a naming convention based on the node path and name. There is also a 'no context' page that is used when the search is launched from an A-Z of Services page, where only the node name is passed (no node path).

1.4.2.2 Processing Logic

When a node link is clicked, the system retrieves either:

  • the web page that corresponds to the node path and name or,

  • if no path is provided, a 'no context' page, which doesn't display any topic hierarchy details.

Except for the top level of the hierarchy, each node also performs the following search:

Search used

Targeted

Options

nil

Values Passed

NZGLS.Subject.NZPG = <node name>

Required results

  • NZGLS.Title (nb. if multiple values, only needs to return first value)
  • NZGLS.Description
  • CreatorTitle
  • CreatorParent
  • NZGLS.Identifier[URN]

1.4.2.3 Presentation - results

Screen shot of a page of the government portal.

Service By Topics 1 - screen elements key

Screen Element

Link Destination or Data Origin

Notes

T1

Links to A-Z Services search (a different way of viewing the same data)

R1

Displays the top level of a hierarchy of links pre-compiled from the NZPG CVL Import File.

refer SSC document 262748, 'How to make changes to the Portal Topic hierarchy'

T2

Each link retrieves the web page that corresponds to a specific node of the hierarchy, and also launches a Services search for services where NZGLS.Subject.NZPG = <node name>

Screen shot of a page of the government portal.

Screen shot of a page of the government portal.

Services By Topic 2 and Services by Topics no context - screen elements key.
Note: The elements on 'Services by Topics no context' are a subset of those that appear on 'Services by Topics 2'.

Screen Element

Link Destination or Data Origin

Notes

R1

Breadcrumb reflecting the position of the current page in the Services By Topic hierarchy

Each node name, other than the current one, is displayed as a link.

Not present on 'no context' screen.

T1

Each link is to the node page in the Services by Topic hierarchy that corresponds to the link's name. In addition to displaying the static page, it also launches a Services search for services where NZGLS.Subject.NZPG = <node name>

Not present on 'no context' screen.

R2

Name of the current node in the Services by Topic hierarchy

T2

Links to a Text search, passing a string consisting of the words in the node name separated by ANDs, eg. if the node name is <Maritime licences & permits>, then the search string will be <Maritime AND licences AND permits>

R3

Display of the next 2 levels of the Services by Topic hierarchy beneath the current node, derived from map created at code installation time using a Search Servlet Topic Map search

Each node name is displayed as a link

Not present on 'no context' screen.

R4

NZGLS.Title (if multiple values, first value is used)

NZGLS.Identifier[URN]

Display Title as a link, using Identifier

T3

Links to Single Service/Document Display, passing Identifier

R5

CreatorTitle

R6

CreatorParent (if one exists)

R7

NZGLS.Description

Display first 255 characters only

The Service items are to be grouped by Creator Title.

1.4.3 A-Z Services

1.4.3.1 Presentation - search entry

An A-Z Services search is in reality an A-Z Service Topics search. We have used the 'A-Z Services' title because that is how it is labelled on the Portal.

The A-Z Services search is a pre-defined search launched either by:

  • clicking on the A-Z Services link on the Services hierarchy top page, or

  • clicking on a letter link in the A-Z Services alphabetic navigation bar

1.4.3.2 Processing Logic

Each alphabetic link results in a query of a locally held mysql database, which has been pre-populated from the NZPG CVL Import file (using a Topic Map search). This is the same information that is used to generate the Services By Topic pages (see 1.4.2.1).

If the search is launched from the Services hierarchy top page, then the letter 'a' is selected by default.

1.4.3.3 Presentation - results

Screen shot of a page of the government portal.

Services A - Z - screen elements key

Screen Element

Link Destination or Data Origin

Notes

<label n>

eg. Links to 'About This Site' page, English version, in Midgard

NZGLS.Type

eg. see Services search

display rules

T1

Link to Services By Topic search

R1

Letter searched upon by user that resulted in the current page being displayed. Initial default letter is 'A'

Display current letter as text, all other letters as active links

T2

Each letter links to A-Z Services search for Topics starting with that letter

R2

All Services by Topic hierarchy node names that begin with the selected letter

Display as a link to a Services By Topic search for the corresponding Topic node

T3

Each link is to the Services by Topics search, passing the node name for a search for services where NZGLS.Subject.NZPG = <node name>.

As a node may appear in more than position in the hierarchy, there can be no certainty about which context (the 'node path') the user is interested in when selecting a node from an A-Z listing. Therefore, no node path is passed to the Services by Topic search, which will consequently display the 'no context' page when presenting the results.

1.4.4 Things to Know When (TTKW)

Note: This section is expected to change in a release scheduled for Jan/Feb 2003. Layout details have not been finalised.

1.4.4.1 Presentation - search entry

A Things To Know When search is a pre-defined search launched from a node on the Portal Things To Know When (TTKW) hierarchy, or from a Things To Know When link elsewhere on the Portal (home page and top navigation bar). The hierarchy is pre-compiled from the NZPF CVL Import File (refer SSC document 262748, 'How to make changes to the Portal Topic hierarchy'), with one page for each bottom-level hierarchy node, referenced with a naming convention based on the node path and name.

Each TTKW bottom-level entry (node) consists of one NZGLS.Audience:NZPF term to be searched for.

1.4.4.2 Processing Logic

When a node link is clicked, the web page that corresponds to the node path and name is retrieved. If a bottom-level entry was clicked, the following search is also performed:

Search used

Targeted

Options

nil

Values Passed

  • NZGLS.Audience.NZPF = <full qualified node name, i.e. Things to know when:Individual:topic:sub-topic>
  • NZGLS.Type='Service'

Required results

  • NZGLS.Title (nb. if multiple values, only needs to return first value)
  • NZGLS.Description
  • CreatorTitle
  • CreatorParent
  • NZGLS.Identifier[URN]

1.4.4.3 Presentation - results

Note: This section is expected to change in a release scheduled for Jan/Feb 2003. Layout details have not been finalised.

Screen shot of a page of the government portal.

Things To Know When hierarchy page - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

The TTKW hierarchy beneath the current node, pre-compiled from the NZPF CVL Import File.

refer SSC document 262748, 'How to make changes to the Portal Topic hierarchy'. Display non-bottom-level nodes as headings, with their child (bottom-level) nodes listed below them

R2

Bottom-level nodes

Display as links

T1

Each link is to the Things To Know When search, passing a bottom-level node path and name, so that a bottom-level results page will display.

Screen shot of a page of the government portal.

Things To Know When bottom-level results - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Breadcrumb reflecting the position of the current page in the TTKW hierarchy.

Only the top two levels are enabled as links.

T1

Each link is to the node page in the TTKW hierarchy that corresponds to the link's name.

R2

NZGLS.Title (if multiple values, first value is used)

NZGLS.Identifier[URN]

Display Title as a link, using Identifier

T2

Links to Service/Document Display, passing Identifier

R3

CreatorTitle

R4

CreatorParent (if one exists)

1.4.5 A-Z government contacts - 'By name'

1.4.5.1 Presentation - search entry

An A-Z Government contacts search can be obtained either by:

  • clicking on the A-Z government links on the home page or the Portal navigation bar, or

  • clicking on a letter link in the A-Z government 'By name' alphabetic navigation bar

1.4.5.2 Processing logic

When an alphabetic link is clicked, the corresponding web page is retrieved with that letter's link de-activated. Searches from the home page or Portal navigation bar are treated as searches on the letter 'A'. The following search is also performed:

Search used

Agency List Search

Options

n/a

Values Passed

  • NZGLS.Title:<first letter of any value> = <the selected letter>

Required results

  • NZGLS.Title matched on (may be an alternative title; if more than one matched on, return a record for each)
  • NZGLS.Title official title
  • CreatorTitle
  • NZGLS.Identifier[URN]

1.4.5.3 Presentation - results

Screen shot of a page of the government portal.

A-Z Government Contacts - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Letter searched upon by user that resulted in the current page being displayed. Initial default letter is 'A'

T1

Each letter links to an A-Z Govt contacts search for Agency Titles (including alternate titles)

R2

NZGLS.Title matched on (may be an alternative title)

NZGLS.Identifier[URN]

Not yet implemented:

Follow the title with:

  • the official title (when displaying an alternative title, ie. when Title and Official Title differ)

  • the CreatorTitle (where one exists)

Examples:

Ministry of Social Development

MSD (Ministry of Social Development)

WINZ (Work and Income, Ministry of Social Development)

Logic: 1. If primary title is not being used, display Official Title in brackets

2. If CreatorTitle value is present, display in brackets (after OfficialTitle if #1. is true)

Display Title as a link, using Identifier

T2

Links to an Agency Display request

1.4.6 About New Zealand

1.4.6.1 Presentation - search entry

The About New Zealand search is a pre-defined search launched by clicking on the About New Zealand link on either the home page or the Portal navigation bar.

1.4.6.2 Processing Logic

Launching the search retrieves the About New Zealand page, which contains a number of static links to Midgard content, and also executes the following search:

Search used

Targeted

Options

nil

Values Passed

  • NZGLS.Audience.NZPF = 'About New Zealand'*
  • NZGLS.Type='Service'

Required results

  • NZGLS.Title (nb. if multiple values, only needs to return first value)
  • NZGLS.Description
  • CreatorTitle
  • CreatorParent
  • NZGLS.Identifier[URN]

1.4.6.3 Presentation - results

Screen shot of a page of the government portal.

About New Zealand - screen elements key

Screen Element

Link Destination or Data Origin

Notes

T1

Links to an About New Zealand item in Midgard, associated with the sub-heading that the link is grouped under

R1

NZGLS.Title (if multiple values, first value is used)

NZGLS.Identifier[URN]

Display Title as a link, using Identifier

T2

Links to Single Service/Document Display, passing Identifier

R2

CreatorTitle

CreatorParent (if one exists)

R3

NZGLS.Description

Display only first 255 characters

1.4.7 Participate

1.4.7.1 Presentation - search entry

The Participate search is a pre-defined search launched by clicking on the Participate link on either the home page or the Portal navigation bar.

1.4.7.2 Processing Logic

Launching the search retrieves the Participate page, which contains static links to NZGO content (eg. Currently Consulting On), and also executes the following search:

Search used

Targeted

Options

nil

Values Passed

  • NZGLS.Audience.NZPF = 'Participate'*
  • NZGLS.Type='Service'

Required results

  • NZGLS.Title (nb. if multiple values, only needs to return first value)
  • NZGLS.Description
  • CreatorTitle
  • CreatorParent
  • NZGLS.Identifier[URN]

1.4.7.3 Presentation - results

Screen shot of a page of the government portal.

Participate - screen elements key

Screen Element

Link Destination or Data Origin

Notes

T1

Links to the 'Currently Consulting On' page in Midgard

R1

NZGLS.Title (if multiple values, first value is used)

NZGLS.Identifier[URN]

Display Title as a link, using Identifier

T2

Links to Single Service/Document Display, passing Identifier

R2

CreatorTitle

CreatorParent (if one exists)

R3

NZGLS.Description

Display only first 255 characters

1.4.8 Participate: Currently Consulting On

1.4.8.1 Presentation - search entry

The Participate: Currently Consulting On search is a pre-defined search launched by clicking on the Currently Consulting On link on the Participate page.

1.4.8.2 Processing Logic

Launching the search retrieves the Participate: Currently Consulting On page from Midgard, which dynamically retrieves all NZGO content marked for this page.

1.4.8.3 Presentation - results

Screen shot of a page of the government portal.

Screen shot of a page of the government portal.

Participate: Currently Consulting On - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Title and text of NZGO 'Currently Consulting On' item

Display Title as a link to the NZGO item

T1

Link to 'Currently Consulting On Item Request' search

T2

Link to top of 'Currently Consulting On' Archive date hierarchy

1.4.9 Currently Consulting On Item Request

1.4.9.1 Presentation - search entry

The Currently Consulting On Item search is a pre-defined search launched by clicking on a link on the Participate: Currently Consulting On page.

1.4.9.2 Processing Logic

Launching the search retrieves the specific NZGO item linked to.

1.4.9.3 Presentation - results

Screen shot of a page of the government portal.

Currently Consulting On Item Request - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Title, date, text and agency-supplied URL from NZGO 'Currently Consulting On' item

T1

Link to relevant location within Agency website

T2

Link to top of 'Currently Consulting On' Archive date hierarchy

1.4.10Media Releases (News)

1.4.10.1 Presentation - search entry

The Media Releases search is a pre-defined search launched by clicking on a link on the bottom navigation bar.

1.4.10.2 Processing Logic

Launching the search retrieves the News page from Midgard, which dynamically retrieves all NZGO content marked as 'News In Brief'.

1.4.10.3 Presentation - results

Screen shot of a page of the government portal.

Media releases - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Title and text of NZGO 'News In Brief' item

Display Title as a link to the NZGO item

T1

Link to 'Media Release Item Request' search

1.4.11 Media Releases (News) Item Request

1.4.11.1 Presentation - search entry

The Currently Consulting On Item search is a pre-defined search launched by clicking on a link under the News heading on the home page, or a link on the Media Releases page.

1.4.11.2 Processing Logic

Launching the search retrieves the specific NZGO item linked to.

1.4.11.3 Presentation - results

Screen shot of a page of the government portal.

Media Releases Item Request - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Title, date, text and agency-supplied URL from NZGO 'News In Brief' item

T1

Link to relevant location within Agency website

T2

Link to top of 'News' Archive date hierarchy

1.4.12 Services for Māori

The Home Page search, 'Māori', links directly to the 'Māori' node in the Services by Topic hierarchy.

1.4.13 Text Search (User-defined search)

The 'Text Search' is the basic free-text search capability available via a search box on every page of the Portal, and also via the Advanced Search template on the Advanced Search page.

The Text Search enables users to perform searches using both free text and logical operators, against an index created from key data elements in Metalogue, and an index created from spidering of government web pages.

For the purposes of this specification, we use the following categorisations:

Logical operators

AND, OR, AND NOT, NOT, +, -

Grouping operators

' ' " " ( )

1.4.13.1 Presentation - search entry

The search box is included on all Portal pages. Users type their search terms and operators into the box, and either press the 'Go' button or the <Enter> key

1.4.13.2 Processing Logic

Supported operators are:

  1. Logical AND, OR, NOT, +, -

  2. Quotes and double quotes, to indicate a phrase, ie. 'phrase' and "phrase" (a phrase consists of one or more words to be treated as a single unit)

  3. Parentheses

Important Note: Thesaurus, Simple and Spidered Searches use the Search Servlet, which in turn uses Autonomy to search the relevant indexes. Autonomy searches with stemming on, eg. a search on 'training' will also find matches on 'trains', 'train', 'trained' etc. Autonomy stemming appears to be algorithmic rather than dictionary-based, so is not 100% etymologically correct and complete in its matching.

Transform Advanced Search Into A Basic Search

Screen shot of a page of the government portal.

If the text search was launched from the Advanced Search template, process the template fields as follows:

with all of the words

  • replace single quotes with double quotes
  • unless contained within quotes:
    • remove logical operators
    • remove parentheses
  • join words and phrases with "AND" operators
  • add to initial search string

with the exact phrase

  • replace single quotes with double quotes
  • quote any text not already quoted
  • join each phrase to the initial search string with an AND

with at least one of the words

  • replace single quotes with double quotes
  • remove logical operators unless quoted
  • remove parentheses if unbalanced
  • join words and phrases with OR operators
  • enclose contents of field in parentheses
  • append to the initial search string with an AND operator

without the words

  • replace single quotes with double quotes
  • remove logical operators and parentheses unless quoted
  • precede each word and phrase with an AND NOT operator
  • add to initial search string

Process Initial Search String

Standardise operators as follows:

Replace

with

+

AND

- (must abut the right-hand term, i.e. no space between '- 'and the term that follows)

AND NOT

NOT

AND NOT

''

""

Remove and save stop words (using Autonomy short list), except:

  • where they are used in phrases

  • where they are logical operators.

Remove punctuation except for grouping operators (quote marks and parentheses).

Ensure each word and phrase is separated by a logical operator, by inserting an AND where an operator is not already present.

Count the number of words excluding operators, until 10 are reached. Remove all subsequent operators and words, and set a flag to warn the user that their search has been truncated. If the 10th word is part of an unfinished quoted phrase, treat it as if it were the last word of the phrase, and close the quotation.

Perform Thesaurus Lookups

Note: A Word-by-Word Thesaurus Lookup is always invoked using the OneForOneMatch option. It is therefore possible that a single word query that has no matches on a Word-by-Word lookup, will have matches on a Full Query lookup. For example, a query on 'endangered' will not have a match using Word-by-Word, but will match 'endangered species' when using Full Query lookup, which does not have the OneForOneMatch restriction.

Thesaurus terms are stored and retrieved as 'relationship pairs', ie. a pair of terms and the thesaurual relationship between them. The types of thesaurus relationship used by the Portal are:

Name

Meaning

Example

NT

has Narrower Term of

'Animals NT Dogs', signifies Animals has a narrower term of Dogs

BT

has Broader Term of

'Dogs BT Animals', signifies Dogs has a broader term of Animals

RT

has Related Term of

'Animals RT Animal Breeding', signifies Animals has a related term of Animal Breeding

USE

has a Use (Preferred) term of

'Dole USE Unemployment Benefit' signifies Unemployment Benefit is the preferred term for Dole

USE FOR

use instead of (in preference to)

'Unemployment Benefit UF Dole' signifies Unemployment Benefit is used in preference to Dole

Control Logic for Thesaurus lookups

IF processed Search String > 1 word
	IF no OR operators and no AND NOT operators
		Perform a Full Query Thesaurus Lookup
	ENDIF
	IF no results from Full Query Thesaurus Lookup
		Perform Word-by-Word Thesaurus Lookup
	ENDIF
ENDIF
IF processed Search String = 1 word
Perform Word-by-Word Thesaurus Lookup
IF no results from Word-by-Word Thesaurus Lookup
		Perform a Full Query Thesaurus Lookup
ENDIF
ENDIF

Full Query Thesaurus Lookup

Use the Search Servlet to perform the following search:

Search used

Thesaurus

Options

SearchPreferredTerms

Search FONZ & SONZ thesauri

Values Passed

<full processed search string>

Required results

  1. All term-relationship-term pairs from FONZ & SONZ thesauri, where the first term matches the query (nb. 'stemmed' matches are deemed to be matches).
  2. SearchPreferredTerms: For any term-USE-term relationships found from the first search, find all BT/RT/NT relationship pairs belonging to the USE (Preferred) term

If any USE terms are found, enclose the processed search string in brackets, place quote marks around each USE term, and append the quoted USE terms to the search string using OR operators. Save the USE/BT/NT/RT terms for subsequent display.

Nb. For all relationship pairs other than term-UF-term, the first term is always a USE term, eg. <Aluminium-BT-Metals>, Aluminium is a USE term.

Word-by-Word Query Thesaurus Lookup

Use the Search Servlet to perform the following search for each individual word in the processed search string except NOT terms and quoted terms, stopping when either 6 searches have been performed, or 4 searches have returned positive (non-null) results (note: the numbers 6 (note: the numbers 6 & 4 can be altered via a config file):

Search used

Thesaurus

Options

SearchPreferredTerms

OneForOneMatch

Search FONZ & SONZ thesauri

Values Passed

<single word>

Required results

  1. All term-relationship-term pairs from FONZ & SONZ thesauri, where the first term matches the query (nb. 'stemmed' matches are deemed to be matches), and the first term consists of only one word (OneForOneMatch).
  2. SearchPreferredTerms: For any term-USE-term relationships found from the first search, find all BT/RT/NT relationship pairs belonging to the USE (Preferred) term

Where a term-UF-term pair is found, take the second term (the USE term) and create a bracketed OR expression with the search string term, eg.

search string is <liquor AND licensing>

USE words are <alcohol> AND <registering>

new string is <liquor OR alcohol> AND <licensing OR registering>

Save the USE/BT/NT/RT terms for subsequent display.

Perform Simple Search

Use the Search Servlet to perform the following search three times, varying Type on each search as shown.

Search used

Simple

Options

MaxResults=5
GetTotal
Type=	'Service' (first search)
		'Agency' (second search)
		'Document' (third search)

Values Passed

Search Term=<processed search string>

Required results

Count of total number of records matching query (not limited by MaxRecords). This feature is not working correctly at time of publication.

For each metadata record where the query matches on the union of Title, Description, Function, Subject, Audience, return:

  • NZGLS.Title
  • NZGLS.Description
  • NZGLS.Type.category
  • NZGLS.Identifier[URN]
  • CreatorTitle
  • CreatorParent
  • Relevance Rank

Return matches in Relevance Rank descending order, as many as are found, up to the maximum specified in Max Results

Relevance ranking should be adjusted so that the following order normally occurs:

  1. query matches on Title, without needing the other elements
  2. query matches on the union of Function and Subject, without needing the other elements
  3. query matches on the union of Title, Description, Function, Subject, Audience

As of December 2002, this ordering has not been implemented.

Perform Spidered Search

Use the Search Servlet to perform the following search.

Search used

Spidered

Options

MaxResults=5

GetTotal

Values Passed

Search Term=<processed search string>

Required results

Count of total number of records matching query (not limited by MaxRecords). This feature is not working correctly at time of publication.

For each spider record where the query matches, return:

  • Title
  • URL
  • Summary
  • Description
  • Relevance Rank

Return matches in Relevance Rank descending order, as many as are found, up to the maximum specified in Max Results

The Spidered text elements will be populated as shown, in descending order of preference, according to availability:

<element>

Details

Title

  1. DC.Title
  2. Title
  3. DRETitle (Autonomy)

URL

The URL link to the spidered document

Summary

  1. A thematic summary of the document
  2. A text extract showing the context of the query terms within the document (similar to Google)
  3. The first genuine paragraph of the document, ie. bypassing headings and table of contents.

Description

  1. DC.Description
  2. Description

1.4.13.3 Presentation - results

Screen shot of a page of the government portal.

 

Screen shot of a page of the government portal.

 

Screen shot of a page of the government portal.

 

Text Search initial page - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

The words and search operators entered by the user to launch this search.

If the search was launched using the Advanced Search template, it will have been transformed into a standard Text Search string, as described in the 'Transform Advanced Search Into A Basic Search' subsection

Punctuation, other than recognised search operators, entered in the original search string, will be discarded.

T1

Launches a search using the contents of the search box

T2

Links to a static Midgard page of search tips

T3

Links to the Advanced Search template, passing the string that follows, 'Results for your search on:'

R3

USE, BT, NT and RT terms retrieved from Thesaurus searches.

The following is a simplified summary of the display rules:

More Specific

SONZ USE terms that apply to the entire search string.

NTs (both SONZ & FONZ)

Limit to 24 words

More General

SONZ USE term when only one is found and it applies to an individual word in the search

SONZ BTs

Limit to 12 words

See Also

SONZ USE terms not displayed in either of the above categories

SONZ RTs

Limit to 12 words

 

Each term is displayed as a link.

Not all terms are displayed - most FONZ terms are not.

Display the word or phrase without quote marks, but quote in the anchor link, ie. the search will execute with the phrase quoted.

The full display rules may be found in Appendix A - Display Rules for Thesaurus Terms.

T4

Links to another Text Search, passing the term displayed in the link, enclosed in quotes.

T5

Links to the corresponding results heading on the same page

R5

For each of the Services, Organisations (Agencies) and Documents categories:

  • Count of total number of records in that category matching the Simple Search query (not limited by MaxRecords)
  • For each hit returned by the query:
    • NZGLS.Title
    • NZGLS.Description
    • NZGLS.Type.category
    • NZGLS.Identifier[URN]
    • CreatorTitle
    • CreatorParent
    • Relevance Rank

For Web Pages category:

  • Count of total number of records matching query (not limited by MaxRecords)
  • For each spider record where the query matches, return:
    • Title
    • URL
    • Summary
    • Description (first 255 characters)
    • Relevance Rank

For each category, a maximum of 5 results are retrieved on an initial search, and a maximum of 100 on a continuation search.

Each result item is displayed in a subsection, according to the following criteria:

Criteria

Place in this subsection
NZGLS.Type = 'Agency' Government services
NZGLS.Type = 'Service' Government organisations
NZGLS.Type = 'Document' Relevant documents
Full text result Government Web Pages

 

 

On an initial search, if the total record count for a category > 5, display a 'See more' link for that category.

Within each category, display the items in descending relevance-ranked order.

Display only first 255 characters of Description.

R6

NZGLS.Title (if multiple values, first value is used)

NZGLS.Identifier[URN] (for Services, Agencies and Documents)

URL value (for web pages)

Display Title as a link, using either Identifier or web page URL value

T6

Links to Single Service/Document Display, passing Identifier

Applies to Services, Agencies and Documents - not web pages.

Note that in the case of Documents, if the Document is available online (has a value in NZGLS.Identifier[URI]), the Single Service/Document Display search will automatically re-direct the user to the document's web address.

R7

CreatorTitle

CreatorParent (if one exists)

R8

NZGLS.Description

Display first 255 characters only

T7

Links to another Text Search, passing the string that follows, 'Results for your search on:'; and with the following variations to the usual search:

  • MaxResults = 100
  • Only search for results of the type related to the link, viz

 

See more...

only perform...
Government services Simple Search for NZGLS.Type = 'Service'
Government organisations Simple Search for NZGLS.Type = 'Agency'
Relevant documents Simple Search for NZGLS.Type = 'Document'
Government Web Pages Spidered Search
  • Display results using the continuation page format shown in the screenshots for this search

T8

This has the same initial behaviour of T6, ie. links to a Service/Document Display, but if the document's metadata shows that it is available online, the Single Service/Document Display will automatically and transparently re-direct the user to the document's web page.

R9

The web page's Title, as returned by the Spidered Search from the Spidered Text index. The value of this element in the index may be either

  1. DC.Title
  2. Title
  3. DRETitle (Autonomy)

The web page's URL, as returned by the Spidered Search from the Spidered Text index.

See 'Perform Spidered Search' for more details of how the index element value is derived.

Display the Title as a link, using the URL.

T9

A standard web link

R10

The web page's Summary, as returned by the Spidered Search from the Spidered Text index. The value of this element in the index may be either:

  1. A thematic summary of the document
  2. A text extract showing the context of the query terms within the document (similar to Google)
  3. The first genuine paragraph of the document, ie. bypassing headings and table of contents.

Display the first n characters

R11

The web page's URL, as returned by the Spidered Search from the Spidered Text index.

Display as a link

Screen shot of a page of the government portal.

Text Search continuation page - screen elements key

Screen Element

Link Destination or Data Origin

Notes

T1

Effectively re-executes the initial search by linking to Text Search and passing the string shown after, 'Results for your search on:'

R1

The type of Search Continuation being requested, ie. Service, Organisation (Agency), Document or Web Page (Spidered), determines which of the 4 links shall be disabled

T2

Links to a continuation page, exactly the same way as a See More link would from the Text Search initial page (see Text Search initial page screen elements - T7)

R2

Results are only for the category for which continuation was requested, ie. Service, Organisation (Agency), Document or Web Page (Spidered). The hits are retrieved in descending order of relevance, until all matches have been found or the threshold set by the MaxResults value is reached.

The hits are displayed in descending relevance-ranked order.

1.4.14 Advanced Search Template

1.4.14.1 Presentation - search entry

The Advanced Search template is obtained by clicking the Advanced Search link, available under the Search box on every page of the Portal.

1.4.14.2 Processing Logic

If the template generator was launched from anywhere except a Text Search results page, no search string processing is required. The Advanced Search page is presented with the template fields unpopulated.

If the search was launched from a Text Search results page (including a continuation page), then the search string that yielded the results is to be used to populate the template fields, as follows:

  1. Ignore brackets when evaluating expressions, but do copy them

  2. Treat + as AND

  3. Treat -<term> as NOT <term>; note that there is no gap between <-> and <term>

  4. NOT or AND NOT word, or NOT/AND NOT quoted phrase - move into 'without these words' box, retaining quote marks if present

  5. ORed words and ORed quoted phrases - copy to 'with at least one of the words'

  6. Quoted text (single or double quotes) - move into Exact phrase box - if there's more than one quoted phrase, then retain quotes around each phrase

  7. ANDed words - copy to 'with all of the words'

So for example:

         rural scenic "tourist flat" "big spa pool" rental OR hire NOT budget -cheap -"ugly decor"       
will translate to:
with all the words                  rural scenic 
with the exact phrase               "tourist flat" "big spa pool"
with at least one of the words      rental hire
without the words                   budget cheap "ugly decor"

The objective is to construct a templated search that, when executed, will return exactly the same results as the original untemplated search.

1.4.14.3 Presentation - results

Screen shot of a page of the government portal.

Advanced Search Template - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

If the Advanced Search was launched from a Text Search results page, then the search terms are carried across and used to populate these fields, as described in the Processing Logic above.

Otherwise, these fields are empty.

T1

Launches a Text Search, passing the terms entered in the template fields. The Text Search processing logic transforms the contents of these fields into a standard Text Search string, as described in the 'Transform Advanced Search Into A Basic Search' subsection.

1.4.15 Single Service/Document Display (information for a specific Service or Document)

1.4.15.1 Presentation - search entry

A Single Service/Document Display always results from a user clicking on a link in a Results List presentation, where the link contains an NZGLS.Identifier value. The Results List could have been generated either by a Services search, or a Text Search.

1.4.15.2 Processing Logic

When a link to Single Service/Document Display is clicked, the following search is performed:

Search used

Single Record Search

Options

nil

Values Passed

  • NZGLS.Identifier = <value in link>

Required results

  • NZGLS.Type.category
  • CreatorTitle
  • CreatorParent
  • NZGLS.Title
  • NZGLS.Description
  • NZGLS.Rights
  • NZGLS.Relation.Requires
  • NZGLS.Relation:ispartof.NZGLS-SN (for Documents, to find related Services)
  • NZGLS.Identifier
  • NZGLS.Type.aggregation (to determine whether it's a Generic Service)
  • NZGLS.Availability:Contact (multiple values, normally phone, sometimes fax and/or website, others possible)
  • NZGLS.Availability:Hours
  • NZGLS.Availability:Email
  • NZGLS.Availability:Address (multiple values, most commonly physical and postal)

Based on the results from the above search, the next action is chosen as follows:

If...

Then...

NZGLS.Type.category = 'Service'

Get Services and Documents with an 'isPartOf' relationship to this Service (see below)

NZGLS.Type.category = 'Document'

AND

NZGLS.Identifier[URI] present

Re-direct automatically through to the address provided in the URI, ie. take the user directly to the document on the agency website

Get Services and Documents with an 'isPartOf' relationship to this Service

Search used

Targeted Search

Options

ExtendedFormat

Values Passed

  • NZGLS.Relation:ispartof.NZGLS-SN=,URN from first search>

Required results

  • NZGLS.Type.category
  • NZGLS.Title
  • NZGLS.Identifier[URN]
  • NZGLS.Identifier[URI]
  • NZGLS.Format.medium
  • NZGLS.Format.extent

Get Services which this document 'isPartOf' (see below)

Search used

Targeted Search

Options

Values Passed

  • NZGLS.Identifier[URN]=<NZGLS.Relation:ispartof.NZGLS-SN values from first search>
  • NZGLS.Type.category='Service'

Required results

  • NZGLS.Title
  • NZGLS.Identifier[URN]

1.4.15.3 Presentation - results

Screen shot of a page of the government portal.

Single Service/DocumentDisplay - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

NZGLS.Title (if multiple values, first value is used)

R2

CreatorTitle

R3

CreatorParent (if one exists)

R4

NZGLS.Description

R5

NZGLS.Rights

R6

NZGLS.Relation.Requires

R7

For related documents or services (see Processing Logic):

  • NZGLS.Title
  • NZGLS.Identifier

Display Title as a link, using Identifier[URI] is present, else Identifier[URN]

T1

If a Service or offline Document (anchor link is a URN), then links to Single Service/Document Display, passing Identifier.

If an online Document (anchor link is a URI), then links to the document on the agency website.

R8

For related documents or services:

  • NZGLS.Type.category
  • NZGLS.Identifier[URN]
  • NZGLS.Identifier[URI]
  • NZGLS.Format.medium
  • NZGLS.Format.extent

If Type(category) = <Service>, display the text <(service)>

If Type(category) = <Document> and no NZGLS.Identifier[URI] value present, display the text <(Offline resource)>

If Type(category) = <Document> and NZGLS.Identifier[URI] value present, display

  • file descriptor text, derived from NZGLS.Format.Medium ('Web Page' for html, filetype, eg. PDF file, for others)
  • file size, derived from NZGLS.Format.Extent

R9

Use this screen element when the record being displayed is NOT a generic service record, ie. at least one of the following is true:

- NZGLS.Type.category - 'Service'

- NZGLS.Type.aggregation - 'collection'

If the record is a generic service, then use the templates in 'Appendix B - Single Service/Document Display for Generic Services' instead.

From the requested record:

'Name:'	NZGLS.Availability:corporateName
'Telephone:'	NZGLS.Availability:Contact=(phone)
'Fax:' 		NZGLS.Availability:Contact=(fax)
'Face to face:' 	NZGLS.Availability:Address=(physical)
'Hours:'	NZGLS.Availability:Hours
'Email:'	NZGLS.Availability:Email
'Post':		NZGLS.Availability:Address=(post)
'Website:' 	NZGLS.Availability:Contact=(website)

The display logic for this data is identical to that used in Agency Display Request.

There may be repeated groups of Availability data. The start of a new group is recognisable by the appearance of a corporateName element. A new group is visually separated on the screen from the previous group.

Some Availability elements may contain text (such as 'Contact your nearest ACC branch office') followed by a URL. Where a combination of text and URL exists, display the text and link it to the URL.

1.4.16 Agency Display request

1.4.16.1 Presentation - search entry

An Agency Display request always results from a user clicking on a hyperlinked item in a Results List presentation, where the link contains an NZGLS.Identifier value. The Results List could have been generated either by an A-Z Government search, or a Text Search.

Note that the Portal currently does not handle generic agencies (eg. Local and Regional Councils ) adequately. Any user who accesses this screen should get behaviour that parallels the behaviour of generic services, ie. links to all the specific instances of that generic agency.

1.4.16.2 Processing Logic

When a link to Agency Display is clicked, the following searches are performed:

Perform Single Record Search for Agency

Perform Single Record Search for Agency

Search used

Single Record Search

Options

nil

Values Passed

  • NZGLS.Identifier = <value in link>

Required results

  • NZGLS.Title
  • NZGLS.Description
  • NZGLS.Identifier
  • NZGLS.Relation:ispartof.NZGLS-AN (to see if it has a parent agency)
  • NZGLS.Type.aggregation (not currently used, but will need in future if we are to detect that the agency record is for a generic agency, and handle it differently)
  • Repeating group of:
    • NZGLS.Availability:corporateName
    • NZGLS.Availability:Contact (multiple values, normally phone, sometimes fax and/or website, others possible)
    • NZGLS.Availability:Hours
    • NZGLS.Availability:Email
    • NZGLS.Availability:Address (multiple values, most commonly physical and postal)

Perform Targeted Search for Agency Children

Search used

Targeted Search

Options

nil

Values Passed

  • NZGLS.Type.category = 'Agency'
  • NZGLS.Relation:ispartof.NZGLS-AN = <NZGLS.Identifier[URN] from first search>

Required results

  • NZGLS.Title
  • NZGLS.Identifier

Perform Targeted Search for Agency Parent

This search is only performed if the first search returned a value in NZGLS.Relation:ispartof.NZGLS-AN.

Search used

Targeted Search

Options

Values Passed

  • NZGLS.Identifier[URN]=<NZGLS.Relation:ispartof.NZGLS-AN values from first search>
  • NZGLS.Type.category= 'Agency'

Required results

  • NZGLS.Title
  • NZGLS.Identifier[URN]

1.4.16.3 Presentation - results

Screen shot of a page of the government portal.

Screen shot of a page of the government portal.

Agency Display Request - screen elements key

Screen Element

Link Destination or Data Origin

Notes

R1

Data from Agency search:

NZGLS.Title

R2

Data from Agency search:

NZGLS.Description

R3

All data from Agency search:

'Name:'	NZGLS.Availability:corporateName
'Telephone:'	NZGLS.Availability:Contact=(phone)
'Fax:' 		NZGLS.Availability:Contact=(fax)
'Face to face:' 	NZGLS.Availability:Address=(physical)
'Hours:'	NZGLS.Availability:Hours
'Email:'	NZGLS.Availability:Email
'Post':		NZGLS.Availability:Address=(post)
'Website:' 	NZGLS.Availability:Contact=(website)

There may be repeated groups of Availability data. The start of a new group is recognisable by the appearance of a corporateName element. A new group is visually separated on the screen from the previous group.

Some Availability elements may contain text (such as 'Contact your nearest ACC branch office') followed by a URL. Where a combination of text and URL exists, display the text and link it to the URL.

R4

All data from Child search:

NZGLS.Title

NZGLS.Identifier

Display Title as a link, using Identifier

T1

Links to an Agency Display request

R5

All data from Parent search:

NZGLS.Title

NZGLS.Identifier

Display Title as a link, using Identifier


[ Previous | Next ]