Redesigning category search and indexing
I took the initiative to rework a complex Elasticsearch flow, from investigating the problems to designing and implementing the solution.
The challenge
Category relationships, media mapping and overlapping index rebuilds were difficult to manage together.
My approach
Simplify the structure
I reworked category mapping and removed repeated processing from the flow.
Correct the relationships
I corrected parent-category media selection and handled circular category relationships.
Coordinate updates
I designed rebuild coordination to account for new requests arriving while an update is running.
The result
The reworked flow brings category mapping, media selection and index rebuild coordination into one design.
Covered by regression tests
- Parent and child categories map to the expected hierarchy.
- Parent media comes from the actual parent category.
- Traversal does not revisit a category cycle.