Case study · Music research · 2023 to now
Melody Search Index
Full-stack melody-similarity search, with OCR and RAG, over 10k+ records for music researchers worldwide.
- Elasticsearch
- Java
- TypeScript
- Python
- OCR
- RAG
- Challenge
- Researchers waited overnight for the index to rebuild and minutes for every search.
- What I built
- A full-stack melody-similarity search on Elasticsearch, replacing sliding-window n-gram matching, plus OCR and RAG over 10k+ records.
- Result
- Indexing in minutes and searches in seconds, used by researchers worldwide and presented in Texas, Salzburg, and Venice.
What they had
A BYU music research project was building a searchable corpus of melodies. Finding melodies that resemble each other relied on sliding-window n-gram matching: rebuilding the index took all night, and every search took minutes.
What I noticed
I joined as a research assistant, but the bottleneck was technical. I condensed the problem into one Elasticsearch could handle, instead of matching sliding windows of notes.
What I built
- A melody-similarity search over 10k+ records: a Java backend on Elasticsearch, a TypeScript frontend, and a Python metadata pipeline.
- OCR and RAG over the collection’s documents.
The result
- Indexing went from overnight to a few minutes, a 99% cut.
- Searches went from minutes to seconds, a 96% cut.
- Researchers around the world use it, and I’ve presented it at conferences in Texas, Salzburg, and Venice.
The same job is where the auto-cropper came from: everyone was cropping images by hand, so I automated it.