Facet Index Visualizer
About This MicroSim
This MicroSim demonstrates how facet indexes enable fast filtering by visualizing set intersections as facet values are selected.
Iframe Embed Code
1 2 | |
Description
Set Operations in Faceted Search
| Operation | Notation | Example |
|---|---|---|
| Single facet | A | Subject = "Physics" → |
| Two facets (AND) | A ∩ B | Physics AND Undergrad → |
| Three facets | A ∩ B ∩ C | Physics AND Undergrad AND p5.js → |
How to Use
- Click radio buttons to select facet values
- Watch documents fade that don't match selections
- See the set calculation panel update with notation
- Gold outlines highlight matching documents
- Click "Reset All" to clear selections
- Toggle "Show Steps" to hide/show calculation panel
Visual Elements
- Colored circles: Documents (numbered 1-15)
- Radio buttons: Facet value selectors
- Gold outlines: Documents matching all selected facets
- Faded circles: Documents not matching current filters
- Calculation panel: Shows set notation and intersection
Learning Objectives
After using this MicroSim, students will be able to:
- Examine how facet indexes create document sets
- Trace the intersection operation across multiple facets
- Predict which documents match given facet selections
Lesson Plan
Introduction (5 minutes)
- Explain facet indexes as "pre-computed lists"
- Analogy: phone book indexes by first letter
Set Operations Activity (10 minutes)
- Select only "Physics" - observe which docs match
- Add "Undergraduate" - watch intersection shrink
- Add "p5.js" - final intersection
Mental Math Exercise (10 minutes)
Before clicking, predict: - "If I select Chemistry, which documents will match?" - "If I add Graduate level, how many will remain?" Then verify predictions by clicking
Discussion (5 minutes)
- Why is intersection fast? (No scanning all documents)
- What if we had 10,000 documents?
- How do facet counts get calculated?