Bird
0
0

If a search system uses a bitmap index for filtering by color (red, blue, green), what is the output of filtering for 'red OR blue'?

medium📝 Analysis Q5 of 15
LLD - Design — Hotel Booking System
If a search system uses a bitmap index for filtering by color (red, blue, green), what is the output of filtering for 'red OR blue'?
AAll items that are either red or blue
BOnly items that are both red and blue
CItems that are neither red nor blue
DNo items because bitmap indexes do not support OR
Step-by-Step Solution
Solution:
  1. Step 1: Understand bitmap index operations

    Bitmap indexes support bitwise OR to combine filters for multiple values.
  2. Step 2: Apply OR filter logic

    Filtering 'red OR blue' returns items matching either color.
  3. Final Answer:

    All items that are either red or blue -> Option A
  4. Quick Check:

    Bitmap OR filter = union of sets [OK]
Quick Trick: Bitmap indexes support OR by bitwise union [OK]
Common Mistakes:
  • Confusing OR with AND operation
  • Thinking bitmap indexes only support AND
  • Assuming no results for OR queries

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes