GitHub Issues search now supports nested queries and boolean operators: Here’s how we (re)built it
2025-05-13
11 min read
2
Endigest AI Core Summary
GitHub Issues search now supports nested queries with logical AND/OR operators and parentheses, replacing the previous flat query structure.
- •The old system parsed queries into a flat list implicitly joined by AND; the new system uses an Abstract Syntax Tree (AST) via the parslet parsing library with a PEG grammar.
- •A new search module (ConditionalIssuesQuery) replaced the existing one (IssuesQuery) while maintaining backward compatibility with existing query formats.
- •AST traversal maps nested boolean logic to Elasticsearch's bool query, with AND/OR/NOT mapping to must/should/should_not clauses.
- •Backward compatibility was validated by dark-shipping: running 1% of live queries through both systems in parallel and logging differences.
- •The feature handles ~2000 QPS (160M queries/day), requiring careful performance and correctness validation before full rollout.
