obs: Support negation of parts of a query via `any` keyword
Closed this issue · 1 comments
I have revived #89 as this new issue for just the any
idea because it has a scope in which it is actually useful: the new Discord Reply feature added yesterday. When you make a query based on another query, but only typing the parameters you want to change, then you need a way of negating any parts of the query you no longer want. The any
concept fits this perfectly.
Supposing I type:
,t bees by me from nova scotia
Now the display has these parts:
taxon_id: 630955
, which appears in the taxon record title link:
Epifamily Anthophila (Bees)place_id: 6853
, which appears in the observations link in the description:
is an epifamily with 6001 observations matching your request:user_id: 545640
, which appears in the user counts link in the table at the end of the description:
361 (36)
INatTaxon
already is able to parse all of these pieces of information from the display. The next step in improving the Reply feature would be to make use of them to form a new query. Now, If I wanted to do a ,topobs
in reply to this display, but substituting new brunswick
for nova scotia
, no problem; my reply would be:
,topids from new brunswick
And then I should be shown a display of top identifiers of bees from a different place: new brunswick
. But if I didn't want a place filter anymore, I need a way of expressing that. Thus:
,topids from any
Similarly, any other of the main clauses (taxon, place, project, user) could be negated like this.
We'll have to think about how to negate one-word keywords later, as in ,tab rg bees from nova scotia
. That's out of scope for this first issue.