Question bank › Low-Level Design
Lld Low-Level Design Medium

Dynamic Search Filter Engine

Build a backend library that takes a complex, nested JSON representation of search filters (e.g., '(Category: Electronics AND Price < 500) OR (Brand: Sony AND Rating > 4)') and translates it into different target formats: SQL WHERE clauses, Elasticsearch Query DSL, and a Mock In-Memory Filter for unit testing. The system must be easily extensible to support new filter types (e.g., Geo-location) without modifying the core translation logic.

Key concepts

composite patternvisitor patternfactory pattern

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.