Query syntax

Search and filter records with the query language that every list page uses.

Five lists take the same query language: Accessions, Material, Locations, Taxa, and Contacts. Type a word to search text, or type field:value to filter on a field. You can combine as many words and filters as you need. Sepal joins the terms with AND, so a record has to match every term.

The examples on this page assume the Accessions list, except where a section names another one. The fields differ by list, and Which fields exist gives each list its own.

Words

A word on its own is a full-text search.

quercus

Quotation marks around two or more words hold them together as a phrase. "red oak" matches a record where red is followed by oak, and it does not match one holding oak red or red maple and oak tree. Without the quotation marks, red oak matches a record holding both words wherever they sit.

Sepal matches the last word of the whole query as a prefix, and a phrase at the end of the query takes that prefix on its own last word. A query ending in "Quercus alb" finds Quercus alba. A phrase with another term after it has to match in full.

Filters

A field:value term filters on one field.

taxon:Quercus

If a value contains a space, put the value in double quotation marks.

taxon:"Quercus alba"

A quoted value is a phrase on a Full text field, so that filter matches a taxon named Quercus alba and not one named alba Quercus.

To match any one of several values, separate the values with commas.

location:GH,SH

Commas mean OR. The query above matches an accession with material in GH or in SH. Commas only widen a single field. Two different fields still narrow each other.

taxon:Quercus location:GH,SH

That query matches an oak in one of those two locations.

How a text filter matches

A text filter with no operator matches a substring. location:GH matches a location coded GH, and it also matches one coded GH2, because Sepal compiles the term to LIKE '%GH%'.

A comma-separated list matches exactly. location:GH,SH compiles to IN ('GH', 'SH'), so it finds GH and SH and no longer finds GH2. A comma widens how many values a field accepts and narrows how each one matches, which means a comma list can return fewer rows than the single-value term it grew out of.

To match one value exactly, put = in front of it.

location:=GH

That finds GH and not GH2.

A Full text field takes = as well, where it asks for the stored value rather than the index. code:2022 searches the index, which holds a code like 2022.0001 as the two words 2022 and 0001, so that term returns every accession of that year. code:=2022.0001 compares the column and returns the one accession carrying that code.

code:=2022.0001

A Full text field ignores >, >=, <, and <=, and searches for the value as it would without them. Field types gives the matching rule and the operators for every type.

Comparisons

Four comparison operators work on dates.

created:>2024-01-01
created:>=2024-01-01
updated:<2024-06-01
updated:<=2024-06-01

The colon always separates the field from the value, and the operators in Field types are what you can put after it.

Negation

A leading - excludes a filter.

-location:GH

A leading - on a word excludes a full-text term.

-quercus

That query returns the accessions the search quercus leaves out. A phrase takes a - the same way, so -"red oak" excludes what "red oak" matches.

Nested fields

A dot in a field name reaches through a relationship.

taxon.rank:species
material.status:alive

Putting it together

quercus location:GH,SH material.status:alive created:>2026-01-01

That query matches oaks with living material in GH or SH, and it matches only records created after January 1, 2026.

Which fields exist

The fields differ by list. Every field has a type, and the type decides how a value matches and which operators the field honours. The name of the field makes no difference.

A filter naming a field that its list does not have is dropped rather than matching nothing, so a misspelled field name widens the result instead of narrowing it. If a term appears to do nothing, check its spelling against the table for the list you are on.

Field types

TypeMatchesOperators
Full text (fts)Whole words, with the last word matched as a prefix= matches the stored value exactly. Sepal ignores >, >=, <, and <=
Text (text)Any part of the stored value, as LIKE '%value%'= matches the whole value exactly
Fixed list (enum)One value from the set the field allowsNone. The match is always exact
Date (date)A date, matched exactly>, >=, <, and <=
Record ID (id)A record’s numeric ID, matched exactlyNone. The match is always exact
Count (count)The number of related records, matched exactly>, >=, <, and <=

Sepal reads a comma-separated list before it reads the type, so field:a,b compiles to IN ('a', 'b') whichever type the field has. That is why location:GH,SH matches each value exactly where location:GH matches a substring.

A record ID field matches a record by its numeric ID rather than by its name. You can type one into the search box, though the Filter dropdown does not offer it.

Accessions

FieldType
codeFull text
idRecord ID
provenanceFixed list
taxonFull text
taxon.idRecord ID
taxon.rankFixed list
supplierText
supplier.idRecord ID
locationText
location.idRecord ID
material.typeFixed list
material.statusFixed list
tagText
createdDate
updatedDate

Material

FieldType
codeText
typeFixed list
statusFixed list
idRecord ID
accessionText
accession.idRecord ID
taxonFull text
taxon.idRecord ID
location.codeText
location.nameText
location.idRecord ID
tagText
createdDate
updatedDate

Locations

FieldType
codeFull text
nameFull text
descriptionFull text
idRecord ID
taxonFull text
taxon.idRecord ID
material.typeFixed list
material.statusFixed list
createdDate
updatedDate

The taxon field on this list asks what a location holds, so taxon:Quercus finds the locations that hold an oak.

Taxa

FieldType
nameFull text
authorText
rankFixed list
idRecord ID
parentText
parent.idRecord ID
material.typeFixed list
material.statusFixed list
location.codeText
location.nameText
location.idRecord ID
accessionsCount
tagText
synonymText

The accessions field counts the accessions of a taxon. accessions:>0 finds the taxa you hold, and accessions:0 finds the ones you do not. The Only taxa with accessions checkbox above the table writes accessions:>0 for you.

The synonym field is the exception to the type table. Sepal resolves the value against the synonyms it knows and returns the taxa those names point to, rather than matching a column.

Contacts

FieldType
nameFull text
emailFull text
businessFull text
addressText
idRecord ID
createdDate
updatedDate
The search grammar in the app is the source of truth for both the language and the fields. If a query that this page shows does not work, report it.