Official government domain

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure connection

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Search guide

This guide explains how to write advanced search queries using easy to understand examples.

Simple search (one or multiple terms)

Example: open science

Results will match records with the terms open or science in any field. Note that stemming is applied, so for example, science will also match sciences. Search results are ranked according to an algorithm that takes your query terms into account.

You can require presence of both terms using either the + or AND operator:

Examples: +open +science or open AND science

You can require absence of one or more terms using either the - or NOT operator:

Examples: -open +science or NOT open AND science

Phrase search

Example: "open science"

Results will match records with the phrase open science in any field.

Field search

Example: metadata.title:open

Results will match records with the term open in the field metadata.title. If you want to search for multiple terms in the title, you must group the terms using parentheses:

Example: metadata.title:(open science)

See the InvenioRDM documentation for the full list of fields you can search.

Combined simple, phrase, or field search

Example: +metadata.title:"open science" -metadata.title:policy or e.g. metadata.title:(-open +science)

You can combine simple, phrase, and field search to construct advanced search queries.

Range search

Example: metadata.publication_date:[2017 TO 2018] (note that you must capitalize TO).

Results will match any record with a publication date between 2017-01-01 and 2018-01-01 (both dates inclusive).

Note that partial dates are expanded to full dates, such as in the following examples:

  • 2017 is expanded to 2017-01-01
  • 2017-06 is expanded to 2017-06-01

Use square brackets ([]) for inclusive ranges and use curly brackets ({}) for exclusive ranges, e.g.:

  • [2017 TO 2018} is equivalent to [2017-01-01 TO 2017-12-31] because of date expansion and the exclusive upper bound.

Examples of other ranges:

  • metadata.publication_date:{* TO 2017-01-01}: All days until 2017.
  • metadata.publication_date:[2017-01-01 TO *]: All days from 2017.

Ranking/sorting

By default, all searches are sorted according to an internal ranking algorithm that scores each match against your query. In both the user interface and REST API, it's possible to sort the results by using the following filters:

  • Most recent
  • Best match
  • Oldest
  • Most viewed
  • Most downloaded

Regular expressions

Regular expressions are a powerful pattern matching language that allows you to search for specific patterns in a field. For instance, if you wanted to find all records with a DOI-prefix 10.5281, you could use a regular expression search:

Example: metadata.subjects.identifier:/03yrm5c2[1,6]/

Careful: the regular expression must match the entire field value. See the regular expression syntax for further details.

Missing values

You can search for records that are either missing a value or have a value in a specific field by using the _exists_ and NOT _exists_ field names.

Example: NOT _exists_:metadata.additional_titles (all records without metadata.additional_titles)

Example: _exists_:metadata.creators (all records with metadata.creators)

Advanced concepts

Boosting

You can use the boost operator ^ when one term is more relevant than another. For instance, when searching for all records with the phrase "open science" in either the title or description field, you can rank records with the phrase in the title field higher:

Example: metadata.title:"open science"^5 metadata.description:"open science"

Fuzziness

You can search for terms similar to but not exactly like your search term by using the fuzzy operator ~.

Example: oepn~

Results will match records with terms similar to oepn, which would include open, for example.

Proximity searches

A phrase search like open science, by default, searches for terms where all of the words appear in exactly the same order. Thus, for instance, it would not match a record containing the phrase open access and science. A proximity search allows the terms to not be in the exact same order and may include other terms between them. The degree of flexibility is specified by an integer afterward:

Example: "open science"~5

Wildcards

You can use wildcards in search terms to replace a single character (using the ? operator) or zero or more characters (using the * operator).

Example: ope? scien*

Wildcard searches can be slow and should normally be avoided if possible.