Skip to main content

Search syntax guide

This guide provides more detail on the syntax you can use to search EIN to help you create more advanced searches.

It covers:
Phrases
Boolean operators/connectors
Proximity searching
Boosting a search term
Wildcards

Phrases

Wrap you search term in quotation marks if you are looking for a phrase.

Example: "Home Office" will ensure you receive results containing the phrase 'home office'. Without the quotation marks, the search would merely find results with both the words 'home' and 'office'.

You can combine a phrase with keywords rather than having your whole query as a phrase.

Example: family "Home Office" guidance will search for 'family' and 'guidance' as words and for the phrase 'home office'.

Boolean operators/connectors

The search supports +, -. AND, OR and NOT as operators to build more complex searches.

Plus and minus

By default, the search will require all words to be found if you are searching for 1 to 5 words (unless you perform an OR search). As you add more words, some will be considered optional so that the chances of you receiving no results are lessened. The + operator tells the search that a term is not optional and must be found.

Type + directly before any search term that you require to be present in your results.

Example: human rights report +torture prison conditions will ensure that 'torture' must be present in all search results.

The - operator does the opposite and tells the search that you want to exclude any results containing that term. Type - directly before any search term that you want to exclude.

Example: human rights report -torture prison conditions will only find results that do not contain the term 'torture'.

AND, OR and NOT

The search accepts the commonly used AND, OR and NOT operators. Always type them in CAPITALS so that the search recognises them as operators.

AND narrows a search to find results containing all the terms.

Example: immigration AND nationality AND fees AND regulations AND amendment will require all five words to be found.

OR broadens a search to find results containing any of your terms. It can be useful for alternate spellings or for terms that can be expressed in different ways.

Examples: Taliban OR Taleban and lgbt OR gay OR lesbian

NOT excludes a term. It performs the same function as - and tells the search that you only want results without that term.

Example: immigration NOT emigration will only return results where 'emigration' does not appear.

Grouping

You can group search terms together in clauses using parentheses. Each grouped clause is handled separately.

Example: (Taliban OR Taleban) AND (Pakistan NOT Afghanistan) will find results that contain 'Pakistan' but not 'Afghanistan' and that also contain either 'Taliban' or 'Taleban'.

Using multiple parentheses will enable you to build complex queries.

Proximity searching

You can use proximity searching to specify that you want to find words within close proximity to each other.

Add the tilde character ~ and a numeric value to the end of your terms to perform a proximity search. The numeric value will specify within how many words you want you search terms to appear together. Don't put any spaces between your query and the tilde character or between the tilde character and the numeric value.

Wrap your search terms within quotation marks when performing a proximity search. Note that when you are using the proximity syntax, quotations do not denote a phrase. The words can be in any order and the search will find results with the words in any order.

Example: "guidance detention"~10 will find results where the words 'guidance' and 'detention' appear within 10 words of each other.

Example: "guidance Home Office detention"~40 will search for all four words within 40 words of each other.

Proximity searching can be very useful for increasing the relevancy of your results if you are searching for terms that commonly occur outside of the context you require, or if you are searching for something that might not always be expressed in the same way or order.

You can adjust the numeric value and search again if you receive too many or too few results.

Boosting a search term

You can apply a 'boost' to individual terms by typing the caret symbol ^ followed by a numerical boost factor directly after the term you want to boost. This tells the search that a certain term is more important and should be given a higher priority. The number will determine by how much the term is boosted. For example, 2-10 is a fairly low boost, while going up to 50 will give a much higher boost.

Example: tier 4 student^3 gives a moderate boost to show you want the term 'student' to have a higher priority.

Example: tier 4 sponsor^50 student gives a very high boost to favour results that are especially relevant to 'sponsor'.

Wildcards

You can use wildcards to represent one or more characters. Use a question mark ? to represent a single character. Use an asterisk to represent multiple characters. Wildcards can be used at any position within a word, including at the start or at the end.

Example: Tal?ban will find both 'Taliban' and 'Taleban' as the ? represents any character.

Example: Depor will find 'deport', 'deportation', 'deported', etc., as the represents any characters.

Don't use quotation marks when searching with wildcards, as otherwise your query will be interpreted literally. This means wildcards are not compatible with phrase or proximity searches.

You can combine words with wildcards together with standard words without wildcards in a single search.

Example: Tal?ban Afghanistan

Note: Search words with wildcards do not undergo analysis for relevance. If your search terms is only a single word with a wildcard (or if all your search terms contain wildcards), your results will merely be returned in the order in which the search engine stored them. You may prefer to sort any such searches by date to get the results in an understandable order.

Feedback

EIN welcomes any feedback you have on the search. If you find a search that doesn't behave as expected or if you have any requests that you think will assist your searches, please let us know. You can email us at support@ein.org.uk.