Skip to content

String search

LAPIS allows users to filter string fields in the metadata using regular expressions. This is useful when the full string is unknown or when a more complex search is needed.

By default, the string search is disabled for all string fields. It can be enabled by the instance administrator. A list of searchable fields of this LAPIS instance can be found here.

The syntax for the string search is a subset of the syntax of the PCRE library. Under the hood, we use the RE2 library to evaluate the regular expressions.

Examples

Get the number of sequences with the division field containing the string Basel:

GET /sample/aggregated?division.regex=Basel

Get the number of sequences with the division field starting with the string Basel:

GET /sample/aggregated?division.regex=^Basel