Search Guide
This guide explains how to write advanced search queries using easy to understand examples.
Synopsis#
B2SHARE is a web-based service for storing and publishing data sets, intended for European scientists. The service utilises other EUDAT services for reliability and data retention, while storing the data at trusted repositories with national backing, in order to provide a professionally managed and supported IT environment.
B2SHARE supports a default set of metadata fields that are defined in the root schema. Every record must provide the mandatory fields in this schema. In addition, the service allows communities to define their own set of metadata fields aggregated in the so-called community metadata schema. Every record that is published as part of these communities must also fill in the mandatory fields in these community-specific schemas. All metadata field values are indexed by B2SHARE and are therefore searchable using the web interface and REST API.
This document gives an introduction in the possiblities for searching using queries. For a complete overview of all possibilities, see the OpenSearch documentation on search queries.
How to access the B2SHARE service#
B2SHARE is available from the following URL: https://b2share.eudat.eu.
Searching in B2SHARE#
Search is available directly on the front page of the web interface or after clicking on the ‘Search’ button on that same page. Searching for any keyword always ends up on the advanced search page of B2SHARE.
To search using the REST API, append the query normally entered in the search box to the search API URL as the value of the parameter 'q': https://b2share.eudat.eu/api/records?q=<query-string>. For more information on searching through the REST API, see the relevant section in the B2SHARE REST API documentation.
Underlying implementation#
B2SHARE indexes all the metadata of each record using OpenSearch search technology. After each record creation, versioning or metadata update, this index will be updated automatically and therefore all changes can immediately be found using the search functionality.
OpenSearch indexes all metadata fields by not storing the exact field values but the more generic equivalents instead. In practice this means that when a singular keyword is entered, also plural equivalents are matched successfully.
Search records#
Registered and unregistered users can use the search field on the B2SHARE home page. Enter a search query in the search field and click the “Search” button. The text entered can be part of a title, keyword, abstract or any other metadata, including values for metadata fields defined in community-specific schemas.
Unregistered users can only search for data sets that are publicly accessible. The default search mode is simple search, which provides an input box where your queries can be typed. Usually it is sufficient to just type some keywords one is interested in and hit return. Please note that only the latest version of matching records is shown in the search result.
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 e.g. 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 parenthesis:
Example: metadata.title:(open science)
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, 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, e.g.: - 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 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:
- Most recent
- Best match
- Oldest
- Most viewed
- Most downloaded
Regular expressions#
Regular expressions are a powerful pattern matching language that allow to search for specific patterns in a field. For instance if we wanted to find all records with a DOI-prefix 10.5281 we 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#
It is possible to search for records that either are missing a value or have a value in a specific field 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, you can search for all records with the phrase open science in either title or description field, but 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 using the fuzzy operator ~.
Example: oepn~
Results will match records with terms similar to oepn which would e.g. also match open.
Proximity searches#
A phrase search like "open science" by default expect all terms in exactly the same order, and thus for instance would not match a record containing the phrase "open access and science". A proximity search allows that the terms are not in the exact order and may include other terms in between. The degree of flexibility is specified by an integer afterwards:
Example: "open science"~5
Wildcards#
You can use wildcards in search terms to replace a single character (using ? operator) or zero or more characters (using * operator).
Example: ope? scien*
Wildcard searches can be slow and should normally be avoided if possible.
Field Mapping Shortcuts#
Shorter field names are mapped automatically to their metadata paths.
Examples:
- reference.reference instead of metadata.references.reference
- creators.name instead of metadata.creators.person_or_org.name
- doi instead of pids.doi.identifier
Searching Custom Fields (Community Extensions)#
Custom fields can be accessed with a simplified syntax using a prefix (e.g., fmi).
Examples:
- fmi.external_url instead of custom_fields.fmi\:external_url
- fmi.parameter.parameter_name instead of custom_fields.fmi\:parameter.parameter_name
- fmi.topic instead of custom_fields.fmi\:topic
This logic also works with the _exists_ operator.
Last update : 11.11.2025
Last review : 11.11.2025