If a [p]search produces no results when the user typed by me or by <user>, etc. then it would be reasonable if the error response gave the user some guidance as to what command they probably intended. We do something similar here already:
The difference with [p]search is that the taxon query converter isn't used here (i.e. that only applies to the taxon, obs, and inactive subcommands), so there is no opportunity to immediately discover the issue. It might be good to change that for consistency's sake. Alternatively, we could check for keywords only after a query failed to produce any results, though that doesn't seem very consistent to me, so I slightly prefer the first approach.
Not worth it to actually parse the query to find out what they did wrong. Instead, I have beefed up the help and the error message text. See b0f4358486e09770085c6ea1c52aa5ae05a1ac35 for details.
If a
[p]search
produces no results when the user typedby me
orby <user>
, etc. then it would be reasonable if the error response gave the user some guidance as to what command they probably intended. We do something similar here already:The difference with
[p]search
is that the taxon query converter isn't used here (i.e. that only applies to thetaxon
,obs
, andinactive
subcommands), so there is no opportunity to immediately discover the issue. It might be good to change that for consistency's sake. Alternatively, we could check for keywords only after a query failed to produce any results, though that doesn't seem very consistent to me, so I slightly prefer the first approach.