SOLR query

To construct a search in Command Search without using Query builder, you must input the query directly into the SOLR query input box. The query syntax is as follows:

INDEX operator search term
TW:pollution

INDEX operator search term AND/OR/NOT INDEX operator search term
NW:park AND DAT:1994

 To search for an exact phrase you can enclose the search terms in double quotes.

INDEX operator “search phrase”
TW:”paul simon”

Range operators are used in place of relational operators for less than (<), greater than (>), less than or equal to (<=), greater than or equal to (>=) and not this date (NOT DAT=) searches. The query syntax is as follows:

INDEX operator search term AND/OR/NOT INDEX range operator search term
NW:park AND DAT:[2013 TO *]

 < less than                                                           DAT:{* TO 2013}
> greater than                                                      DAT:{2013 TO *}
<= less than or equal to                                      DAT:[* TO 2013]
>= greater than or equal to                                 DAT:[2013 TO *]
NOT DAT = not this date                                    NOT DAT:2013

starts with                                                       \uFFFD<search term>
                                                                        e.g. TW:"\uFFFD Dogs"

The proximity operator ~ is used to indicate adjacency in any word order in conjunction with a number to specify the number of words within which two terms occur. To retrieve titles where the words ‘cat’ and ‘dog’ may appear in any order with up to 2 words between them:

INDEX operator search terms adjacency operator number
TW:”cat dog”~2

NOTE: Index codes (eg TW), Boolean Operators (AND, OR, NOT) must be input in UPPER CASE. Search terms can be input in either upper or lower case, with the exception of codes (e.g. language codes) which must be input in the case used in the MARC view record.

Phrases containing AND, OR, NOT must be enclosed in quotes.

 See Appendix 3 of the Search Manual for a complete list of indexes and their codes.