3. Simple Searching
Criteria can be set on attributes selected from a drop-down list (see Appendix A below for an explanation of these attributes), and an “equals” or “not equals” operator selected. Click the Add button every time a criteria is completed.
Criteria can be combined using the “AND” or “OR” operator (please note that you should also use parentheses when using the “OR” operator. You need to click the “Add” button to include such an operator in your search.
When all criteria are set, click the “Search” button to execute the search, which is run in the security context of the logged-in user. Results are displayed further down the page. We will save this query as “Demo query” so that we can run it again. A saved query is also assigned a reference which enables you and others to reference this query when using the web services interface.
More sophisticated queries can be built to provide result sets similar to those provided from the Registration database (until August 2012). Date fields can be search using the NOW function, to which days can be added or subtracted. When setting a criteria for University Card Expiry Date and Registration Expiry Date ranges of dates can be searched using the [<from> TO <end>] syntax, which can include wildcards. Combining these with [NOW TO *] will match all date fields with a date greater than or equals to today. Dates can be added to and subtracted from NOW in a way similar to the following examples:
Further examples can be found at <http://lucene.apache.org/solr/api/org/apache/solr/util/DateMathParser.html>
Solr/Lucene query syntax is used, to find out more about how criteria can be described http://wiki.apache.org/solr/SolrQuerySyntax is a good (if technical) starting point. Please note that not all filters and processors are enabled on CUD, so not everything will work as expected. You are encouraged to use the CUD UI interface to build and test queries.