Open michaelpirrello opened 4 years ago
This is something that will be more important as we build out support for matching multiple observations instead of returning a single result.
This is partially supported via opt without_taxon_id=#
(and can take a comma-delimited list of id#s). I say partially because it is unwieldly for users to lookup and type the id numbers. For the commonly used ones, therefore, Dronefly has some predefined taxonomic group macros (see ,groups
for a list).
Adding this to the query language as not
rather than without
clears up 2 separate issues:
with
for annotations. Using without
for taxa would just cause confusion.Example:
waspsonly
expands to "Apocrita without Formicidae, Anthophila"Exclusion:
insects without waspsonly
would naively expand with exclusion to "Insecta without (Apocrita without Formicidae, Anthophila)"Negation:
insects not waspsonly
which I attempt to make an algorithm for below:
This is complicated enough, and also confusing for the user, so that I believe we should just forbid negation with the not
keyword of groups that contain negations. If we ever need such a thing, we'd be better off making a new macro for it, like nonwasps
.
So my proposal is to support not
keyword in the query language, and it can only precede a selector for a single taxon (i.e. not a "group macro").
Per discussion: e.g. lepidoptera without butterflies; fungi without lichens