Intralibrary Search Query Syntax


Author: Intrallect Ltd

Company: Intrallect Ltd


intraLibrary IntraLibrary Search Query Syntax: Version 2.8

Table of Contents
1. Introduction
2. Wildcard Searches
3. Fuzzy Searches
4. Range Searches
5. Boosting Search Terms
6. Boolean Operators
6.1. OR
6.2. AND
6.3. NOT
7. Grouping
8. Special Characters

1. Introduction

This document gives a quick overview of the syntax that should be used when searching for resources within intraLibrary. The document also highlights provides some hints and tips to allow you to search efficiently.

A search query is broken up into two parts terms and operators. There are two types of terms: Single Terms and Phrases.

Operators are used to combine terms so that a more complex query can be formed

All searches are case insensitive.

There is a list of stopwords used. Searches using words in this stop list are ignored.

Searches are filtered using the Porter Stemming method. This basically means stems of words will be used in the search. eg. searches for running will match run and searches for run will match running. Search terms will be stemmed according to the stemming rules for the language specified as the system default language within intraLibrary.

Plural searches are also active e.g. bucket will match buckets.


2. Wildcard Searches

There is support for single and multiple character wildcard searches:

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 e.g. te*t

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


3. Fuzzy Searches

IntraLibrary 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 'roam' use the fuzzy search: roam~
This search will find terms like foam and roams, but not rome (the fuzzy search does not work out whether or not the term has a similar soundex to 'roam')


4. Range Searches

Range Queries allow you to match objects whose field(s) have values that are between the lower and upper bound specified by the range query. Range queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically.

Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by curly brackets.

To find all objects whose titles lie between Ernani and Falstaff, including Ernani and Falstaff, you can use the search: [Ernani TO Falstaff]

To find all objects whose titles lie between Aida and Otello, including Aida and Otello, you can use the search: {Aida TO Otello}


5. Boosting Search Terms

IntraLibrary provides the relevance level of matching objects based on the terms found. Boosting allows you to control the relevance of a object by boosting its term. The higher the boost factor, the more relevant the term will be.

To boost a term use the caret, '^', symbol with a boost factor (a number) at the end of the term you are searching. For example, if you are searching for Verdi Rigoletto and you want the term "Verdi" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. You would type: Verdi^4 Rigoletto This will make objects with the term Verdi appear more relevant.

You can also boost Phrase Terms as in the example: "opera by verdi"^4 "opera by puccini"

By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2). A boost factor of less than 1 will reduce the importance of the term.


6. Boolean Operators

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



6.1. OR
6.2. AND
6.3. NOT

6.1. 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 object if either of the terms exist in a object. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.

To search for objects that contain either "italian opera" or just "opera" use the query: "italian opera" opera or "italian opera" OR opera


6.2. AND

The AND operator matches objects where both terms exist anywhere in the text of a single object. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

To search for objects that contain "italian opera" and "spanish opera" use the query: "italian opera" AND "spanish opera"


6.3. NOT

The NOT operator excludes objects that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

To search for objects that contain "italian opera" but not "spanish opera" use the query: "italian opera" NOT "spanish opera"

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


7. Grouping

IntraLibrary 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 'italian' or 'spanish', and 'opera' use the query: (italian OR spanish) AND opera

This eliminates any confusion and makes sure you that 'opera' must exist and either the term 'italian' or 'spanish' may exist.

Note: If not grouping is specified then the AND operator takes precedence over the OR operator.


8. Special Characters

IntraLibrary supports escaping special characters that are part of the query syntax. The current list special characters are:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

To escape these character use the \ before the character. For example to search for (1+1):2 use the query: \(1\+1\)\:2