Project

General

Profile

Actions

Bug #12251

closed

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

Added by Tom Clegg over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
-
Story points:
1.0

Description

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.
Specifically:
  • 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 *.
Also:
  • 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 errorsResolvedTom Clegg08/30/2017Actions
Actions #1

Updated by Tom Morris over 6 years ago

  • Target version set to 2017-10-11 Sprint
Actions #2

Updated by Tom Morris over 6 years ago

  • Story points set to 1.0
Actions #3

Updated by Tom Morris over 6 years ago

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

Updated by Peter Amstutz almost 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #5

Updated by Peter Amstutz over 2 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF