Bird
Raised Fist0

A search filter query returns no results unexpectedly. Which is the most likely cause?

medium📝 Analysis Q6 of Q15
LLD - Design — Hotel Booking System
A search filter query returns no results unexpectedly. Which is the most likely cause?
AThe database is offline
BFilters are combined with OR but no item matches any
CFilters are combined with AND but no item matches all
DThe search index is too large
Step-by-Step Solution
Solution:
  1. Step 1: Analyze filter combination logic

    Filters combined with AND require items to match all conditions.
  2. Step 2: Reason about empty result

    If no item matches all filters, result is empty.
  3. Final Answer:

    Filters are combined with AND but no item matches all -> Option C
  4. Quick Check:

    AND filters with no match = empty result [OK]
Quick Trick: No results often mean AND filters exclude all [OK]
Common Mistakes:
MISTAKES
  • Assuming OR filters cause empty results
  • Blaming database status without checking filters
  • Thinking index size causes no results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes