Support logical operators (AND/OR) across fields in issue search queries
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
### Problem Statement
Currently, Sentry's issue search supports OR logic within a single field (e.g., browser.name:[Chrome, Firefox] to match issues where the browser is Chrome or Firefox), but does not support logical operators like OR or AND across different fields.
When a user attempts to use OR between separate field filters (for example, assignee:jane OR browser.name:Chrome) the search breaks entirely rather than returning an error or gracefully degrading. This creates a confusing experience where the user doesn't understand why their query fails.
### Solution Brainstorm
Support cross-field logical operators (AND / OR) in the issue search query syntax, similar to how other search and query tools handle compound boolean expressions. This could look like:
fieldA:value1 OR fieldB:value2 - returns issues matching either condition
fieldA:value1 AND fieldB:value2 - returns issues matching both conditions (currently the implicit default for multiple filters)
Parenthetical grouping for complex queries: (assignee:jane OR assignee:bob) AND browser.name:Chrome
### Product Area
Unknown
Contributor guide
Research direction
Start by locating Sentry's issue-search query parser and the existing tests for field-level OR behavior. Trace how multiple field filters are parsed, then define tests covering cross-field OR, AND, and parenthetical grouping; done means these examples parse and return the expected matching issues without breaking existing syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100