Advanced Search

Build An Advanced Search Query

in

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.

You can learn more about searching Open Collections by checking out the Open Collections Search and Retrieval Documentation.

Make an API Call Based on this Query

Enter your API Key, and send the object above in an HTTP GET 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.
Optionally, add an API key to increase the number of allowed search requests per minute. Without an API Key, the widget will be limited to 10 requests per minute