Advanced Search

Build An Advanced Search Query

in

Add Limits

Learn the Query Syntax

The Open Collections uses the Apache Lucene Query Parser Syntax for advanced searches. Your current query looks like this:

You can use this syntax in any search bar in the Open Collections site to quickly execute complex queries without relying on the advanced search tool.

Useful tricks include using the boolean operators AND, NOT, and OR (all caps) between search terms to dictate how the terms are matched, and limiting your query to a specific metadata field by prefixing it with the field name followed by a colon character. Phrases wrapped in quotation marks will be matched exactly, and you may group queries using parentheses.

For example, (title: "North Pole" AND accurate) AND (description: map OR "engraved print" NOT 'south') will search for items with 'North Pole' and 'accurate' in the title and either 'map' or 'engraved print', but not 'south' in the subject field. You can learn more advanced search techniques from the Apache Lucene Query Syntax manual.

Note that Open Collections' 'Limits' and 'Filters' are applied separately from the query string, and searches from within a particular collection or item will remain scoped to that collection or item.

The prefixes in the field names you see here represent the defined vocabulary to which the field belongs. To learn more about the Open Collections metadata model, check out our API Documentation.

Make an API Call Based on this Query

You can use the following query object to return data from the Open Collections API. To query the Open Collections API with your advanced search query, select the fields you would like to return, and use the following query object to request your data.

Visit the Open Collections Research API page to request an API key and to learn more about how you can use the API.

Then enter your API Key, and send the object above in an HTTP Post request to the following url:

Make an RSS Feed Scoped to this Query

Customize your RSS feed with the advanced search builder, then copy and paste the link below into the RSS reader of your choice.

https://open.library.ubc.ca/rss/search/rss.xml{[{ rss.queryString }]}

Make an Embeddable Search Widget Scoped to this Query

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed a scoped search widget in your website.