Bug #12251

[API] Strict checks for "@@" filter operand

Added by Tom Clegg about 4 years ago. Updated about 1 month ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:


The operand of a @@ filter should be checked against a well-defined format.
  • If the operand does not follow this format, the request should be rejected 4xx.
  • If the operand does follow this format, the request should behave predictably.
  • API should support queries like "foo bar", "foo & bar", "foo*&bar*", "foo* bar", "foo|bar" where "*" enables prefix matching, & means and, and | means or.
  • At least for now, queries with non-alphanumeric characters other than |&* and space should return 422 errors; likewise malformed queries like "&foo", "bar&", "foo&&bar", "foo& |bar".
  • Except: for compatibility, start by silently replacing :* with *.
  • A query like "a" ("a" being a "stop word") should match everything. This is consistent with the behavior of "foobar a", which matches everything containing "foobar". (Currently, "a" matches nothing.)
    • This can be implemented by passing the supplied search string through select to_tsquery(x) and skipping the filter entirely if the result is empty.

When implementing, please review the Workbench portion of this story done in #12194 to ensure expectations match.

Related issues

Related to Arvados - Bug #12194: [API] [Workbench] Colons and ampersands in search should not produce errorsResolved08/30/2017


#1 Updated by Tom Morris about 4 years ago

  • Target version set to 2017-10-11 Sprint

#2 Updated by Tom Morris almost 4 years ago

  • Story points set to 1.0

#3 Updated by Tom Morris almost 4 years ago

  • Target version changed from 2017-10-11 Sprint to Arvados Future Sprints

#4 Updated by Peter Amstutz 3 months ago

  • Target version deleted (Arvados Future Sprints)

#5 Updated by Peter Amstutz about 1 month ago

  • Status changed from New to Closed

Also available in: Atom PDF