Actions
Bug #12251
closed[API] Strict checks for "@@" filter operand
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.
- 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.
- This can be implemented by passing the supplied search string through
When implementing, please review the Workbench portion of this story done in #12194 to ensure expectations match.
Related issues
Updated by Tom Morris almost 7 years ago
- Target version set to 2017-10-11 Sprint
Updated by Tom Morris almost 7 years ago
- Target version changed from 2017-10-11 Sprint to Arvados Future Sprints
Updated by Peter Amstutz about 3 years ago
- Target version deleted (
Arvados Future Sprints)
Actions