Search Help

In April 2008, a new search engine was implemented on SQA's website - an open source search called Lucene. The search engine now indexes all content on the site and provides much more accurate and detailed results.

The following guidance should help you get the most from the site search facility. If you have any queries or feedback on the search engine, please e-mail us at: web.team@sqa.org.uk.

Simple Search

Available on the top right-hand corner of every page, the simple search is the quickest way to run a search on the site. Simply enter a term and press submit. Details of the various terms you can use are provided below.

simple_search1.jpg

By pressing the 'Submit' key without entering a term, you will be taken to the slightly more detailed simple search page where you can further narrow down your search by filtering for 'pages', 'documents' or 'everything' using the top drop down.

You can also refine your search using the 'Published From' date fields.

simple_search2.jpg

It's also possible to access the NQ, HN and SVQ Unit Search facilties from this page using the 'qualification search' link.

Finally, it's possible to filter further by selecting the 'Advanced Search' link.

Advanced Search

In addition to the date filtering capabilities provided via the simple search, it is possible to further narrow down the search using the 'Site Section' drop-down menu available on the Advanced Search.

The guidance provided below shows how you can further refine the output from the search.

advanced_search_new.gif

Guidance

Terms

A query is broken up into terms and operators. There are two types of term: single terms and phrases.

A single term is a single word such as 'chemistry' or 'physics'.

A phrase is a group of words surrounded by double quotes such as "Computer Studies".

Multiple terms can be combined together with boolean operators to form a more complex query (see below).

Fields

Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. On SQA's website there are two fields you can search by: 'header' (the heading of a page) and 'content' (the actual content of the page). 'Content' is the default field.

You can search by typing the field name followed by a colon (:), and then the term you are looking for.

If you want to find a page entitled Chemistry Syllabus which contains the text 'oxygen', you can enter:

header:"Chemistry Syllabus" AND content:oxygen

or

header:"Chemistry Syllabus" AND oxygen

Since content is the default field, the field indicator is not required.

Note: the field is only valid for the term that it directly precedes, so the query

header:Chemistry Syllabus

Will only find 'Chemistry' in the header field. It will find 'Syllabus' in the default field (in this case the content field).

Term Modifiers

Lucene supports modifying query terms to provide a wide range of searching options.

Wildcard Searches

Lucene supports single and multiple character wildcard searches within single terms (not within phrase queries).

To perform a single character wildcard search use the question mark (?) symbol.

To perform a multiple character wildcard search use the asterix (*) symbol.

The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for 'text' or 'test' you can use the search:

te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

test*

You can also use the wildcard searches in the middle of a term.

te*t

Note: You cannot use a * or ? symbol as the first character of a search.
 

Fuzzy Searches

Lucene supports fuzzy searches. 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 'roam', use the fuzzy search:

roam~

This search will find terms like 'foam' and 'roams'.

Proximity Searches

Lucene supports finding words that are within a specific distance from each other. To do a proximity search use the tilde (~) symbol at the end of a Phrase. For example, to search for a  page with 'chemistry' and 'syllabus' within ten words of each other, use the search:

"chemistry syllabus"~10


Boosting a Term

Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret (^) symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for chemistry higher and you want the term 'chemistry' to be more relevant, boost it using the caret (^) symbol along with the boost factor next to the term.

You would type: chemistry^4 higher

This will make pages and documents with the term 'chemistry' appear more relevant. You can also boost phrase terms as in the example:

"chemistry higher"^4 "chemistry advanced higher"

By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (eg 0.2).
 

Boolean Operators

Boolean operators allow terms to be combined through logic operators. Lucene supports AND, '+', OR, NOT and '-' as boolean operators (Note: boolean operators must be ALL CAPS).

OR

The OR operator is the default conjunction operator. This means that if there is no boolean operator between two terms, the OR operator is used.

The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.

To search for documents that contain either 'chemistry syllabus' or just 'chemistry' use the query:

"chemistry syllabus" chemistry

or

"chemistry syllabus" OR chemistry

AND

The AND operator matches documents where both terms exist anywhere in the text of a single document.

This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

To search for documents that contain 'chemistry syllabus' and 'science syllabus' use the query:

"chemistry syllabus" AND "science syllabus"

+

The plus symbol (+) or 'required' operator requires that the term after the '+' symbol exist somewhere in a the field of a single document.

To search for documents that must contain 'chemistry' and may contain 'science' use the query:

+chemistry science

NOT

The NOT operator excludes documents that contain the term after NOT.

The apostrophe symbol (!) can be used in place of the word NOT.

To search for documents that contain 'chemistry syllabus' but not 'science syllabus' use the query:

"chemistry syllabus" NOT "science syllabus"

Note: The NOT operator cannot be used with just one term. For example, the following search will return no results: NOT "chemistry syllabus"

-

The minus symbol (-) or 'prohibit' operator excludes documents that contain the term after the '-' symbol.

To search for documents that contain 'chemistry syllabus' but not 'science syllabus' use the query:

"chemistry syllabus" -"science syllabus"

Grouping

Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

To search for either 'chemistry' or 'physics' and 'syllabus' use the query:

(chemistry OR physics) AND syllabus

This eliminates any confusion and makes sure that syllabus must exist and either term chemistry or physics may exist.

Field Grouping

Lucene supports using parentheses to group multiple clauses to a single field.

To search for a page name that contains both the word 'chemistry' and the phrase 'national curriculum' use the query:

title:(+chemistry +"national curriculum")