Search API for acousticbrainz

Search is something that I’ve really been wanting in AcousticBrainz for a long time. In fact, we already made a start on some experiments using elasticsearch: https://github.com/MTG/acousticbrainz-labs/tree/master/search

I don’t think an API is the only output that we should provide for a search project. If we index things like high- and mid- level features (genres, bpm, key, etc) we should be able to generate graphs from this data too. We made some graphs a long time ago with some early data (http://blog.musicbrainz.org/2014/11/21/what-do-650000-files-look-like-anyway). It’d be cool to be able to automatically generate this kind of data in real-time. We had some success integrating kibana into the elasticsearch database to do this kind of thing.

An API would be useful in our Datasets project. We currently have to type in or copy MusicBrainz IDs into a text field to add songs to a class in the dataset. It would be cool to be able to search for a track by its name, or even search for a release or artist to add all matching recordings to a class.
This search could also match recordings which match certain tags. For example, we have tags on recordings in MusicBrainz which look like genres. Would we be able to say “find all recordings tagged with ‘rock’ and add them to the rock class in our genre dataset”?

Have you looked at the output of the lowlevel and highlevel feature extractors? What specific list of descriptors do you think would be a good idea to include in a search index? For each of these descriptors can you suggest one or two examples of why someone might want to search for these values, and what they would do with the results once they have them?